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