Skip to content

Commit 7f923ab

Browse files
tnmyshJassiBrar
authored andcommitted
dt-bindings: mailbox: add Versal IPI bindings
Add documentation for AMD-Xilinx Versal platform Inter Processor Interrupt controller. Versal IPI controller contains buffer-less IPI which do not have buffers for message passing. For such IPI channels message buffers are not expected and only notification to/from remote agent is expected. Signed-off-by: Tanmay Shah <tanmay.shah@amd.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
1 parent 0a49b66 commit 7f923ab

File tree

1 file changed

+118
-13
lines changed

1 file changed

+118
-13
lines changed

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

Lines changed: 118 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ maintainers:
3737

3838
properties:
3939
compatible:
40-
const: xlnx,zynqmp-ipi-mailbox
40+
enum:
41+
- xlnx,zynqmp-ipi-mailbox
42+
- xlnx,versal-ipi-mailbox
4143

4244
method:
4345
description: |
@@ -58,6 +60,12 @@ properties:
5860
'#size-cells':
5961
const: 2
6062

63+
reg:
64+
maxItems: 2
65+
66+
reg-names:
67+
maxItems: 2
68+
6169
xlnx,ipi-id:
6270
description: |
6371
Remote Xilinx IPI agent ID of which the mailbox is connected to.
@@ -76,7 +84,17 @@ patternProperties:
7684
properties:
7785

7886
compatible:
79-
const: xlnx,zynqmp-ipi-dest-mailbox
87+
enum:
88+
- xlnx,zynqmp-ipi-dest-mailbox
89+
- xlnx,versal-ipi-dest-mailbox
90+
91+
reg:
92+
minItems: 1
93+
maxItems: 4
94+
95+
reg-names:
96+
minItems: 1
97+
maxItems: 4
8098

8199
xlnx,ipi-id:
82100
description:
@@ -88,15 +106,37 @@ patternProperties:
88106
description:
89107
It contains tx(0) or rx(1) channel IPI id number.
90108

91-
reg:
92-
maxItems: 4
93-
94-
reg-names:
95-
items:
96-
- const: local_request_region
97-
- const: local_response_region
98-
- const: remote_request_region
99-
- const: remote_response_region
109+
allOf:
110+
- if:
111+
properties:
112+
compatible:
113+
contains:
114+
enum:
115+
- xlnx,zynqmp-ipi-dest-mailbox
116+
then:
117+
properties:
118+
reg:
119+
maxItems: 4
120+
121+
reg-names:
122+
items:
123+
- const: local_request_region
124+
- const: local_response_region
125+
- const: remote_request_region
126+
- const: remote_response_region
127+
else:
128+
properties:
129+
reg:
130+
minItems: 1
131+
items:
132+
- description: Remote IPI agent control register region
133+
- description: Remote IPI agent optional message buffers
134+
135+
reg-names:
136+
minItems: 1
137+
items:
138+
- const: ctrl
139+
- const: msg
100140

101141
required:
102142
- compatible
@@ -105,15 +145,43 @@ patternProperties:
105145
- "#mbox-cells"
106146
- xlnx,ipi-id
107147

108-
additionalProperties: false
109-
110148
required:
111149
- compatible
112150
- interrupts
113151
- '#address-cells'
114152
- '#size-cells'
115153
- xlnx,ipi-id
116154

155+
allOf:
156+
- if:
157+
properties:
158+
compatible:
159+
contains:
160+
enum:
161+
- xlnx,zynqmp-ipi-mailbox
162+
then:
163+
properties:
164+
reg: false
165+
reg-names: false
166+
167+
else:
168+
properties:
169+
reg:
170+
items:
171+
- description: Host IPI agent control register region
172+
- description: Host IPI agent optional message buffers
173+
174+
reg-names:
175+
items:
176+
- const: ctrl
177+
- const: msg
178+
179+
required:
180+
- reg
181+
- reg-names
182+
183+
additionalProperties: false
184+
117185
examples:
118186
- |
119187
#include<dt-bindings/interrupt-controller/arm-gic.h>
@@ -145,4 +213,41 @@ examples:
145213
};
146214
};
147215
216+
- |
217+
#include<dt-bindings/interrupt-controller/arm-gic.h>
218+
219+
bus {
220+
#address-cells = <2>;
221+
#size-cells = <2>;
222+
mailbox@ff300000 {
223+
compatible = "xlnx,versal-ipi-mailbox";
224+
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
225+
#address-cells = <2>;
226+
#size-cells = <2>;
227+
reg = <0x0 0xff300000 0x0 0x1000>,
228+
<0x0 0xff990000 0x0 0x1ff>;
229+
reg-names = "ctrl", "msg";
230+
xlnx,ipi-id = <0>;
231+
ranges;
232+
233+
/* buffered IPI */
234+
mailbox@ff340000 {
235+
compatible = "xlnx,versal-ipi-dest-mailbox";
236+
reg = <0x0 0xff340000 0x0 0x1000>,
237+
<0x0 0xff990400 0x0 0x1ff>;
238+
reg-names = "ctrl", "msg";
239+
#mbox-cells = <1>;
240+
xlnx,ipi-id = <4>;
241+
};
242+
243+
/* bufferless IPI */
244+
mailbox@ff370000 {
245+
compatible = "xlnx,versal-ipi-dest-mailbox";
246+
reg = <0x0 0xff370000 0x0 0x1000>;
247+
reg-names = "ctrl";
248+
#mbox-cells = <1>;
249+
xlnx,ipi-id = <7>;
250+
};
251+
};
252+
};
148253
...

0 commit comments

Comments
 (0)