GNU Linux-libre 6.1.90-gnu
[releases.git] / Documentation / devicetree / bindings / remoteproc / qcom,adsp.yaml
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/remoteproc/qcom,adsp.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Qualcomm ADSP Peripheral Image Loader binding
8
9 maintainers:
10   - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
11
12 description:
13   This document defines the binding for a component that loads and boots
14   firmware on the Qualcomm ADSP Hexagon core.
15
16 properties:
17   compatible:
18     enum:
19       - qcom,msm8226-adsp-pil
20       - qcom,msm8974-adsp-pil
21       - qcom,msm8996-adsp-pil
22       - qcom,msm8996-slpi-pil
23       - qcom,msm8998-adsp-pas
24       - qcom,msm8998-slpi-pas
25       - qcom,qcs404-adsp-pas
26       - qcom,qcs404-cdsp-pas
27       - qcom,qcs404-wcss-pas
28       - qcom,sc7180-mpss-pas
29       - qcom,sc7280-mpss-pas
30       - qcom,sc8180x-adsp-pas
31       - qcom,sc8180x-cdsp-pas
32       - qcom,sc8180x-mpss-pas
33       - qcom,sc8280xp-adsp-pas
34       - qcom,sc8280xp-nsp0-pas
35       - qcom,sc8280xp-nsp1-pas
36       - qcom,sdm660-adsp-pas
37       - qcom,sdm845-adsp-pas
38       - qcom,sdm845-cdsp-pas
39       - qcom,sdx55-mpss-pas
40       - qcom,sm6350-adsp-pas
41       - qcom,sm6350-cdsp-pas
42       - qcom,sm6350-mpss-pas
43       - qcom,sm8150-adsp-pas
44       - qcom,sm8150-cdsp-pas
45       - qcom,sm8150-mpss-pas
46       - qcom,sm8150-slpi-pas
47       - qcom,sm8250-adsp-pas
48       - qcom,sm8250-cdsp-pas
49       - qcom,sm8250-slpi-pas
50       - qcom,sm8350-adsp-pas
51       - qcom,sm8350-cdsp-pas
52       - qcom,sm8350-slpi-pas
53       - qcom,sm8350-mpss-pas
54       - qcom,sm8450-adsp-pas
55       - qcom,sm8450-cdsp-pas
56       - qcom,sm8450-mpss-pas
57       - qcom,sm8450-slpi-pas
58
59   reg:
60     maxItems: 1
61
62   clocks:
63     minItems: 1
64     maxItems: 8
65
66   clock-names:
67     minItems: 1
68     maxItems: 8
69
70   interconnects:
71     maxItems: 1
72
73   interrupts:
74     minItems: 5
75     items:
76       - description: Watchdog interrupt
77       - description: Fatal interrupt
78       - description: Ready interrupt
79       - description: Handover interrupt
80       - description: Stop acknowledge interrupt
81       - description: Shutdown acknowledge interrupt
82
83   interrupt-names:
84     minItems: 5
85     items:
86       - const: wdog
87       - const: fatal
88       - const: ready
89       - const: handover
90       - const: stop-ack
91       - const: shutdown-ack
92
93   resets:
94     minItems: 1
95     maxItems: 3
96
97   reset-names:
98     minItems: 1
99     maxItems: 3
100
101   cx-supply:
102     description: Phandle to the CX regulator
103
104   px-supply:
105     description: Phandle to the PX regulator
106
107   power-domains:
108     minItems: 1
109     maxItems: 3
110
111   power-domain-names:
112     minItems: 1
113     maxItems: 3
114
115   firmware-name:
116     $ref: /schemas/types.yaml#/definitions/string
117     description: Firmware name for the Hexagon core
118
119   memory-region:
120     maxItems: 1
121     description: Reference to the reserved-memory for the Hexagon core
122
123   qcom,qmp:
124     $ref: /schemas/types.yaml#/definitions/phandle
125     description: Reference to the AOSS side-channel message RAM.
126
127   qcom,smem-states:
128     $ref: /schemas/types.yaml#/definitions/phandle-array
129     description: States used by the AP to signal the Hexagon core
130     items:
131       - description: Stop the modem
132
133   qcom,smem-state-names:
134     description: The names of the state bits used for SMP2P output
135     items:
136       - const: stop
137
138   qcom,halt-regs:
139     $ref: /schemas/types.yaml#/definitions/phandle-array
140     items:
141       - items:
142           - description: Phandle reference to a syscon representing TCSR
143           - description: offsets within syscon for q6 halt registers
144           - description: offsets within syscon for modem halt registers
145           - description: offsets within syscon for nc halt registers
146     description:
147       Phandle reference to a syscon representing TCSR followed by the
148       three offsets within syscon for q6, modem and nc halt registers.
149
150   smd-edge:
151     $ref: /schemas/remoteproc/qcom,smd-edge.yaml#
152     description:
153       Qualcomm Shared Memory subnode which represents communication edge,
154       channels and devices related to the ADSP.
155     unevaluatedProperties: false
156
157   glink-edge:
158     $ref: /schemas/remoteproc/qcom,glink-edge.yaml#
159     description:
160       Qualcomm G-Link subnode which represents communication edge, channels
161       and devices related to the ADSP.
162
163 required:
164   - compatible
165   - clocks
166   - clock-names
167   - interrupts
168   - interrupt-names
169   - memory-region
170   - qcom,smem-states
171   - qcom,smem-state-names
172
173 additionalProperties: false
174
175 allOf:
176   - if:
177       properties:
178         compatible:
179           contains:
180             enum:
181               - qcom,msm8226-adsp-pil
182               - qcom,msm8974-adsp-pil
183               - qcom,msm8996-adsp-pil
184               - qcom,msm8996-slpi-pil
185               - qcom,msm8998-adsp-pas
186               - qcom,qcs404-adsp-pas
187               - qcom,qcs404-wcss-pas
188               - qcom,sc7280-mpss-pas
189               - qcom,sc8180x-adsp-pas
190               - qcom,sc8180x-cdsp-pas
191               - qcom,sc8180x-mpss-pas
192               - qcom,sc8280xp-adsp-pas
193               - qcom,sc8280xp-nsp0-pas
194               - qcom,sc8280xp-nsp1-pas
195               - qcom,sdm845-adsp-pas
196               - qcom,sdm845-cdsp-pas
197               - qcom,sm6350-adsp-pas
198               - qcom,sm6350-cdsp-pas
199               - qcom,sm6350-mpss-pas
200               - qcom,sm8150-adsp-pas
201               - qcom,sm8150-cdsp-pas
202               - qcom,sm8150-mpss-pas
203               - qcom,sm8150-slpi-pas
204               - qcom,sm8250-adsp-pas
205               - qcom,sm8250-cdsp-pas
206               - qcom,sm8250-slpi-pas
207               - qcom,sm8350-adsp-pas
208               - qcom,sm8350-cdsp-pas
209               - qcom,sm8350-slpi-pas
210               - qcom,sm8350-mpss-pas
211               - qcom,sm8450-adsp-pas
212               - qcom,sm8450-cdsp-pas
213               - qcom,sm8450-slpi-pas
214               - qcom,sm8450-mpss-pas
215     then:
216       properties:
217         clocks:
218           items:
219             - description: XO clock
220         clock-names:
221           items:
222             - const: xo
223
224   - if:
225       properties:
226         compatible:
227           contains:
228             enum:
229               - qcom,msm8998-slpi-pas
230     then:
231       properties:
232         clocks:
233           items:
234             - description: XO clock
235             - description: AGGRE2 clock
236         clock-names:
237           items:
238             - const: xo
239             - const: aggre2
240
241   - if:
242       properties:
243         compatible:
244           contains:
245             enum:
246               - qcom,qcs404-cdsp-pas
247     then:
248       properties:
249         clocks:
250           items:
251             - description: XO clock
252             - description: SWAY clock
253             - description: TBU clock
254             - description: BIMC clock
255             - description: AHB AON clock
256             - description: Q6SS SLAVE clock
257             - description: Q6SS MASTER clock
258             - description: Q6 AXIM clock
259         clock-names:
260           items:
261             - const: xo
262             - const: sway
263             - const: tbu
264             - const: bimc
265             - const: ahb_aon
266             - const: q6ss_slave
267             - const: q6ss_master
268             - const: q6_axim
269
270   - if:
271       properties:
272         compatible:
273           contains:
274             enum:
275               - qcom,sc7180-mpss-pas
276     then:
277       properties:
278         clocks:
279           items:
280             - description: XO clock
281             - description: IFACE clock
282             - description: BUS clock
283             - description: NAC clock
284             - description: SNOC AXI clock
285             - description: MNOC AXI clock
286         clock-names:
287           items:
288             - const: xo
289             - const: iface
290             - const: bus
291             - const: nav
292             - const: snoc_axi
293             - const: mnoc_axi
294
295   - if:
296       properties:
297         compatible:
298           contains:
299             enum:
300               - qcom,msm8226-adsp-pil
301               - qcom,msm8974-adsp-pil
302               - qcom,msm8996-adsp-pil
303               - qcom,msm8996-slpi-pil
304               - qcom,msm8998-adsp-pas
305               - qcom,msm8998-slpi-pas
306               - qcom,qcs404-adsp-pas
307               - qcom,qcs404-cdsp-pas
308               - qcom,qcs404-wcss-pas
309               - qcom,sc8180x-adsp-pas
310               - qcom,sc8180x-cdsp-pas
311               - qcom,sc8280xp-adsp-pas
312               - qcom,sc8280xp-nsp0-pas
313               - qcom,sc8280xp-nsp1-pas
314               - qcom,sdm845-adsp-pas
315               - qcom,sdm845-cdsp-pas
316               - qcom,sm6350-adsp-pas
317               - qcom,sm6350-cdsp-pas
318               - qcom,sm8150-adsp-pas
319               - qcom,sm8150-cdsp-pas
320               - qcom,sm8150-slpi-pas
321               - qcom,sm8250-adsp-pas
322               - qcom,sm8250-cdsp-pas
323               - qcom,sm8250-slpi-pas
324               - qcom,sm8350-adsp-pas
325               - qcom,sm8350-cdsp-pas
326               - qcom,sm8350-slpi-pas
327               - qcom,sm8450-adsp-pas
328               - qcom,sm8450-cdsp-pas
329               - qcom,sm8450-slpi-pas
330     then:
331       properties:
332         interrupts:
333           maxItems: 5
334         interrupt-names:
335           maxItems: 5
336
337   - if:
338       properties:
339         compatible:
340           contains:
341             enum:
342               - qcom,sc7180-mpss-pas
343               - qcom,sc7280-mpss-pas
344               - qcom,sc8180x-mpss-pas
345               - qcom,sdx55-mpss-pas
346               - qcom,sm6350-mpss-pas
347               - qcom,sm8150-mpss-pas
348               - qcom,sm8350-mpss-pas
349               - qcom,sm8450-mpss-pas
350     then:
351       properties:
352         interrupts:
353           minItems: 6
354         interrupt-names:
355           minItems: 6
356
357   - if:
358       properties:
359         compatible:
360           contains:
361             enum:
362               - qcom,msm8974-adsp-pil
363     then:
364       required:
365         - cx-supply
366
367   - if:
368       properties:
369         compatible:
370           contains:
371             enum:
372               - qcom,msm8226-adsp-pil
373               - qcom,msm8996-adsp-pil
374               - qcom,msm8998-adsp-pas
375               - qcom,sm8150-adsp-pas
376               - qcom,sm8150-cdsp-pas
377     then:
378       properties:
379         power-domains:
380           items:
381             - description: CX power domain
382         power-domain-names:
383           items:
384             - const: cx
385
386   - if:
387       properties:
388         compatible:
389           contains:
390             enum:
391               - qcom,msm8996-slpi-pil
392               - qcom,msm8998-slpi-pas
393     then:
394       properties:
395         power-domains:
396           items:
397             - description: SSC-CX power domain
398         power-domain-names:
399           items:
400             - const: ssc_cx
401       required:
402         - px-supply
403
404   - if:
405       properties:
406         compatible:
407           contains:
408             enum:
409               - qcom,sc7180-mpss-pas
410     then:
411       properties:
412         power-domains:
413           items:
414             - description: CX power domain
415             - description: MX power domain
416             - description: MSS power domain
417         power-domain-names:
418           items:
419             - const: cx
420             - const: mx
421             - const: mss
422
423   - if:
424       properties:
425         compatible:
426           contains:
427             enum:
428               - qcom,sm6350-cdsp-pas
429     then:
430       properties:
431         power-domains:
432           items:
433             - description: CX power domain
434             - description: MX power domain
435         power-domain-names:
436           items:
437             - const: cx
438             - const: mx
439
440   - if:
441       properties:
442         compatible:
443           contains:
444             enum:
445               - qcom,sc7280-mpss-pas
446               - qcom,sdx55-mpss-pas
447               - qcom,sm6350-mpss-pas
448               - qcom,sm8150-mpss-pas
449               - qcom,sm8350-mpss-pas
450               - qcom,sm8450-mpss-pas
451     then:
452       properties:
453         power-domains:
454           items:
455             - description: CX power domain
456             - description: MSS power domain
457         power-domain-names:
458           items:
459             - const: cx
460             - const: mss
461
462   - if:
463       properties:
464         compatible:
465           contains:
466             enum:
467               - qcom,sc8180x-adsp-pas
468               - qcom,sc8180x-cdsp-pas
469               - qcom,sc8280xp-adsp-pas
470               - qcom,sm6350-adsp-pas
471               - qcom,sm8150-slpi-pas
472               - qcom,sm8250-adsp-pas
473               - qcom,sm8250-slpi-pas
474               - qcom,sm8350-adsp-pas
475               - qcom,sm8350-slpi-pas
476               - qcom,sm8450-adsp-pas
477               - qcom,sm8450-slpi-pas
478     then:
479       properties:
480         power-domains:
481           items:
482             - description: LCX power domain
483             - description: LMX power domain
484         power-domain-names:
485           items:
486             - const: lcx
487             - const: lmx
488
489   - if:
490       properties:
491         compatible:
492           contains:
493             enum:
494               - qcom,sm8350-cdsp-pas
495               - qcom,sm8450-cdsp-pas
496     then:
497       properties:
498         power-domains:
499           items:
500             - description: CX power domain
501             - description: MXC power domain
502         power-domain-names:
503           items:
504             - const: cx
505             - const: mxc
506
507   - if:
508       properties:
509         compatible:
510           contains:
511             enum:
512               - qcom,sc8280xp-nsp0-pas
513               - qcom,sc8280xp-nsp1-pas
514     then:
515       properties:
516         power-domains:
517           items:
518             - description: NSP power domain
519         power-domain-names:
520           items:
521             - const: nsp
522
523   - if:
524       properties:
525         compatible:
526           contains:
527             enum:
528               - qcom,qcs404-cdsp-pas
529     then:
530       properties:
531         resets:
532           items:
533             - description: CDSP restart
534         reset-names:
535           items:
536             - const: restart
537
538   - if:
539       properties:
540         compatible:
541           contains:
542             enum:
543               - qcom,sc7180-mpss-pas
544               - qcom,sc7280-mpss-pas
545     then:
546       properties:
547         resets:
548           items:
549             - description: MSS restart
550             - description: PDC reset
551         reset-names:
552           items:
553             - const: mss_restart
554             - const: pdc_reset
555
556   - if:
557       properties:
558         compatible:
559           contains:
560             enum:
561               - qcom,msm8226-adsp-pil
562               - qcom,msm8974-adsp-pil
563               - qcom,msm8996-adsp-pil
564               - qcom,msm8996-slpi-pil
565               - qcom,msm8998-adsp-pas
566               - qcom,msm8998-slpi-pas
567               - qcom,qcs404-adsp-pas
568               - qcom,qcs404-cdsp-pas
569               - qcom,qcs404-wcss-pas
570               - qcom,sdm660-adsp-pas
571               - qcom,sdx55-mpss-pas
572     then:
573       properties:
574         qcom,qmp: false
575
576 examples:
577   - |
578     #include <dt-bindings/clock/qcom,rpmcc.h>
579     #include <dt-bindings/interrupt-controller/arm-gic.h>
580     #include <dt-bindings/interrupt-controller/irq.h>
581     adsp {
582         compatible = "qcom,msm8974-adsp-pil";
583
584         interrupts-extended = <&intc GIC_SPI 162 IRQ_TYPE_EDGE_RISING>,
585                       <&adsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
586                       <&adsp_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
587                       <&adsp_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
588                       <&adsp_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
589         interrupt-names = "wdog",
590                   "fatal",
591                   "ready",
592                   "handover",
593                   "stop-ack";
594
595         clocks = <&rpmcc RPM_CXO_CLK>;
596         clock-names = "xo";
597
598         cx-supply = <&pm8841_s2>;
599
600         memory-region = <&adsp_region>;
601
602         qcom,smem-states = <&adsp_smp2p_out 0>;
603         qcom,smem-state-names = "stop";
604
605         smd-edge {
606             interrupts = <GIC_SPI 156 IRQ_TYPE_EDGE_RISING>;
607
608             qcom,ipc = <&apcs 8 8>;
609             qcom,smd-edge = <1>;
610         };
611     };