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
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,msm8226-adsp-pil
20      - qcom,msm8953-adsp-pil
21      - qcom,msm8974-adsp-pil
22      - qcom,msm8996-adsp-pil
23      - qcom,msm8996-slpi-pil
24      - qcom,msm8998-adsp-pas
25      - qcom,msm8998-slpi-pas
26      - qcom,sdm660-adsp-pas
27      - qcom,sdm845-adsp-pas
28      - qcom,sdm845-cdsp-pas
29      - qcom,sdm845-slpi-pas
30
31  reg:
32    maxItems: 1
33
34  cx-supply:
35    description: Phandle to the CX regulator
36
37  px-supply:
38    description: Phandle to the PX regulator
39
40  qcom,qmp:
41    $ref: /schemas/types.yaml#/definitions/phandle
42    description: Reference to the AOSS side-channel message RAM.
43
44  memory-region:
45    maxItems: 1
46    description: Reference to the reserved-memory for the Hexagon core
47
48  firmware-name:
49    maxItems: 1
50    description: Firmware name for the Hexagon core
51
52required:
53  - compatible
54  - memory-region
55
56unevaluatedProperties: false
57
58allOf:
59  - $ref: /schemas/remoteproc/qcom,pas-common.yaml#
60  - if:
61      properties:
62        compatible:
63          contains:
64            enum:
65              - qcom,msm8226-adsp-pil
66              - qcom,msm8953-adsp-pil
67              - qcom,msm8974-adsp-pil
68              - qcom,msm8996-adsp-pil
69              - qcom,msm8998-adsp-pas
70              - qcom,sdm845-adsp-pas
71              - qcom,sdm845-cdsp-pas
72              - qcom,sdm845-slpi-pas
73    then:
74      properties:
75        clocks:
76          items:
77            - description: XO clock
78        clock-names:
79          items:
80            - const: xo
81
82  - if:
83      properties:
84        compatible:
85          contains:
86            enum:
87              - qcom,msm8996-slpi-pil
88              - qcom,msm8998-slpi-pas
89    then:
90      properties:
91        clocks:
92          items:
93            - description: XO clock
94            - description: AGGRE2 clock
95        clock-names:
96          items:
97            - const: xo
98            - const: aggre2
99
100  - if:
101      properties:
102        compatible:
103          contains:
104            enum:
105              - qcom,msm8226-adsp-pil
106              - qcom,msm8953-adsp-pil
107              - qcom,msm8974-adsp-pil
108              - qcom,msm8996-adsp-pil
109              - qcom,msm8996-slpi-pil
110              - qcom,msm8998-adsp-pas
111              - qcom,msm8998-slpi-pas
112              - qcom,sdm845-adsp-pas
113              - qcom,sdm845-cdsp-pas
114              - qcom,sdm845-slpi-pas
115    then:
116      properties:
117        interrupts:
118          maxItems: 5
119        interrupt-names:
120          maxItems: 5
121
122  - if:
123      properties:
124        compatible:
125          contains:
126            enum:
127              - qcom,msm8974-adsp-pil
128    then:
129      required:
130        - cx-supply
131
132  - if:
133      properties:
134        compatible:
135          contains:
136            enum:
137              - qcom,msm8226-adsp-pil
138              - qcom,msm8953-adsp-pil
139              - qcom,msm8996-adsp-pil
140              - qcom,msm8998-adsp-pas
141    then:
142      properties:
143        power-domains:
144          items:
145            - description: CX power domain
146        power-domain-names:
147          items:
148            - const: cx
149
150  - if:
151      properties:
152        compatible:
153          contains:
154            enum:
155              - qcom,msm8996-slpi-pil
156              - qcom,msm8998-slpi-pas
157    then:
158      properties:
159        power-domains:
160          items:
161            - description: SSC-CX power domain
162        power-domain-names:
163          items:
164            - const: ssc_cx
165      required:
166        - px-supply
167
168  - if:
169      properties:
170        compatible:
171          enum:
172            - qcom,sdm845-slpi-pas
173    then:
174      properties:
175        power-domains:
176          items:
177            - description: LCX power domain
178            - description: LMX power domain
179        power-domain-names:
180          items:
181            - const: lcx
182            - const: lmx
183
184  - if:
185      properties:
186        compatible:
187          contains:
188            enum:
189              - qcom,msm8226-adsp-pil
190              - qcom,msm8953-adsp-pil
191              - qcom,msm8974-adsp-pil
192              - qcom,msm8996-adsp-pil
193              - qcom,msm8996-slpi-pil
194              - qcom,msm8998-adsp-pas
195              - qcom,msm8998-slpi-pas
196              - qcom,sdm660-adsp-pas
197    then:
198      properties:
199        qcom,qmp: false
200
201examples:
202  - |
203    #include <dt-bindings/clock/qcom,rpmcc.h>
204    #include <dt-bindings/interrupt-controller/arm-gic.h>
205    #include <dt-bindings/interrupt-controller/irq.h>
206    adsp {
207        compatible = "qcom,msm8974-adsp-pil";
208
209        interrupts-extended = <&intc GIC_SPI 162 IRQ_TYPE_EDGE_RISING>,
210                      <&adsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
211                      <&adsp_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
212                      <&adsp_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
213                      <&adsp_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
214        interrupt-names = "wdog",
215                  "fatal",
216                  "ready",
217                  "handover",
218                  "stop-ack";
219
220        clocks = <&rpmcc RPM_CXO_CLK>;
221        clock-names = "xo";
222
223        cx-supply = <&pm8841_s2>;
224
225        memory-region = <&adsp_region>;
226
227        qcom,smem-states = <&adsp_smp2p_out 0>;
228        qcom,smem-state-names = "stop";
229
230        smd-edge {
231            interrupts = <GIC_SPI 156 IRQ_TYPE_EDGE_RISING>;
232
233            qcom,ipc = <&apcs 8 8>;
234            qcom,smd-edge = <1>;
235        };
236    };
237