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