-
Notifications
You must be signed in to change notification settings - Fork 919
dt-bindings: soc: adi: Add SC5XX SoC component bindings #3033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: adsp-6.12.0-y
Are you sure you want to change the base?
Changes from all commits
248a3bd
a181f77
2fdca97
a8d311a
facfd8c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
| %YAML 1.2 | ||
| --- | ||
| $id: http://devicetree.org/schemas/soc/adi/adi,pads-system-config.yaml# | ||
| $schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
|
||
| title: Analog Devices PADS-related system config for SC5XX processor family | ||
|
|
||
| maintainers: | ||
| - Arturs Artamonovs <arturs.artamonovs@analog.com> | ||
| - Utsav Agarwal <Utsav.Agarwal@analog.com> | ||
|
|
||
| description: | ||
| Allows other drivers to control the PADS-related system config register. | ||
| This register ties into many drivers and adds silicon controls for items | ||
| like voltage selection and endian selection. | ||
|
|
||
| properties: | ||
| compatible: | ||
| enum: | ||
| - adi,pads-system-config | ||
|
|
||
| reg: | ||
| maxItems: 1 | ||
|
|
||
| required: | ||
| - compatible | ||
| - reg | ||
|
|
||
| additionalProperties: false | ||
|
|
||
| examples: | ||
| - | | ||
| bus { | ||
| compatible = "simple-bus"; | ||
| #address-cells = <1>; | ||
| #size-cells = <1>; | ||
| ranges; | ||
| pads_system_config: adi-control@31004600 { | ||
| compatible = "adi,pads-system-config"; | ||
| reg = <0x31004600 0x100>; | ||
| }; | ||
| }; | ||
| emac0: ethernet@31040000 { | ||
| reg = <0x31040000 0x2000>; | ||
| adi,system-config = <&pads_system_config>; | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
| %YAML 1.2 | ||
| --- | ||
| $id: http://devicetree.org/schemas/soc/adi/adi,reset-controller.yaml# | ||
| $schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
|
||
| title: Analog Devices Reset Controller for SC5XX processor family | ||
|
|
||
| maintainers: | ||
| - Arturs Artamonovs <arturs.artamonovs@analog.com> | ||
| - Utsav Agarwal <Utsav.Agarwal@analog.com> | ||
|
|
||
| description: | ||
| SHARC and ARM core reset control unit for starting/stopping/resetting | ||
| processors | ||
|
|
||
| properties: | ||
| compatible: | ||
| enum: | ||
| - adi,reset-controller | ||
|
|
||
| reg: | ||
| maxItems: 1 | ||
|
|
||
| adi,sharc-min: | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| description: Minimum valid SHARC core ID/count | ||
| minimum: 1 | ||
| maximum: 2 | ||
|
|
||
| adi,sharc-max: | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| description: Maximum valid SHARC core ID/count | ||
| minimum: 1 | ||
| maximum: 2 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm the above two is odd. Why not a simple adi,sharc-count? Or just the adi,sharc-max. IOW, why do we need both properties?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All cores have their ID's from system perspective. Like In case of SC598 Core0/ARM, Core1/SHARC, Core2/SHARC,
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will not fit well when core id's assigned in other order or not in continues Core id's
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm I see, Still two properties seems wrong to me and hard to understand. What about something like adi,sharc-core-ids? And the property is an array of minimum 1 and maximum of what? Not sure what's the max number of shark cores we can have today :). And example:
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will fix in yaml file and do new PR for fix within a driver |
||
|
|
||
| required: | ||
| - compatible | ||
| - reg | ||
| - adi,sharc-min | ||
| - adi,sharc-max | ||
|
|
||
| additionalProperties: false | ||
|
|
||
| examples: | ||
| - | | ||
| rcu: rcu@3108c000 { | ||
| compatible = "adi,reset-controller"; | ||
| reg = <0x3108c000 0x1000>; | ||
| adi,sharc-min = <1>; | ||
| adi,sharc-max = <2>; | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
| %YAML 1.2 | ||
| --- | ||
| $id: http://devicetree.org/schemas/soc/adi/adi,rpmsg-SC598.yaml# | ||
| $schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
|
||
| title: Analog Devices RPMSG Driver for SC5XX processor family | ||
|
|
||
| maintainers: | ||
| - Arturs Artamonovs <arturs.artamonovs@analog.com> | ||
| - Utsav Agarwal <Utsav.Agarwal@analog.com> | ||
|
|
||
| description: | | ||
| This rpmsg driver, used when the firmware loaded before Linux Kernel | ||
| starts. Allocates memmory according rpmsg message max settings | ||
| both for vrings and buffer. | ||
|
|
||
| properties: | ||
| compatible: | ||
| enum: | ||
| - adi,rpmsg-SC598 | ||
|
|
||
| reg: | ||
| maxItems: 1 | ||
|
|
||
| core-id: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a standard property? Otherwise it needs the adi vendor prefix
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Its sharc core id for rpmsg communication |
||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| description: SHARC core number | ||
|
|
||
| adi,rcu: | ||
| $ref: /schemas/types.yaml#/definitions/phandle | ||
| description: phandle to Remote Control Unit | ||
|
|
||
| adi,rsc-table: | ||
| $ref: /schemas/types.yaml#/definitions/phandle | ||
| description: phandle to resource table memory region shared with SHARC core | ||
|
|
||
| adi,tru: | ||
| $ref: /schemas/types.yaml#/definitions/phandle | ||
| description: phandle to Trigger Routing Unit for ICC interrupts | ||
|
|
||
| interrupts: | ||
| maxItems: 1 | ||
| description: ICC interrupt for rpmsg communication | ||
|
|
||
| adi,tru-master-id: | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| description: ICC interrupt number to notify remote core | ||
|
|
||
| vdev-vring: | ||
| $ref: /schemas/types.yaml#/definitions/phandle | ||
| description: | ||
| phandle to reserved memory region for rpmsg vdev0vrings, | ||
| if not specified allocates buffer from DMA pool. | ||
|
|
||
| memory-region: | ||
| maxItems: 1 | ||
| description: | ||
| phandle to reserved memory for rpmsg message buffers, | ||
| if not specified allocates buffer from DMA pool. | ||
|
|
||
|
|
||
| required: | ||
| - compatible | ||
| - core-id | ||
| - adi,rcu | ||
| - adi,rsc-table | ||
| - adi,tru | ||
| - interrupts | ||
| - adi,tru-master-id | ||
|
|
||
| additionalProperties: false | ||
|
|
||
| examples: | ||
| - | | ||
| #include <dt-bindings/interrupt-controller/arm-gic.h> | ||
| #include <dt-bindings/interrupt-controller/irq.h> | ||
|
|
||
| reserved-memory { | ||
| #address-cells = <1>; | ||
| #size-cells = <1>; | ||
| ranges; | ||
|
|
||
| vdev0vrings: vdev0vring0@20080000 { | ||
| reg = <0x20080000 0x4000>; | ||
| no-map; | ||
| }; | ||
|
|
||
| vdev0buffer: vdev0buffer@20084000 { | ||
| compatible = "shared-dma-pool"; | ||
| reg = <0x20084000 0x20000>; | ||
| no-map; | ||
| }; | ||
| }; | ||
|
|
||
| rcu: rcu@3108c000 { | ||
| compatible = "adi,reset-controller"; | ||
| reg = <0x3108c000 0x1000>; | ||
| adi,sharc-min = <1>; | ||
| adi,sharc-max = <2>; | ||
| }; | ||
|
|
||
| tru: tru@3108a000 { | ||
| compatible = "adi,trigger-routing-unit"; | ||
| reg = <0x3108a000 0x1000>; | ||
| adi,max-master-id = <182>; | ||
| adi,max-slave-id = <187>; | ||
| }; | ||
|
|
||
| rsc_tbl0: rsc-tbl@20081000 { | ||
| reg = <0x20081000 0x1000>; | ||
| }; | ||
|
|
||
| core0-rpmsg@28240000 { | ||
| compatible = "adi,rpmsg-SC598"; | ||
| reg = <0x28240000 0x1000>; | ||
| core-id = <1>; | ||
| adi,rcu = <&rcu>; | ||
| adi,rsc-table = <&rsc_tbl0>; | ||
| interrupts = <GIC_SPI 337 IRQ_TYPE_EDGE_RISING>; | ||
| adi,tru = <&tru>; | ||
| adi,tru-master-id = <135>; | ||
| vdev-vring = <&vdev0vrings>; | ||
| memory-region = <&vdev0buffer>; | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
| %YAML 1.2 | ||
| --- | ||
| $id: http://devicetree.org/schemas/soc/adi/adi,system-event-controller.yaml# | ||
| $schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
|
||
| title: Analog Devices System Event Controller for SC5XX processor family | ||
|
|
||
| maintainers: | ||
| - Arturs Artamonovs <arturs.artamonovs@analog.com> | ||
| - Utsav Agarwal <Utsav.Agarwal@analog.com> | ||
|
|
||
| description: | ||
| This is the interrupt controller for the SHARC cores on the SC5XX family. | ||
|
|
||
| properties: | ||
| compatible: | ||
| enum: | ||
| - adi,system-event-controller | ||
|
|
||
| reg: | ||
| maxItems: 1 | ||
|
|
||
| adi,rcu: | ||
| $ref: /schemas/types.yaml#/definitions/phandle | ||
| description: Associated reset control unit | ||
|
|
||
| adi,sharc-cores: | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| description: Number of SHARC cores available | ||
|
|
||
| required: | ||
| - compatible | ||
| - reg | ||
| - adi,rcu | ||
| - adi,sharc-cores | ||
|
|
||
| additionalProperties: false | ||
|
|
||
| examples: | ||
| - | | ||
| sec: sec@31089000 { | ||
| compatible = "adi,system-event-controller"; | ||
| reg = <0x31089000 0x1000>; | ||
| adi,rcu = <&rcu>; | ||
| adi,sharc-cores = <2>; | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
| %YAML 1.2 | ||
| --- | ||
| $id: http://devicetree.org/schemas/soc/adi/adi,trigger-routing-unit.yaml# | ||
| $schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
|
||
| title: Analog Devices Trigger Routing Unit for SC5XX processor family | ||
|
|
||
| maintainers: | ||
| - Arturs Artamonovs <arturs.artamonovs@analog.com> | ||
| - Utsav Agarwal <Utsav.Agarwal@analog.com> | ||
|
|
||
| description: | ||
| Used for ICC between SHARC and ARM cores. | ||
|
|
||
| The TRU provides system-level sequence control without core intervention. | ||
| The TRU maps trigger masters (generators of triggers) to trigger slaves | ||
| (receivers of triggers). Slave endpoints can be configured to respond to | ||
| triggers in various ways. Multiple TRUs may be provided in a | ||
| multiprocessor system to create a trigger network. Common applications | ||
| enabled by the TRU include | ||
|
|
||
| properties: | ||
| compatible: | ||
| enum: | ||
| - adi,trigger-routing-unit | ||
|
|
||
| reg: | ||
| maxItems: 1 | ||
|
|
||
| adi,max-master-id: | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| description: Max Trigger Master ID | ||
| maximum: 1024 | ||
|
|
||
| adi,max-slave-id: | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| description: Max Trigger Slave ID | ||
| maximum: 1024 | ||
|
|
||
| patternProperties: | ||
| "^channel-[0-9]+$": | ||
artursartamonovsadi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| description: Trigger Routing Channel to Map Master/Slave | ||
| type: object | ||
| properties: | ||
| adi,tru-master-id: | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| description: Trigger Routing Master ID | ||
| adi,tru-slave-id: | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| description: Trigger Routing Slave ID | ||
| required: | ||
| - adi,tru-master-id | ||
| - adi,tru-slave-id | ||
| additionalProperties: false | ||
|
|
||
| required: | ||
| - compatible | ||
| - reg | ||
| - adi,max-master-id | ||
| - adi,max-slave-id | ||
|
|
||
| additionalProperties: false | ||
|
|
||
| examples: | ||
| - | | ||
| tru: tru@3108a000 { | ||
| compatible = "adi,trigger-routing-unit"; | ||
| reg = <0x3108a000 0x1000>; | ||
| adi,max-master-id = <182>; | ||
| adi,max-slave-id = <187>; | ||
|
|
||
| rpmsg_to_a55: channel-0 { | ||
| adi,tru-master-id = <134>; /* trigger master SOFT3 */ | ||
| adi,tru-slave-id = <160>; /* TRU0_IRQ3 */ | ||
| }; | ||
| rpmsg_to_sharc0: channel-1 { | ||
| adi,tru-master-id = <135>; /* trigger master SOFT4 */ | ||
| adi,tru-slave-id = <164>; /* TRU0_IRQ7 */ | ||
| }; | ||
| rpmsg_to_sharc1: channel-2 { | ||
| adi,tru-master-id = <136>; /* trigger master SOFT5 */ | ||
| adi,tru-slave-id = <168>; /* TRU0_IRQ11 */ | ||
| }; | ||
| }; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation still looks wrong... Are you using 4 spaces? I think 2 spaces is also acceptable but IIRC, 4 is the preferred
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed other yaml DT examples all of them have 2 spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I said, IIRC 2 spaces are acceptable but nor the preferred:
https://elixir.bootlin.com/linux/v6.18.1/source/Documentation/devicetree/bindings/example-schema.yaml#L269