1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
3%YAML 1.2
4---
5$id: http://devicetree.org/schemas/net/wireless/qcom,ath11k.yaml#
6$schema: http://devicetree.org/meta-schemas/core.yaml#
7
8title: Qualcomm Technologies ath11k wireless devices
9
10maintainers:
11  - Kalle Valo <kvalo@kernel.org>
12
13description: |
14  These are dt entries for Qualcomm Technologies, Inc. IEEE 802.11ax
15  devices, for example like AHB based IPQ8074.
16
17properties:
18  compatible:
19    enum:
20      - qcom,ipq8074-wifi
21      - qcom,ipq6018-wifi
22      - qcom,wcn6750-wifi
23
24  reg:
25    maxItems: 1
26
27  interrupts:
28    minItems: 32
29    maxItems: 52
30
31  interrupt-names:
32    maxItems: 52
33
34  qcom,rproc:
35    $ref: /schemas/types.yaml#/definitions/phandle
36    description:
37      DT entry of q6v5-wcss remoteproc driver.
38      Phandle to a node that can contain the following properties
39        * compatible
40        * reg
41        * reg-names
42
43  qcom,ath11k-calibration-variant:
44    $ref: /schemas/types.yaml#/definitions/string
45    description:
46      string to uniquely identify variant of the calibration data in the
47      board-2.bin for designs with colliding bus and device specific ids
48
49  memory-region:
50    minItems: 1
51    maxItems: 2
52    description:
53      phandle to a node describing reserved memory (System RAM memory)
54      used by ath11k firmware (see bindings/reserved-memory/reserved-memory.txt)
55
56  iommus:
57    minItems: 1
58    maxItems: 2
59
60  wifi-firmware:
61    type: object
62    description: |
63      WCN6750 wifi node can contain one optional firmware subnode.
64      Firmware subnode is needed when the platform does not have Trustzone.
65    required:
66      - iommus
67
68  qcom,smem-states:
69    $ref: /schemas/types.yaml#/definitions/phandle-array
70    description: State bits used by the AP to signal the WLAN Q6.
71    items:
72      - description: Signal bits used to enable/disable low power mode
73                     on WCN6750 in the case of WoW (Wake on Wireless).
74
75  qcom,smem-state-names:
76    description: The names of the state bits used for SMP2P output.
77    items:
78      - const: wlan-smp2p-out
79
80required:
81  - compatible
82  - reg
83  - interrupts
84  - qcom,rproc
85
86additionalProperties: false
87
88allOf:
89  - if:
90      properties:
91        compatible:
92          contains:
93            enum:
94              - qcom,ipq8074-wifi
95              - qcom,ipq6018-wifi
96    then:
97      properties:
98        interrupts:
99          items:
100            - description: misc-pulse1 interrupt events
101            - description: misc-latch interrupt events
102            - description: sw exception interrupt events
103            - description: watchdog interrupt events
104            - description: interrupt event for ring CE0
105            - description: interrupt event for ring CE1
106            - description: interrupt event for ring CE2
107            - description: interrupt event for ring CE3
108            - description: interrupt event for ring CE4
109            - description: interrupt event for ring CE5
110            - description: interrupt event for ring CE6
111            - description: interrupt event for ring CE7
112            - description: interrupt event for ring CE8
113            - description: interrupt event for ring CE9
114            - description: interrupt event for ring CE10
115            - description: interrupt event for ring CE11
116            - description: interrupt event for ring host2wbm-desc-feed
117            - description: interrupt event for ring host2reo-re-injection
118            - description: interrupt event for ring host2reo-command
119            - description: interrupt event for ring host2rxdma-monitor-ring3
120            - description: interrupt event for ring host2rxdma-monitor-ring2
121            - description: interrupt event for ring host2rxdma-monitor-ring1
122            - description: interrupt event for ring reo2ost-exception
123            - description: interrupt event for ring wbm2host-rx-release
124            - description: interrupt event for ring reo2host-status
125            - description: interrupt event for ring reo2host-destination-ring4
126            - description: interrupt event for ring reo2host-destination-ring3
127            - description: interrupt event for ring reo2host-destination-ring2
128            - description: interrupt event for ring reo2host-destination-ring1
129            - description: interrupt event for ring rxdma2host-monitor-destination-mac3
130            - description: interrupt event for ring rxdma2host-monitor-destination-mac2
131            - description: interrupt event for ring rxdma2host-monitor-destination-mac1
132            - description: interrupt event for ring ppdu-end-interrupts-mac3
133            - description: interrupt event for ring ppdu-end-interrupts-mac2
134            - description: interrupt event for ring ppdu-end-interrupts-mac1
135            - description: interrupt event for ring rxdma2host-monitor-status-ring-mac3
136            - description: interrupt event for ring rxdma2host-monitor-status-ring-mac2
137            - description: interrupt event for ring rxdma2host-monitor-status-ring-mac1
138            - description: interrupt event for ring host2rxdma-host-buf-ring-mac3
139            - description: interrupt event for ring host2rxdma-host-buf-ring-mac2
140            - description: interrupt event for ring host2rxdma-host-buf-ring-mac1
141            - description: interrupt event for ring rxdma2host-destination-ring-mac3
142            - description: interrupt event for ring rxdma2host-destination-ring-mac2
143            - description: interrupt event for ring rxdma2host-destination-ring-mac1
144            - description: interrupt event for ring host2tcl-input-ring4
145            - description: interrupt event for ring host2tcl-input-ring3
146            - description: interrupt event for ring host2tcl-input-ring2
147            - description: interrupt event for ring host2tcl-input-ring1
148            - description: interrupt event for ring wbm2host-tx-completions-ring3
149            - description: interrupt event for ring wbm2host-tx-completions-ring2
150            - description: interrupt event for ring wbm2host-tx-completions-ring1
151            - description: interrupt event for ring tcl2host-status-ring
152        interrupt-names:
153          items:
154            - const: misc-pulse1
155            - const: misc-latch
156            - const: sw-exception
157            - const: watchdog
158            - const: ce0
159            - const: ce1
160            - const: ce2
161            - const: ce3
162            - const: ce4
163            - const: ce5
164            - const: ce6
165            - const: ce7
166            - const: ce8
167            - const: ce9
168            - const: ce10
169            - const: ce11
170            - const: host2wbm-desc-feed
171            - const: host2reo-re-injection
172            - const: host2reo-command
173            - const: host2rxdma-monitor-ring3
174            - const: host2rxdma-monitor-ring2
175            - const: host2rxdma-monitor-ring1
176            - const: reo2ost-exception
177            - const: wbm2host-rx-release
178            - const: reo2host-status
179            - const: reo2host-destination-ring4
180            - const: reo2host-destination-ring3
181            - const: reo2host-destination-ring2
182            - const: reo2host-destination-ring1
183            - const: rxdma2host-monitor-destination-mac3
184            - const: rxdma2host-monitor-destination-mac2
185            - const: rxdma2host-monitor-destination-mac1
186            - const: ppdu-end-interrupts-mac3
187            - const: ppdu-end-interrupts-mac2
188            - const: ppdu-end-interrupts-mac1
189            - const: rxdma2host-monitor-status-ring-mac3
190            - const: rxdma2host-monitor-status-ring-mac2
191            - const: rxdma2host-monitor-status-ring-mac1
192            - const: host2rxdma-host-buf-ring-mac3
193            - const: host2rxdma-host-buf-ring-mac2
194            - const: host2rxdma-host-buf-ring-mac1
195            - const: rxdma2host-destination-ring-mac3
196            - const: rxdma2host-destination-ring-mac2
197            - const: rxdma2host-destination-ring-mac1
198            - const: host2tcl-input-ring4
199            - const: host2tcl-input-ring3
200            - const: host2tcl-input-ring2
201            - const: host2tcl-input-ring1
202            - const: wbm2host-tx-completions-ring3
203            - const: wbm2host-tx-completions-ring2
204            - const: wbm2host-tx-completions-ring1
205            - const: tcl2host-status-ring
206
207  - if:
208      properties:
209        compatible:
210          contains:
211            enum:
212              - qcom,ipq8074-wifi
213              - qcom,ipq6018-wifi
214    then:
215      required:
216        - interrupt-names
217
218  - if:
219      properties:
220        compatible:
221          contains:
222            enum:
223              - qcom,wcn6750-wifi
224    then:
225      properties:
226        interrupts:
227          items:
228            - description: interrupt event for ring CE1
229            - description: interrupt event for ring CE2
230            - description: interrupt event for ring CE3
231            - description: interrupt event for ring CE4
232            - description: interrupt event for ring CE5
233            - description: interrupt event for ring CE6
234            - description: interrupt event for ring CE7
235            - description: interrupt event for ring CE8
236            - description: interrupt event for ring CE9
237            - description: interrupt event for ring CE10
238            - description: interrupt event for ring DP1
239            - description: interrupt event for ring DP2
240            - description: interrupt event for ring DP3
241            - description: interrupt event for ring DP4
242            - description: interrupt event for ring DP5
243            - description: interrupt event for ring DP6
244            - description: interrupt event for ring DP7
245            - description: interrupt event for ring DP8
246            - description: interrupt event for ring DP9
247            - description: interrupt event for ring DP10
248            - description: interrupt event for ring DP11
249            - description: interrupt event for ring DP12
250            - description: interrupt event for ring DP13
251            - description: interrupt event for ring DP14
252            - description: interrupt event for ring DP15
253            - description: interrupt event for ring DP16
254            - description: interrupt event for ring DP17
255            - description: interrupt event for ring DP18
256            - description: interrupt event for ring DP19
257            - description: interrupt event for ring DP20
258            - description: interrupt event for ring DP21
259            - description: interrupt event for ring DP22
260
261examples:
262  - |
263
264    q6v5_wcss: remoteproc@cd00000 {
265        compatible = "qcom,ipq8074-wcss-pil";
266        reg = <0xcd00000 0x4040>,
267              <0x4ab000 0x20>;
268        reg-names = "qdsp6",
269                    "rmb";
270    };
271
272    wifi0: wifi@c000000 {
273        compatible = "qcom,ipq8074-wifi";
274        reg = <0xc000000 0x2000000>;
275        interrupts = <0 320 1>,
276                     <0 319 1>,
277                     <0 318 1>,
278                     <0 317 1>,
279                     <0 316 1>,
280                     <0 315 1>,
281                     <0 314 1>,
282                     <0 311 1>,
283                     <0 310 1>,
284                     <0 411 1>,
285                     <0 410 1>,
286                     <0 40 1>,
287                     <0 39 1>,
288                     <0 302 1>,
289                     <0 301 1>,
290                     <0 37 1>,
291                     <0 36 1>,
292                     <0 296 1>,
293                     <0 295 1>,
294                     <0 294 1>,
295                     <0 293 1>,
296                     <0 292 1>,
297                     <0 291 1>,
298                     <0 290 1>,
299                     <0 289 1>,
300                     <0 288 1>,
301                     <0 239 1>,
302                     <0 236 1>,
303                     <0 235 1>,
304                     <0 234 1>,
305                     <0 233 1>,
306                     <0 232 1>,
307                     <0 231 1>,
308                     <0 230 1>,
309                     <0 229 1>,
310                     <0 228 1>,
311                     <0 224 1>,
312                     <0 223 1>,
313                     <0 203 1>,
314                     <0 183 1>,
315                     <0 180 1>,
316                     <0 179 1>,
317                     <0 178 1>,
318                     <0 177 1>,
319                     <0 176 1>,
320                     <0 163 1>,
321                     <0 162 1>,
322                     <0 160 1>,
323                     <0 159 1>,
324                     <0 158 1>,
325                     <0 157 1>,
326                     <0 156 1>;
327        interrupt-names = "misc-pulse1",
328                          "misc-latch",
329                          "sw-exception",
330                          "watchdog",
331                          "ce0",
332                          "ce1",
333                          "ce2",
334                          "ce3",
335                          "ce4",
336                          "ce5",
337                          "ce6",
338                          "ce7",
339                          "ce8",
340                          "ce9",
341                          "ce10",
342                          "ce11",
343                          "host2wbm-desc-feed",
344                          "host2reo-re-injection",
345                          "host2reo-command",
346                          "host2rxdma-monitor-ring3",
347                          "host2rxdma-monitor-ring2",
348                          "host2rxdma-monitor-ring1",
349                          "reo2ost-exception",
350                          "wbm2host-rx-release",
351                          "reo2host-status",
352                          "reo2host-destination-ring4",
353                          "reo2host-destination-ring3",
354                          "reo2host-destination-ring2",
355                          "reo2host-destination-ring1",
356                          "rxdma2host-monitor-destination-mac3",
357                          "rxdma2host-monitor-destination-mac2",
358                          "rxdma2host-monitor-destination-mac1",
359                          "ppdu-end-interrupts-mac3",
360                          "ppdu-end-interrupts-mac2",
361                          "ppdu-end-interrupts-mac1",
362                          "rxdma2host-monitor-status-ring-mac3",
363                          "rxdma2host-monitor-status-ring-mac2",
364                          "rxdma2host-monitor-status-ring-mac1",
365                          "host2rxdma-host-buf-ring-mac3",
366                          "host2rxdma-host-buf-ring-mac2",
367                          "host2rxdma-host-buf-ring-mac1",
368                          "rxdma2host-destination-ring-mac3",
369                          "rxdma2host-destination-ring-mac2",
370                          "rxdma2host-destination-ring-mac1",
371                          "host2tcl-input-ring4",
372                          "host2tcl-input-ring3",
373                          "host2tcl-input-ring2",
374                          "host2tcl-input-ring1",
375                          "wbm2host-tx-completions-ring3",
376                          "wbm2host-tx-completions-ring2",
377                          "wbm2host-tx-completions-ring1",
378                          "tcl2host-status-ring";
379        qcom,rproc = <&q6v5_wcss>;
380    };
381
382  - |
383
384    reserved-memory {
385        #address-cells = <2>;
386        #size-cells = <2>;
387
388        qcn9074_0: wifi@51100000 {
389            no-map;
390            reg = <0x0 0x51100000 0x0 0x03500000>;
391        };
392    };
393
394    pci {
395        pcie0 {
396            #size-cells = <2>;
397            #address-cells = <3>;
398
399            wifi_0: wifi@0 {
400                reg = <0 0 0 0 0>;
401                memory-region = <&qcn9074_0>;
402            };
403        };
404    };
405
406  - |
407    #include <dt-bindings/interrupt-controller/arm-gic.h>
408
409    reserved-memory {
410        #address-cells = <2>;
411        #size-cells = <2>;
412
413        wlan_ce_mem: memory@4cd000 {
414            no-map;
415            reg = <0x0 0x004cd000 0x0 0x1000>;
416        };
417
418        wlan_fw_mem: memory@80c00000 {
419            no-map;
420            reg = <0x0 0x80c00000 0x0 0xc00000>;
421        };
422    };
423
424    wifi: wifi@17a10040 {
425        compatible = "qcom,wcn6750-wifi";
426        reg = <0x17a10040 0x0>;
427        iommus = <&apps_smmu 0x1c00 0x1>;
428        interrupts = <GIC_SPI 768 IRQ_TYPE_EDGE_RISING>,
429                     <GIC_SPI 769 IRQ_TYPE_EDGE_RISING>,
430                     <GIC_SPI 770 IRQ_TYPE_EDGE_RISING>,
431                     <GIC_SPI 771 IRQ_TYPE_EDGE_RISING>,
432                     <GIC_SPI 772 IRQ_TYPE_EDGE_RISING>,
433                     <GIC_SPI 773 IRQ_TYPE_EDGE_RISING>,
434                     <GIC_SPI 774 IRQ_TYPE_EDGE_RISING>,
435                     <GIC_SPI 775 IRQ_TYPE_EDGE_RISING>,
436                     <GIC_SPI 776 IRQ_TYPE_EDGE_RISING>,
437                     <GIC_SPI 777 IRQ_TYPE_EDGE_RISING>,
438                     <GIC_SPI 778 IRQ_TYPE_EDGE_RISING>,
439                     <GIC_SPI 779 IRQ_TYPE_EDGE_RISING>,
440                     <GIC_SPI 780 IRQ_TYPE_EDGE_RISING>,
441                     <GIC_SPI 781 IRQ_TYPE_EDGE_RISING>,
442                     <GIC_SPI 782 IRQ_TYPE_EDGE_RISING>,
443                     <GIC_SPI 783 IRQ_TYPE_EDGE_RISING>,
444                     <GIC_SPI 784 IRQ_TYPE_EDGE_RISING>,
445                     <GIC_SPI 785 IRQ_TYPE_EDGE_RISING>,
446                     <GIC_SPI 786 IRQ_TYPE_EDGE_RISING>,
447                     <GIC_SPI 787 IRQ_TYPE_EDGE_RISING>,
448                     <GIC_SPI 788 IRQ_TYPE_EDGE_RISING>,
449                     <GIC_SPI 789 IRQ_TYPE_EDGE_RISING>,
450                     <GIC_SPI 790 IRQ_TYPE_EDGE_RISING>,
451                     <GIC_SPI 791 IRQ_TYPE_EDGE_RISING>,
452                     <GIC_SPI 792 IRQ_TYPE_EDGE_RISING>,
453                     <GIC_SPI 793 IRQ_TYPE_EDGE_RISING>,
454                     <GIC_SPI 794 IRQ_TYPE_EDGE_RISING>,
455                     <GIC_SPI 795 IRQ_TYPE_EDGE_RISING>,
456                     <GIC_SPI 796 IRQ_TYPE_EDGE_RISING>,
457                     <GIC_SPI 797 IRQ_TYPE_EDGE_RISING>,
458                     <GIC_SPI 798 IRQ_TYPE_EDGE_RISING>,
459                     <GIC_SPI 799 IRQ_TYPE_EDGE_RISING>;
460        qcom,rproc = <&remoteproc_wpss>;
461        memory-region = <&wlan_fw_mem>, <&wlan_ce_mem>;
462        qcom,smem-states = <&wlan_smp2p_out 0>;
463        qcom,smem-state-names = "wlan-smp2p-out";
464        wifi-firmware {
465            iommus = <&apps_smmu 0x1c02 0x1>;
466        };
467    };
468