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