Skip to content

Commit ffd6b12

Browse files
dt-bindings: soc: adi: Add SC5XX SoC component bindings
Document device tree bindings for ADI SC5XX SoC components including PADS config, reset controller, system event controller, trigger routing unit, and RPMSG support. Signed-off-by: Arturs Artamonovs <[email protected]>
1 parent e484297 commit ffd6b12

File tree

5 files changed

+383
-0
lines changed

5 files changed

+383
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/soc/adi/adi,pads-system-config.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Analog Devices PADS-related system config for SC5XX processor family
8+
9+
maintainers:
10+
- Arturs Artamonovs <[email protected]>
11+
- Utsav Agarwal <[email protected]>
12+
13+
description:
14+
Allows other drivers to control the PADS-related system config register.
15+
This register ties into many drivers and adds silicon controls for items
16+
like voltage selection and endian selection.
17+
18+
properties:
19+
compatible:
20+
enum:
21+
- adi,pads-system-config
22+
23+
reg:
24+
maxItems: 1
25+
26+
required:
27+
- compatible
28+
- reg
29+
30+
additionalProperties: false
31+
32+
examples:
33+
- |
34+
bus {
35+
compatible = "simple-bus";
36+
#address-cells = <1>;
37+
#size-cells = <1>;
38+
ranges;
39+
40+
pads_system_config: adi-control@31004600 {
41+
compatible = "adi,pads-system-config";
42+
reg = <0x31004600 0x100>;
43+
};
44+
};
45+
46+
emac0: ethernet@31040000 {
47+
reg = <0x31040000 0x2000>;
48+
adi,system-config = <&pads_system_config>;
49+
};
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/soc/adi/adi,reset-controller.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Analog Devices Reset Controller for SC5XX processor family
8+
9+
maintainers:
10+
- Arturs Artamonovs <[email protected]>
11+
- Utsav Agarwal <[email protected]>
12+
13+
description:
14+
SHARC and ARM core reset control unit for starting/stopping/resetting
15+
processors
16+
17+
properties:
18+
compatible:
19+
enum:
20+
- adi,reset-controller
21+
22+
reg:
23+
maxItems: 1
24+
25+
adi,sharc-min:
26+
$ref: /schemas/types.yaml#/definitions/uint32
27+
description: Minimum valid SHARC core ID/count
28+
minimum: 0
29+
30+
adi,sharc-max:
31+
$ref: /schemas/types.yaml#/definitions/uint32
32+
description: Maximum valid SHARC core ID/count
33+
maximum: 2
34+
35+
required:
36+
- compatible
37+
- reg
38+
- adi,sharc-min
39+
- adi,sharc-max
40+
41+
additionalProperties: false
42+
43+
examples:
44+
- |
45+
rcu: rcu@3108c000 {
46+
compatible = "adi,reset-controller";
47+
reg = <0x3108c000 0x1000>;
48+
adi,sharc-min = <1>;
49+
adi,sharc-max = <2>;
50+
};
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/soc/adi/adi,rpmsg-SC598.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Analog Devices RPMSG Driver for SC5XX processor family
8+
9+
maintainers:
10+
- Arturs Artamonovs <[email protected]>
11+
- Utsav Agarwal <[email protected]>
12+
13+
description: |
14+
Describes device tree binding for adi rpmsg driver
15+
required when rpmsg communication is needed and remote core isn't
16+
started by adi,remoteproc.
17+
The size of vdev-vring specifies how many message buffers are allocated
18+
for tx and rx (combined) overriding the default number specified in
19+
MAX_RPMSG_NUM_BUFS. The memory-region size must match (or be larger) selected
20+
number of messages times MAX_RPMSG_BUF_SIZE (default 512).
21+
E.g. for 1024 message buffers (512 for rx and 512 for tx):
22+
vdev-vring size = 0x0000a000
23+
memory-region size = 0x00080000
24+
25+
Selection table for MAX_RPMSG_BUF_SIZE=512 (default):
26+
27+
rpmsg | |
28+
buffers | vdev-vring | memory-region
29+
---------------------------------
30+
256 | 0x00004000 | 0x00020000
31+
512 | 0x00006000 | 0x00040000
32+
1024 | 0x0000a000 | 0x00080000
33+
2048 | 0x00010000 | 0x00100000
34+
4096 | 0x0001e000 | 0x00200000
35+
8192 | 0x00038000 | 0x00400000
36+
16384 | 0x0006c000 | 0x00800000
37+
32768 | 0x000d4000 | 0x01000000
38+
65536 | 0x001a4000 | 0x02000000
39+
131072 | 0x00344000 | 0x04000000
40+
262144 | 0x00684000 | 0x08000000
41+
524288 | 0x00d04000 | 0x10000000
42+
1048576 | 0x01a04000 | 0x20000000
43+
2097152 | 0x03404000 | 0x40000000
44+
45+
properties:
46+
compatible:
47+
enum:
48+
- adi,rpmsg-SC598
49+
50+
reg:
51+
maxItems: 1
52+
53+
core-id:
54+
$ref: /schemas/types.yaml#/definitions/uint32
55+
description: SHARC core number
56+
57+
adi,rcu:
58+
$ref: /schemas/types.yaml#/definitions/phandle
59+
description: phandle to Remote Control Unit
60+
61+
adi,rsc-table:
62+
$ref: /schemas/types.yaml#/definitions/phandle
63+
description: phandle to resource table memory region shared with SHARC core
64+
65+
adi,tru:
66+
$ref: /schemas/types.yaml#/definitions/phandle
67+
description: phandle to Trigger Routing Unit for ICC interrupts
68+
69+
interrupts:
70+
maxItems: 1
71+
description: ICC interrupt for rpmsg communication
72+
73+
adi,tru-master-id:
74+
$ref: /schemas/types.yaml#/definitions/uint32
75+
description: ICC interrupt number to notify remote core
76+
77+
vdev-vring:
78+
$ref: /schemas/types.yaml#/definitions/phandle
79+
description: |
80+
phandle to reserved memory region for rpmsg vdev0vrings,
81+
if not specified allocates buffer from DMA pool.
82+
83+
memory-region:
84+
maxItems: 1
85+
description: |
86+
phandle to reserved memory for rpmsg message buffers,
87+
if not specified allocates buffer from DMA pool.
88+
89+
90+
required:
91+
- compatible
92+
- core-id
93+
- adi,rcu
94+
- adi,rsc-table
95+
- adi,tru
96+
- interrupts
97+
- adi,tru-master-id
98+
99+
additionalProperties: false
100+
101+
examples:
102+
- |
103+
#include <dt-bindings/interrupt-controller/arm-gic.h>
104+
#include <dt-bindings/interrupt-controller/irq.h>
105+
106+
reserved-memory {
107+
#address-cells = <1>;
108+
#size-cells = <1>;
109+
ranges;
110+
111+
vdev0vrings: vdev0vring0@20080000 {
112+
reg = <0x20080000 0x4000>;
113+
no-map;
114+
};
115+
116+
vdev0buffer: vdev0buffer@20084000 {
117+
compatible = "shared-dma-pool";
118+
reg = <0x20084000 0x20000>;
119+
no-map;
120+
};
121+
};
122+
123+
rcu: rcu@3108c000 {
124+
compatible = "adi,reset-controller";
125+
reg = <0x3108c000 0x1000>;
126+
adi,sharc-min = <1>;
127+
adi,sharc-max = <2>;
128+
};
129+
130+
tru: tru@3108a000 {
131+
compatible = "adi,trigger-routing-unit";
132+
reg = <0x3108a000 0x1000>;
133+
adi,max-master-id = <182>;
134+
adi,max-slave-id = <187>;
135+
};
136+
137+
rsc_tbl0: rsc-tbl@20081000 {
138+
reg = <0x20081000 0x1000>;
139+
};
140+
141+
core0-rpmsg@28240000 {
142+
compatible = "adi,rpmsg-SC598";
143+
reg = <0x28240000 0x1000>;
144+
core-id = <1>;
145+
adi,rcu = <&rcu>;
146+
adi,rsc-table = <&rsc_tbl0>;
147+
interrupts = <GIC_SPI 337 IRQ_TYPE_EDGE_RISING>;
148+
adi,tru = <&tru>;
149+
adi,tru-master-id = <135>;
150+
vdev-vring = <&vdev0vrings>;
151+
memory-region = <&vdev0buffer>;
152+
};
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/soc/adi/adi,system-event-controller.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Analog Devices System Event Controller for SC5XX processor family
8+
9+
maintainers:
10+
- Arturs Artamonovs <[email protected]>
11+
- Utsav Agarwal <[email protected]>
12+
13+
description:
14+
This is the interrupt controller for the SHARC cores on the SC5XX family.
15+
16+
properties:
17+
compatible:
18+
enum:
19+
- adi,system-event-controller
20+
21+
reg:
22+
maxItems: 1
23+
24+
adi,rcu:
25+
$ref: /schemas/types.yaml#/definitions/phandle
26+
description: Associated reset control unit
27+
28+
adi,sharc-cores:
29+
$ref: /schemas/types.yaml#/definitions/uint32
30+
description: Number of SHARC cores available
31+
32+
required:
33+
- compatible
34+
- reg
35+
- adi,rcu
36+
- adi,sharc-cores
37+
38+
additionalProperties: false
39+
40+
examples:
41+
- |
42+
sec: sec@31089000 {
43+
compatible = "adi,system-event-controller";
44+
reg = <0x31089000 0x1000>;
45+
adi,rcu = <&rcu>;
46+
adi,sharc-cores = <2>;
47+
};
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/soc/adi/adi,trigger-routing-unit.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Analog Devices Trigger Routing Unit for SC5XX processor family
8+
9+
maintainers:
10+
- Arturs Artamonovs <[email protected]>
11+
- Utsav Agarwal <[email protected]>
12+
13+
description:
14+
Used for ICC between SHARC and ARM cores.
15+
16+
The TRU provides system-level sequence control without core intervention.
17+
The TRU maps trigger masters (generators of triggers) to trigger slaves
18+
(receivers of triggers). Slave endpoints can be configured to respond to
19+
triggers in various ways. Multiple TRUs may be provided in a
20+
multiprocessor system to create a trigger network. Common applications
21+
enabled by the TRU include
22+
23+
properties:
24+
compatible:
25+
enum:
26+
- adi,trigger-routing-unit
27+
28+
reg:
29+
maxItems: 1
30+
31+
adi,max-master-id:
32+
$ref: /schemas/types.yaml#/definitions/uint32
33+
description: Max Trigger Master ID
34+
maximum: 1024
35+
36+
adi,max-slave-id:
37+
$ref: /schemas/types.yaml#/definitions/uint32
38+
description: Max Trigger Slave ID
39+
maximum: 1024
40+
41+
patternProperties:
42+
"^channel-[0-9]+$":
43+
description: Trigger Routing Channel to Map Master/Slave
44+
type: object
45+
properties:
46+
adi,tru-master-id:
47+
$ref: /schemas/types.yaml#/definitions/uint32
48+
description: Trigger Routing Master ID
49+
adi,tru-slave-id:
50+
$ref: /schemas/types.yaml#/definitions/uint32
51+
description: Trigger Routing Slave ID
52+
required:
53+
- adi,tru-master-id
54+
- adi,tru-slave-id
55+
additionalProperties: false
56+
57+
required:
58+
- compatible
59+
- reg
60+
- adi,max-master-id
61+
- adi,max-slave-id
62+
63+
additionalProperties: false
64+
65+
examples:
66+
- |
67+
tru: tru@3108a000 {
68+
compatible = "adi,trigger-routing-unit";
69+
reg = <0x3108a000 0x1000>;
70+
adi,max-master-id = <182>;
71+
adi,max-slave-id = <187>;
72+
73+
rpmsg_to_a55: channel-0 {
74+
adi,tru-master-id = <134>; /* trigger master SOFT3 */
75+
adi,tru-slave-id = <160>; /* TRU0_IRQ3 */
76+
};
77+
rpmsg_to_sharc0: channel-1 {
78+
adi,tru-master-id = <135>; /* trigger master SOFT4 */
79+
adi,tru-slave-id = <164>; /* TRU0_IRQ7 */
80+
};
81+
rpmsg_to_sharc1: channel-2 {
82+
adi,tru-master-id = <136>; /* trigger master SOFT5 */
83+
adi,tru-slave-id = <168>; /* TRU0_IRQ11 */
84+
};
85+
};

0 commit comments

Comments
 (0)