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