Debian Codegraph @

Documentation/devicetree/bindings/mailbox/xlnx,zynqmp-ipi-mailbox.yaml

raw
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/mailbox/xlnx,zynqmp-ipi-mailbox.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Xilinx IPI(Inter Processor Interrupt) mailbox controller
8
9 description: |
10 The Xilinx IPI(Inter Processor Interrupt) mailbox controller is to manage
11 messaging between two Xilinx Zynq UltraScale+ MPSoC IPI agents. Each IPI
12 agent owns registers used for notification and buffers for message.
13
14 For Versal devices, there are two types of IPI channels:
15 - Buffered channels: Support message passing and require the "msg"
16 register region to be present on both the host and remote IPI agents.
17 - Buffer-less channels: Support notification only and do not require the
18 "msg" register region. For these channels, the "msg" region should be
19 omitted.
20
21 For message passing, both the host and remote IPI agents must define the "msg"
22 register region. If either agent omits the "msg" region, only notification
23 based communication is possible.
24
25 +-------------------------------------+
26 | Xilinx ZynqMP IPI Controller |
27 +-------------------------------------+
28 +--------------------------------------------------+
29 TF-A | |
30 | |
31 | |
32 +--------------------------+ |
33 | |
34 | |
35 +--------------------------------------------------+
36 +------------------------------------------+
37 | +----------------+ +----------------+ |
38 Hardware | | IPI Agent | | IPI Buffers | |
39 | | Registers | | | |
40 | | | | | |
41 | +----------------+ +----------------+ |
42 | |
43 | Xilinx IPI Agent Block |
44 +------------------------------------------+
45
46 maintainers:
47 - Shubhrajyoti Datta <[email protected]>
48
49 properties:
50 compatible:
51 enum:
52 - xlnx,zynqmp-ipi-mailbox
53 - xlnx,versal-ipi-mailbox
54
55 method:
56 description: |
57 The method of calling the PM-API firmware layer.
58 Permitted values are.
59 - "smc" : SMC #0, following the SMCCC
60 - "hvc" : HVC #0, following the SMCCC
61
62 $ref: /schemas/types.yaml#/definitions/string
63 enum:
64 - smc
65 - hvc
66 default: smc
67
68 '#address-cells':
69 const: 2
70
71 '#size-cells':
72 const: 2
73
74 reg:
75 maxItems: 2
76
77 reg-names:
78 maxItems: 2
79
80 xlnx,ipi-id:
81 description: |
82 Remote Xilinx IPI agent ID of which the mailbox is connected to.
83 $ref: /schemas/types.yaml#/definitions/uint32
84
85 interrupts:
86 maxItems: 1
87
88 ranges: true
89
90 patternProperties:
91 '^mailbox@[0-9a-f]+$':
92 description: Internal ipi mailbox node
93 type: object # DT nodes are json objects
94 additionalProperties: false
95 properties:
96
97 compatible:
98 enum:
99 - xlnx,zynqmp-ipi-dest-mailbox
100 - xlnx,versal-ipi-dest-mailbox
101
102 reg:
103 minItems: 1
104 maxItems: 4
105
106 reg-names:
107 minItems: 1
108 maxItems: 4
109
110 xlnx,ipi-id:
111 description:
112 Remote Xilinx IPI agent ID of which the mailbox is connected to.
113 $ref: /schemas/types.yaml#/definitions/uint32
114
115 '#mbox-cells':
116 const: 1
117 description:
118 It contains tx(0) or rx(1) channel IPI id number.
119
120 allOf:
121 - if:
122 properties:
123 compatible:
124 contains:
125 enum:
126 - xlnx,zynqmp-ipi-dest-mailbox
127 then:
128 properties:
129 reg:
130 maxItems: 4
131
132 reg-names:
133 items:
134 - const: local_request_region
135 - const: local_response_region
136 - const: remote_request_region
137 - const: remote_response_region
138 else:
139 properties:
140 reg:
141 minItems: 1
142 items:
143 - description: Remote IPI agent control register region
144 - description: Remote IPI agent optional message buffers
145
146 reg-names:
147 minItems: 1
148 items:
149 - const: ctrl
150 - const: msg
151
152 required:
153 - compatible
154 - reg
155 - reg-names
156 - '#mbox-cells'
157 - xlnx,ipi-id
158
159 required:
160 - compatible
161 - interrupts
162 - '#address-cells'
163 - '#size-cells'
164 - xlnx,ipi-id
165
166 allOf:
167 - if:
168 properties:
169 compatible:
170 contains:
171 enum:
172 - xlnx,zynqmp-ipi-mailbox
173 then:
174 properties:
175 reg: false
176 reg-names: false
177
178 else:
179 properties:
180 reg:
181 items:
182 - description: Host IPI agent control register region
183 - description: Host IPI agent optional message buffers
184
185 reg-names:
186 items:
187 - const: ctrl
188 - const: msg
189
190 required:
191 - reg
192 - reg-names
193
194 additionalProperties: false
195
196 examples:
197 - |
198 #include<dt-bindings/interrupt-controller/arm-gic.h>
199
200 amba {
201 #address-cells = <0x2>;
202 #size-cells = <0x2>;
203 zynqmp-mailbox {
204 compatible = "xlnx,zynqmp-ipi-mailbox";
205 interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
206 xlnx,ipi-id = <0>;
207 #address-cells = <2>;
208 #size-cells = <2>;
209 ranges;
210
211 mailbox: mailbox@ff9905c0 {
212 compatible = "xlnx,zynqmp-ipi-dest-mailbox";
213 reg = <0x0 0xff9905c0 0x0 0x20>,
214 <0x0 0xff9905e0 0x0 0x20>,
215 <0x0 0xff990e80 0x0 0x20>,
216 <0x0 0xff990ea0 0x0 0x20>;
217 reg-names = "local_request_region",
218 "local_response_region",
219 "remote_request_region",
220 "remote_response_region";
221 #mbox-cells = <1>;
222 xlnx,ipi-id = <4>;
223 };
224 };
225 };
226
227 - |
228 #include<dt-bindings/interrupt-controller/arm-gic.h>
229
230 bus {
231 #address-cells = <2>;
232 #size-cells = <2>;
233 mailbox@ff300000 {
234 compatible = "xlnx,versal-ipi-mailbox";
235 interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
236 #address-cells = <2>;
237 #size-cells = <2>;
238 reg = <0x0 0xff300000 0x0 0x1000>,
239 <0x0 0xff990000 0x0 0x1ff>;
240 reg-names = "ctrl", "msg";
241 xlnx,ipi-id = <0>;
242 ranges;
243
244 /* buffered IPI */
245 mailbox@ff340000 {
246 compatible = "xlnx,versal-ipi-dest-mailbox";
247 reg = <0x0 0xff340000 0x0 0x1000>,
248 <0x0 0xff990400 0x0 0x1ff>;
249 reg-names = "ctrl", "msg";
250 #mbox-cells = <1>;
251 xlnx,ipi-id = <4>;
252 };
253
254 /* bufferless IPI */
255 mailbox@ff370000 {
256 compatible = "xlnx,versal-ipi-dest-mailbox";
257 reg = <0x0 0xff370000 0x0 0x1000>;
258 reg-names = "ctrl";
259 #mbox-cells = <1>;
260 xlnx,ipi-id = <7>;
261 };
262 };
263 };
264 ...