1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/remoteproc/qcom,wcnss-pil.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm WCNSS Peripheral Image Loader
8
9maintainers:
10  - Bjorn Andersson <andersson@kernel.org>
11
12description:
13  This document defines the binding for a component that loads and boots
14  firmware on the Qualcomm WCNSS core.
15
16properties:
17  compatible:
18    description:
19      Append "qcom,pronto" if the device is actually pronto, and not riva
20    oneOf:
21      - items:
22          - enum:
23              - qcom,pronto-v1-pil
24              - qcom,pronto-v2-pil
25              - qcom,pronto-v3-pil
26          - const: qcom,pronto
27      - const: qcom,riva-pil
28
29  reg:
30    maxItems: 3
31    description:
32      The base address and size of the CCU, DXE and PMU register blocks
33
34  reg-names:
35    items:
36      - const: ccu
37      - const: dxe
38      - const: pmu
39
40  interrupts:
41    minItems: 2
42    maxItems: 5
43
44  interrupt-names:
45    minItems: 2
46    items:
47      - const: wdog
48      - const: fatal
49      - const: ready
50      - const: handover
51      - const: stop-ack
52
53  firmware-name:
54    $ref: /schemas/types.yaml#/definitions/string
55    description:
56      Relative firmware image path for the WCNSS core. Defaults to
57      "wcnss.mdt".
58
59  vddpx-supply:
60    description:
61      PX regulator to be held on behalf of the booting of the WCNSS core
62
63  vddmx-supply:
64    description:
65      MX regulator to be held on behalf of the booting of the WCNSS core.
66
67  vddcx-supply:
68    description:
69      CX regulator to be held on behalf of the booting of the WCNSS core.
70
71  power-domains:
72    maxItems: 2
73
74  power-domain-names:
75    items:
76      - const: cx
77      - const: mx
78
79  qcom,smem-states:
80    $ref: /schemas/types.yaml#/definitions/phandle-array
81    description:
82      States used by the AP to signal the WCNSS core that it should shutdown
83    items:
84      - description: Stop the modem
85
86  qcom,smem-state-names:
87    description: The names of the state bits used for SMP2P output
88    items:
89      - const: stop
90
91  memory-region:
92    maxItems: 1
93    description: reserved-memory for the WCNSS core
94
95  smd-edge:
96    $ref: /schemas/remoteproc/qcom,smd-edge.yaml#
97    description:
98      Qualcomm Shared Memory subnode which represents communication edge,
99      channels and devices related to the ADSP.
100
101  iris:
102    type: object
103    description:
104      The iris subnode of the WCNSS PIL is used to describe the attached RF module
105      and its resource dependencies.
106
107    properties:
108      compatible:
109        enum:
110          - qcom,wcn3620
111          - qcom,wcn3660
112          - qcom,wcn3660b
113          - qcom,wcn3680
114
115      clocks:
116        minItems: 1
117        items:
118          - description: XO clock
119          - description: RF clock
120
121      clock-names:
122        minItems: 1
123        items:
124          - const: xo
125          - const: rf
126
127      vddxo-supply:
128        description:
129          Reference to the regulator to be held on behalf of the booting WCNSS
130          core
131
132      vddrfa-supply:
133        description:
134          Reference to the regulator to be held on behalf of the booting WCNSS
135          core
136
137      vddpa-supply:
138        description:
139          Reference to the regulator to be held on behalf of the booting WCNSS
140          core
141
142      vdddig-supply:
143        description:
144          Reference to the regulator to be held on behalf of the booting WCNSS
145          core
146
147    required:
148      - compatible
149      - clocks
150      - clock-names
151      - vddxo-supply
152      - vddrfa-supply
153      - vddpa-supply
154      - vdddig-supply
155
156    additionalProperties: false
157
158required:
159  - compatible
160  - reg
161  - reg-names
162  - interrupts
163  - interrupt-names
164  - iris
165  - vddpx-supply
166  - memory-region
167  - smd-edge
168
169additionalProperties: false
170
171allOf:
172  - if:
173      properties:
174        compatible:
175          contains:
176            const: qcom,riva-pil
177    then:
178      required:
179        - vddcx-supply
180        - vddmx-supply
181
182  - if:
183      properties:
184        compatible:
185          contains:
186            enum:
187              - qcom,pronto-v1-pil
188              - qcom,pronto-v2-pil
189    then:
190      properties:
191        vddmx-supply:
192          deprecated: true
193          description: Deprecated for qcom,pronto-v1/2-pil
194
195        vddcx-supply:
196          deprecated: true
197          description: Deprecated for qcom,pronto-v1/2-pil
198
199      oneOf:
200        - required:
201            - power-domains
202            - power-domain-names
203        - required:
204            - vddmx-supply
205            - vddcx-supply
206
207  - if:
208      properties:
209        compatible:
210          contains:
211            enum:
212              - qcom,pronto-v3-pil
213    then:
214      properties:
215        vddmx-supply: false
216        vddcx-supply: false
217
218      required:
219        - power-domains
220        - power-domain-names
221
222examples:
223  - |
224    #include <dt-bindings/interrupt-controller/arm-gic.h>
225    #include <dt-bindings/clock/qcom,rpmcc.h>
226    #include <dt-bindings/power/qcom-rpmpd.h>
227    pronto@a21b000 {
228        compatible = "qcom,pronto-v2-pil", "qcom,pronto";
229        reg = <0x0a204000 0x2000>, <0x0a202000 0x1000>, <0x0a21b000 0x3000>;
230        reg-names = "ccu", "dxe", "pmu";
231
232        interrupts-extended = <&intc GIC_SPI 149 IRQ_TYPE_EDGE_RISING>,
233                              <&wcnss_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
234                              <&wcnss_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
235                              <&wcnss_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
236                              <&wcnss_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
237        interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";
238
239        power-domains = <&rpmpd MSM8916_VDDCX>, <&rpmpd MSM8916_VDDMX>;
240        power-domain-names = "cx", "mx";
241
242        vddpx-supply = <&pm8916_l7>;
243
244        qcom,smem-states = <&wcnss_smp2p_out 0>;
245        qcom,smem-state-names = "stop";
246
247        memory-region = <&wcnss_region>;
248
249        pinctrl-names = "default";
250        pinctrl-0 = <&wcnss_pin_a>;
251
252        iris {
253            compatible = "qcom,wcn3620";
254            vddxo-supply = <&pm8916_l7>;
255            vddrfa-supply = <&pm8916_s3>;
256            vddpa-supply = <&pm8916_l9>;
257            vdddig-supply = <&pm8916_l5>;
258
259            clocks = <&rpmcc RPM_SMD_RF_CLK2>;
260            clock-names = "xo";
261        };
262
263        smd-edge {
264            interrupts = <GIC_SPI 142 IRQ_TYPE_EDGE_RISING>;
265
266            qcom,ipc = <&apcs 8 17>;
267            qcom,smd-edge = <6>;
268            qcom,remote-pid = <4>;
269
270            label = "pronto";
271
272            wcnss_ctrl: wcnss {
273                compatible = "qcom,wcnss";
274                qcom,smd-channels = "WCNSS_CTRL";
275
276                qcom,mmio = <&pronto>;
277
278                bluetooth {
279                    compatible = "qcom,wcnss-bt";
280                };
281
282                wifi {
283                    compatible = "qcom,wcnss-wlan";
284
285                    interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
286                                 <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
287                    interrupt-names = "tx", "rx";
288
289                    qcom,smem-states = <&apps_smsm 10>, <&apps_smsm 9>;
290                    qcom,smem-state-names = "tx-enable", "tx-rings-empty";
291                };
292            };
293        };
294    };
295