xref: /freebsd/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,mt7622-wed.yaml (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2d5b0e70fSEmmanuel Vadot%YAML 1.2
3d5b0e70fSEmmanuel Vadot---
4fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/arm/mediatek/mediatek,mt7622-wed.yaml#
5fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6d5b0e70fSEmmanuel Vadot
7d5b0e70fSEmmanuel Vadottitle: MediaTek Wireless Ethernet Dispatch Controller for MT7622
8d5b0e70fSEmmanuel Vadot
9d5b0e70fSEmmanuel Vadotmaintainers:
10d5b0e70fSEmmanuel Vadot  - Lorenzo Bianconi <lorenzo@kernel.org>
11d5b0e70fSEmmanuel Vadot  - Felix Fietkau <nbd@nbd.name>
12d5b0e70fSEmmanuel Vadot
13d5b0e70fSEmmanuel Vadotdescription:
14d5b0e70fSEmmanuel Vadot  The mediatek wireless ethernet dispatch controller can be configured to
15d5b0e70fSEmmanuel Vadot  intercept and handle access to the WLAN DMA queues and PCIe interrupts
16d5b0e70fSEmmanuel Vadot  and implement hardware flow offloading from ethernet to WLAN.
17d5b0e70fSEmmanuel Vadot
18d5b0e70fSEmmanuel Vadotproperties:
19d5b0e70fSEmmanuel Vadot  compatible:
20d5b0e70fSEmmanuel Vadot    items:
21d5b0e70fSEmmanuel Vadot      - enum:
22d5b0e70fSEmmanuel Vadot          - mediatek,mt7622-wed
23fac71e4eSEmmanuel Vadot          - mediatek,mt7981-wed
247ef62cebSEmmanuel Vadot          - mediatek,mt7986-wed
25*84943d6fSEmmanuel Vadot          - mediatek,mt7988-wed
26d5b0e70fSEmmanuel Vadot      - const: syscon
27d5b0e70fSEmmanuel Vadot
28d5b0e70fSEmmanuel Vadot  reg:
29d5b0e70fSEmmanuel Vadot    maxItems: 1
30d5b0e70fSEmmanuel Vadot
31d5b0e70fSEmmanuel Vadot  interrupts:
32d5b0e70fSEmmanuel Vadot    maxItems: 1
33d5b0e70fSEmmanuel Vadot
348bab661aSEmmanuel Vadot  memory-region:
358bab661aSEmmanuel Vadot    items:
368bab661aSEmmanuel Vadot      - description: firmware EMI region
378bab661aSEmmanuel Vadot      - description: firmware ILM region
388bab661aSEmmanuel Vadot      - description: firmware DLM region
398bab661aSEmmanuel Vadot      - description: firmware CPU DATA region
408bab661aSEmmanuel Vadot      - description: firmware BOOT region
418bab661aSEmmanuel Vadot
428bab661aSEmmanuel Vadot  memory-region-names:
438bab661aSEmmanuel Vadot    items:
448bab661aSEmmanuel Vadot      - const: wo-emi
458bab661aSEmmanuel Vadot      - const: wo-ilm
468bab661aSEmmanuel Vadot      - const: wo-dlm
478bab661aSEmmanuel Vadot      - const: wo-data
488bab661aSEmmanuel Vadot      - const: wo-boot
498bab661aSEmmanuel Vadot
508bab661aSEmmanuel Vadot  mediatek,wo-ccif:
518bab661aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
528bab661aSEmmanuel Vadot    description: mediatek wed-wo controller interface.
538bab661aSEmmanuel Vadot
548bab661aSEmmanuel VadotallOf:
558bab661aSEmmanuel Vadot  - if:
568bab661aSEmmanuel Vadot      properties:
578bab661aSEmmanuel Vadot        compatible:
588bab661aSEmmanuel Vadot          contains:
598bab661aSEmmanuel Vadot            const: mediatek,mt7622-wed
608bab661aSEmmanuel Vadot    then:
618bab661aSEmmanuel Vadot      properties:
628bab661aSEmmanuel Vadot        memory-region-names: false
638bab661aSEmmanuel Vadot        memory-region: false
648bab661aSEmmanuel Vadot        mediatek,wo-ccif: false
658bab661aSEmmanuel Vadot
66d5b0e70fSEmmanuel Vadotrequired:
67d5b0e70fSEmmanuel Vadot  - compatible
68d5b0e70fSEmmanuel Vadot  - reg
69d5b0e70fSEmmanuel Vadot  - interrupts
70d5b0e70fSEmmanuel Vadot
71d5b0e70fSEmmanuel VadotadditionalProperties: false
72d5b0e70fSEmmanuel Vadot
73d5b0e70fSEmmanuel Vadotexamples:
74d5b0e70fSEmmanuel Vadot  - |
75d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
76d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
77d5b0e70fSEmmanuel Vadot    soc {
78d5b0e70fSEmmanuel Vadot      #address-cells = <2>;
79d5b0e70fSEmmanuel Vadot      #size-cells = <2>;
80d5b0e70fSEmmanuel Vadot      wed0: wed@1020a000 {
81d5b0e70fSEmmanuel Vadot        compatible = "mediatek,mt7622-wed","syscon";
82d5b0e70fSEmmanuel Vadot        reg = <0 0x1020a000 0 0x1000>;
83d5b0e70fSEmmanuel Vadot        interrupts = <GIC_SPI 214 IRQ_TYPE_LEVEL_LOW>;
84d5b0e70fSEmmanuel Vadot      };
85d5b0e70fSEmmanuel Vadot    };
868bab661aSEmmanuel Vadot
878bab661aSEmmanuel Vadot  - |
888bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
898bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
908bab661aSEmmanuel Vadot    soc {
918bab661aSEmmanuel Vadot      #address-cells = <2>;
928bab661aSEmmanuel Vadot      #size-cells = <2>;
938bab661aSEmmanuel Vadot
948bab661aSEmmanuel Vadot      wed@15010000 {
958bab661aSEmmanuel Vadot        compatible = "mediatek,mt7986-wed", "syscon";
968bab661aSEmmanuel Vadot        reg = <0 0x15010000 0 0x1000>;
978bab661aSEmmanuel Vadot        interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
988bab661aSEmmanuel Vadot
998bab661aSEmmanuel Vadot        memory-region = <&wo_emi>, <&wo_ilm>, <&wo_dlm>,
1008bab661aSEmmanuel Vadot                        <&wo_data>, <&wo_boot>;
1018bab661aSEmmanuel Vadot        memory-region-names = "wo-emi", "wo-ilm", "wo-dlm",
1028bab661aSEmmanuel Vadot                              "wo-data", "wo-boot";
1038bab661aSEmmanuel Vadot        mediatek,wo-ccif = <&wo_ccif0>;
1048bab661aSEmmanuel Vadot      };
1058bab661aSEmmanuel Vadot    };
106