summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml
blob: 8e033b22d28cfa8203234f744b3b408e976e20c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/remoteproc/qcom,wcnss-pil.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm WCNSS Peripheral Image Loader

maintainers:
  - Bjorn Andersson <andersson@kernel.org>

description:
  This document defines the binding for a component that loads and boots
  firmware on the Qualcomm WCNSS core.

properties:
  compatible:
    description:
      Append "qcom,pronto" if the device is actually pronto, and not riva
    oneOf:
      - items:
          - enum:
              - qcom,pronto-v1-pil
              - qcom,pronto-v2-pil
              - qcom,pronto-v3-pil
          - const: qcom,pronto
      - const: qcom,riva-pil

  reg:
    maxItems: 3
    description:
      The base address and size of the CCU, DXE and PMU register blocks

  reg-names:
    items:
      - const: ccu
      - const: dxe
      - const: pmu

  interrupts:
    minItems: 2
    maxItems: 5

  interrupt-names:
    minItems: 2
    items:
      - const: wdog
      - const: fatal
      - const: ready
      - const: handover
      - const: stop-ack

  firmware-name:
    maxItems: 1
    description:
      Relative firmware image path for the WCNSS core. Defaults to
      "wcnss.mdt".

  vddpx-supply:
    description:
      PX regulator to be held on behalf of the booting of the WCNSS core

  vddmx-supply:
    description:
      MX regulator to be held on behalf of the booting of the WCNSS core.

  vddcx-supply:
    description:
      CX regulator to be held on behalf of the booting of the WCNSS core.

  power-domains:
    maxItems: 2

  power-domain-names:
    items:
      - const: cx
      - const: mx

  qcom,smem-states:
    $ref: /schemas/types.yaml#/definitions/phandle-array
    description:
      States used by the AP to signal the WCNSS core that it should shutdown
    items:
      - description: Stop the modem

  qcom,smem-state-names:
    description: The names of the state bits used for SMP2P output
    items:
      - const: stop

  memory-region:
    maxItems: 1
    description: reserved-memory for the WCNSS core

  smd-edge:
    $ref: /schemas/remoteproc/qcom,smd-edge.yaml#
    description:
      Qualcomm Shared Memory subnode which represents communication edge,
      channels and devices related to the ADSP.

  iris:
    type: object
    description:
      The iris subnode of the WCNSS PIL is used to describe the attached RF module
      and its resource dependencies.

    properties:
      compatible:
        enum:
          - qcom,wcn3620
          - qcom,wcn3660
          - qcom,wcn3660b
          - qcom,wcn3680

      clocks:
        minItems: 1
        items:
          - description: XO clock
          - description: RF clock

      clock-names:
        minItems: 1
        items:
          - const: xo
          - const: rf

      vddxo-supply:
        description:
          Reference to the regulator to be held on behalf of the booting WCNSS
          core

      vddrfa-supply:
        description:
          Reference to the regulator to be held on behalf of the booting WCNSS
          core

      vddpa-supply:
        description:
          Reference to the regulator to be held on behalf of the booting WCNSS
          core

      vdddig-supply:
        description:
          Reference to the regulator to be held on behalf of the booting WCNSS
          core

    required:
      - compatible
      - clocks
      - clock-names
      - vddxo-supply
      - vddrfa-supply
      - vddpa-supply
      - vdddig-supply

    additionalProperties: false

required:
  - compatible
  - reg
  - reg-names
  - interrupts
  - interrupt-names
  - iris
  - vddpx-supply
  - memory-region
  - smd-edge

additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: qcom,riva-pil
    then:
      required:
        - vddcx-supply
        - vddmx-supply

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,pronto-v1-pil
              - qcom,pronto-v2-pil
    then:
      properties:
        vddmx-supply:
          deprecated: true
          description: Deprecated for qcom,pronto-v1/2-pil

        vddcx-supply:
          deprecated: true
          description: Deprecated for qcom,pronto-v1/2-pil

      oneOf:
        - required:
            - power-domains
            - power-domain-names
        - required:
            - vddmx-supply
            - vddcx-supply

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,pronto-v3-pil
    then:
      properties:
        vddmx-supply: false
        vddcx-supply: false

      required:
        - power-domains
        - power-domain-names

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/clock/qcom,rpmcc.h>
    #include <dt-bindings/power/qcom-rpmpd.h>
    pronto@a21b000 {
        compatible = "qcom,pronto-v2-pil", "qcom,pronto";
        reg = <0x0a204000 0x2000>, <0x0a202000 0x1000>, <0x0a21b000 0x3000>;
        reg-names = "ccu", "dxe", "pmu";

        interrupts-extended = <&intc GIC_SPI 149 IRQ_TYPE_EDGE_RISING>,
                              <&wcnss_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
                              <&wcnss_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
                              <&wcnss_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
                              <&wcnss_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
        interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";

        power-domains = <&rpmpd MSM8916_VDDCX>, <&rpmpd MSM8916_VDDMX>;
        power-domain-names = "cx", "mx";

        vddpx-supply = <&pm8916_l7>;

        qcom,smem-states = <&wcnss_smp2p_out 0>;
        qcom,smem-state-names = "stop";

        memory-region = <&wcnss_region>;

        pinctrl-names = "default";
        pinctrl-0 = <&wcnss_pin_a>;

        iris {
            compatible = "qcom,wcn3620";
            vddxo-supply = <&pm8916_l7>;
            vddrfa-supply = <&pm8916_s3>;
            vddpa-supply = <&pm8916_l9>;
            vdddig-supply = <&pm8916_l5>;

            clocks = <&rpmcc RPM_SMD_RF_CLK2>;
            clock-names = "xo";
        };

        smd-edge {
            interrupts = <GIC_SPI 142 IRQ_TYPE_EDGE_RISING>;

            qcom,ipc = <&apcs 8 17>;
            qcom,smd-edge = <6>;
            qcom,remote-pid = <4>;

            label = "pronto";

            wcnss_ctrl: wcnss {
                compatible = "qcom,wcnss";
                qcom,smd-channels = "WCNSS_CTRL";

                qcom,mmio = <&pronto>;

                bluetooth {
                    compatible = "qcom,wcnss-bt";
                };

                wifi {
                    compatible = "qcom,wcnss-wlan";

                    interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
                                 <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
                    interrupt-names = "tx", "rx";

                    qcom,smem-states = <&apps_smsm 10>, <&apps_smsm 9>;
                    qcom,smem-state-names = "tx-enable", "tx-rings-empty";
                };
            };
        };
    };