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