xref: /freebsd/sys/contrib/device-tree/Bindings/arm/mediatek/mediatek,mt7622-wed.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2d5b0e70fSEmmanuel Vadot%YAML 1.2
3d5b0e70fSEmmanuel Vadot---
4*fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/arm/mediatek/mediatek,mt7622-wed.yaml#
5*fac71e4eSEmmanuel 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
23*fac71e4eSEmmanuel Vadot          - mediatek,mt7981-wed
247ef62cebSEmmanuel Vadot          - mediatek,mt7986-wed
25d5b0e70fSEmmanuel Vadot      - const: syscon
26d5b0e70fSEmmanuel Vadot
27d5b0e70fSEmmanuel Vadot  reg:
28d5b0e70fSEmmanuel Vadot    maxItems: 1
29d5b0e70fSEmmanuel Vadot
30d5b0e70fSEmmanuel Vadot  interrupts:
31d5b0e70fSEmmanuel Vadot    maxItems: 1
32d5b0e70fSEmmanuel Vadot
338bab661aSEmmanuel Vadot  memory-region:
348bab661aSEmmanuel Vadot    items:
358bab661aSEmmanuel Vadot      - description: firmware EMI region
368bab661aSEmmanuel Vadot      - description: firmware ILM region
378bab661aSEmmanuel Vadot      - description: firmware DLM region
388bab661aSEmmanuel Vadot      - description: firmware CPU DATA region
398bab661aSEmmanuel Vadot      - description: firmware BOOT region
408bab661aSEmmanuel Vadot
418bab661aSEmmanuel Vadot  memory-region-names:
428bab661aSEmmanuel Vadot    items:
438bab661aSEmmanuel Vadot      - const: wo-emi
448bab661aSEmmanuel Vadot      - const: wo-ilm
458bab661aSEmmanuel Vadot      - const: wo-dlm
468bab661aSEmmanuel Vadot      - const: wo-data
478bab661aSEmmanuel Vadot      - const: wo-boot
488bab661aSEmmanuel Vadot
498bab661aSEmmanuel Vadot  mediatek,wo-ccif:
508bab661aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
518bab661aSEmmanuel Vadot    description: mediatek wed-wo controller interface.
528bab661aSEmmanuel Vadot
538bab661aSEmmanuel VadotallOf:
548bab661aSEmmanuel Vadot  - if:
558bab661aSEmmanuel Vadot      properties:
568bab661aSEmmanuel Vadot        compatible:
578bab661aSEmmanuel Vadot          contains:
588bab661aSEmmanuel Vadot            const: mediatek,mt7622-wed
598bab661aSEmmanuel Vadot    then:
608bab661aSEmmanuel Vadot      properties:
618bab661aSEmmanuel Vadot        memory-region-names: false
628bab661aSEmmanuel Vadot        memory-region: false
638bab661aSEmmanuel Vadot        mediatek,wo-ccif: false
648bab661aSEmmanuel Vadot
65d5b0e70fSEmmanuel Vadotrequired:
66d5b0e70fSEmmanuel Vadot  - compatible
67d5b0e70fSEmmanuel Vadot  - reg
68d5b0e70fSEmmanuel Vadot  - interrupts
69d5b0e70fSEmmanuel Vadot
70d5b0e70fSEmmanuel VadotadditionalProperties: false
71d5b0e70fSEmmanuel Vadot
72d5b0e70fSEmmanuel Vadotexamples:
73d5b0e70fSEmmanuel Vadot  - |
74d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
75d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
76d5b0e70fSEmmanuel Vadot    soc {
77d5b0e70fSEmmanuel Vadot      #address-cells = <2>;
78d5b0e70fSEmmanuel Vadot      #size-cells = <2>;
79d5b0e70fSEmmanuel Vadot      wed0: wed@1020a000 {
80d5b0e70fSEmmanuel Vadot        compatible = "mediatek,mt7622-wed","syscon";
81d5b0e70fSEmmanuel Vadot        reg = <0 0x1020a000 0 0x1000>;
82d5b0e70fSEmmanuel Vadot        interrupts = <GIC_SPI 214 IRQ_TYPE_LEVEL_LOW>;
83d5b0e70fSEmmanuel Vadot      };
84d5b0e70fSEmmanuel Vadot    };
858bab661aSEmmanuel Vadot
868bab661aSEmmanuel Vadot  - |
878bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
888bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
898bab661aSEmmanuel Vadot    soc {
908bab661aSEmmanuel Vadot      #address-cells = <2>;
918bab661aSEmmanuel Vadot      #size-cells = <2>;
928bab661aSEmmanuel Vadot
938bab661aSEmmanuel Vadot      wed@15010000 {
948bab661aSEmmanuel Vadot        compatible = "mediatek,mt7986-wed", "syscon";
958bab661aSEmmanuel Vadot        reg = <0 0x15010000 0 0x1000>;
968bab661aSEmmanuel Vadot        interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
978bab661aSEmmanuel Vadot
988bab661aSEmmanuel Vadot        memory-region = <&wo_emi>, <&wo_ilm>, <&wo_dlm>,
998bab661aSEmmanuel Vadot                        <&wo_data>, <&wo_boot>;
1008bab661aSEmmanuel Vadot        memory-region-names = "wo-emi", "wo-ilm", "wo-dlm",
1018bab661aSEmmanuel Vadot                              "wo-data", "wo-boot";
1028bab661aSEmmanuel Vadot        mediatek,wo-ccif = <&wo_ccif0>;
1038bab661aSEmmanuel Vadot      };
1048bab661aSEmmanuel Vadot    };
105