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