xref: /freebsd/sys/contrib/device-tree/Bindings/net/wireless/mediatek,mt76.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
12eb4d8dcSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
22eb4d8dcSEmmanuel Vadot# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
32eb4d8dcSEmmanuel Vadot%YAML 1.2
42eb4d8dcSEmmanuel Vadot---
52eb4d8dcSEmmanuel Vadot$id: http://devicetree.org/schemas/net/wireless/mediatek,mt76.yaml#
62eb4d8dcSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
72eb4d8dcSEmmanuel Vadot
88bab661aSEmmanuel Vadottitle: MediaTek mt76 wireless devices
92eb4d8dcSEmmanuel Vadot
102eb4d8dcSEmmanuel Vadotmaintainers:
112eb4d8dcSEmmanuel Vadot  - Felix Fietkau <nbd@nbd.name>
122eb4d8dcSEmmanuel Vadot  - Lorenzo Bianconi <lorenzo@kernel.org>
132eb4d8dcSEmmanuel Vadot  - Ryder Lee <ryder.lee@mediatek.com>
142eb4d8dcSEmmanuel Vadot
152eb4d8dcSEmmanuel Vadotdescription: |
162eb4d8dcSEmmanuel Vadot  This node provides properties for configuring the MediaTek mt76xx
172eb4d8dcSEmmanuel Vadot  wireless device. The node is expected to be specified as a child
182eb4d8dcSEmmanuel Vadot  node of the PCI controller to which the wireless chip is connected.
192eb4d8dcSEmmanuel Vadot  Alternatively, it can specify the wireless part of the MT7628/MT7688
20c9ccf3a3SEmmanuel Vadot  or MT7622/MT7986 SoC.
212eb4d8dcSEmmanuel Vadot
222eb4d8dcSEmmanuel VadotallOf:
232eb4d8dcSEmmanuel Vadot  - $ref: ieee80211.yaml#
242eb4d8dcSEmmanuel Vadot
252eb4d8dcSEmmanuel Vadotproperties:
262eb4d8dcSEmmanuel Vadot  compatible:
272eb4d8dcSEmmanuel Vadot    enum:
282eb4d8dcSEmmanuel Vadot      - mediatek,mt76
292eb4d8dcSEmmanuel Vadot      - mediatek,mt7628-wmac
302eb4d8dcSEmmanuel Vadot      - mediatek,mt7622-wmac
31c9ccf3a3SEmmanuel Vadot      - mediatek,mt7986-wmac
322eb4d8dcSEmmanuel Vadot
332eb4d8dcSEmmanuel Vadot  reg:
34c9ccf3a3SEmmanuel Vadot    minItems: 1
35c9ccf3a3SEmmanuel Vadot    maxItems: 3
36c9ccf3a3SEmmanuel Vadot    description:
37c9ccf3a3SEmmanuel Vadot      MT7986 should contain 3 regions consys, dcm, and sku, in this order.
382eb4d8dcSEmmanuel Vadot
392eb4d8dcSEmmanuel Vadot  interrupts:
402eb4d8dcSEmmanuel Vadot    maxItems: 1
412eb4d8dcSEmmanuel Vadot
422eb4d8dcSEmmanuel Vadot  power-domains:
432eb4d8dcSEmmanuel Vadot    maxItems: 1
442eb4d8dcSEmmanuel Vadot
45c9ccf3a3SEmmanuel Vadot  memory-region:
46c9ccf3a3SEmmanuel Vadot    maxItems: 1
47c9ccf3a3SEmmanuel Vadot
48c9ccf3a3SEmmanuel Vadot  resets:
49c9ccf3a3SEmmanuel Vadot    maxItems: 1
50c9ccf3a3SEmmanuel Vadot    description:
51c9ccf3a3SEmmanuel Vadot      Specify the consys reset for mt7986.
52c9ccf3a3SEmmanuel Vadot
53d5b0e70fSEmmanuel Vadot  reset-names:
54c9ccf3a3SEmmanuel Vadot    const: consys
55c9ccf3a3SEmmanuel Vadot
56b97ee269SEmmanuel Vadot  clocks:
57b97ee269SEmmanuel Vadot    maxItems: 2
58b97ee269SEmmanuel Vadot    description:
59b97ee269SEmmanuel Vadot      Specify the consys clocks for mt7986.
60b97ee269SEmmanuel Vadot
61b97ee269SEmmanuel Vadot  clock-names:
62b97ee269SEmmanuel Vadot    items:
63b97ee269SEmmanuel Vadot      - const: mcu
64b97ee269SEmmanuel Vadot      - const: ap2conn
65b97ee269SEmmanuel Vadot
662eb4d8dcSEmmanuel Vadot  mediatek,infracfg:
672eb4d8dcSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
682eb4d8dcSEmmanuel Vadot    description:
692eb4d8dcSEmmanuel Vadot      Phandle to the infrastructure bus fabric syscon node.
702eb4d8dcSEmmanuel Vadot      This property is MT7622 specific
712eb4d8dcSEmmanuel Vadot
722eb4d8dcSEmmanuel Vadot  ieee80211-freq-limit: true
732eb4d8dcSEmmanuel Vadot
748cc087a1SEmmanuel Vadot  mediatek,eeprom-data:
758cc087a1SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
768cc087a1SEmmanuel Vadot    description:
778cc087a1SEmmanuel Vadot      EEPROM data embedded as array.
788cc087a1SEmmanuel Vadot
792eb4d8dcSEmmanuel Vadot  mediatek,mtd-eeprom:
802eb4d8dcSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
81c9ccf3a3SEmmanuel Vadot    items:
82c9ccf3a3SEmmanuel Vadot      - items:
83c9ccf3a3SEmmanuel Vadot          - description: phandle to MTD partition
84c9ccf3a3SEmmanuel Vadot          - description: offset containing EEPROM data
852eb4d8dcSEmmanuel Vadot    description:
862eb4d8dcSEmmanuel Vadot      Phandle to a MTD partition + offset containing EEPROM data
872eb4d8dcSEmmanuel Vadot
882eb4d8dcSEmmanuel Vadot  big-endian:
892eb4d8dcSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
902eb4d8dcSEmmanuel Vadot    description:
912eb4d8dcSEmmanuel Vadot      Specify if the radio eeprom partition is written in big-endian
922eb4d8dcSEmmanuel Vadot
932eb4d8dcSEmmanuel Vadot  mediatek,eeprom-merge-otp:
942eb4d8dcSEmmanuel Vadot    type: boolean
952eb4d8dcSEmmanuel Vadot    description:
962eb4d8dcSEmmanuel Vadot      Merge EEPROM data with OTP data. Can be used on boards where the flash
972eb4d8dcSEmmanuel Vadot      calibration data is generic and specific calibration data should be
982eb4d8dcSEmmanuel Vadot      pulled from the OTP ROM
992eb4d8dcSEmmanuel Vadot
100c9ccf3a3SEmmanuel Vadot  mediatek,disable-radar-background:
101c9ccf3a3SEmmanuel Vadot    type: boolean
102c9ccf3a3SEmmanuel Vadot    description:
103c9ccf3a3SEmmanuel Vadot      Disable/enable radar/CAC detection running on a dedicated offchannel
104c9ccf3a3SEmmanuel Vadot      chain available on some hw.
105c9ccf3a3SEmmanuel Vadot      Background radar/CAC detection allows to avoid the CAC downtime
106c9ccf3a3SEmmanuel Vadot      switching on a different channel during CAC detection on the selected
107c9ccf3a3SEmmanuel Vadot      radar channel.
108c9ccf3a3SEmmanuel Vadot
1092eb4d8dcSEmmanuel Vadot  led:
1102eb4d8dcSEmmanuel Vadot    type: object
1112eb4d8dcSEmmanuel Vadot    $ref: /schemas/leds/common.yaml#
1122eb4d8dcSEmmanuel Vadot    additionalProperties: false
1132eb4d8dcSEmmanuel Vadot    properties:
114*fac71e4eSEmmanuel Vadot      led-active-low:
115*fac71e4eSEmmanuel Vadot        description:
116*fac71e4eSEmmanuel Vadot          LED is enabled with ground signal.
117*fac71e4eSEmmanuel Vadot        type: boolean
118*fac71e4eSEmmanuel Vadot
1192eb4d8dcSEmmanuel Vadot      led-sources:
1202eb4d8dcSEmmanuel Vadot        maxItems: 1
1212eb4d8dcSEmmanuel Vadot
1222eb4d8dcSEmmanuel Vadot  power-limits:
1232eb4d8dcSEmmanuel Vadot    type: object
1242eb4d8dcSEmmanuel Vadot    additionalProperties: false
1252eb4d8dcSEmmanuel Vadot    patternProperties:
1262eb4d8dcSEmmanuel Vadot      "^r[0-9]+":
1272eb4d8dcSEmmanuel Vadot        type: object
1282eb4d8dcSEmmanuel Vadot        additionalProperties: false
1292eb4d8dcSEmmanuel Vadot        properties:
1302eb4d8dcSEmmanuel Vadot          regdomain:
1312eb4d8dcSEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/string
1322eb4d8dcSEmmanuel Vadot            description:
1332eb4d8dcSEmmanuel Vadot              Regdomain refers to a legal regulatory region. Different
1342eb4d8dcSEmmanuel Vadot              countries define different levels of allowable transmitter
1352eb4d8dcSEmmanuel Vadot              power, time that a channel can be occupied, and different
1362eb4d8dcSEmmanuel Vadot              available channels
1372eb4d8dcSEmmanuel Vadot            enum:
1382eb4d8dcSEmmanuel Vadot              - FCC
1392eb4d8dcSEmmanuel Vadot              - ETSI
1402eb4d8dcSEmmanuel Vadot              - JP
1412eb4d8dcSEmmanuel Vadot
1422eb4d8dcSEmmanuel Vadot        patternProperties:
1432eb4d8dcSEmmanuel Vadot          "^txpower-[256]g$":
1442eb4d8dcSEmmanuel Vadot            type: object
1452eb4d8dcSEmmanuel Vadot            additionalProperties: false
1462eb4d8dcSEmmanuel Vadot            patternProperties:
1472eb4d8dcSEmmanuel Vadot              "^b[0-9]+$":
1482eb4d8dcSEmmanuel Vadot                type: object
1492eb4d8dcSEmmanuel Vadot                additionalProperties: false
1502eb4d8dcSEmmanuel Vadot                properties:
1512eb4d8dcSEmmanuel Vadot                  channels:
1522eb4d8dcSEmmanuel Vadot                    $ref: /schemas/types.yaml#/definitions/uint32-array
1532eb4d8dcSEmmanuel Vadot                    minItems: 2
1542eb4d8dcSEmmanuel Vadot                    maxItems: 2
1552eb4d8dcSEmmanuel Vadot                    description:
1562eb4d8dcSEmmanuel Vadot                      Pairs of first and last channel number of the selected
1572eb4d8dcSEmmanuel Vadot                      band
1582eb4d8dcSEmmanuel Vadot
1592eb4d8dcSEmmanuel Vadot                  rates-cck:
1602eb4d8dcSEmmanuel Vadot                    $ref: /schemas/types.yaml#/definitions/uint8-array
1612eb4d8dcSEmmanuel Vadot                    minItems: 4
1622eb4d8dcSEmmanuel Vadot                    maxItems: 4
1632eb4d8dcSEmmanuel Vadot                    description:
1642eb4d8dcSEmmanuel Vadot                      4 half-dBm per-rate power limit values
1652eb4d8dcSEmmanuel Vadot
1662eb4d8dcSEmmanuel Vadot                  rates-ofdm:
1672eb4d8dcSEmmanuel Vadot                    $ref: /schemas/types.yaml#/definitions/uint8-array
1682eb4d8dcSEmmanuel Vadot                    minItems: 8
1692eb4d8dcSEmmanuel Vadot                    maxItems: 8
1702eb4d8dcSEmmanuel Vadot                    description:
1712eb4d8dcSEmmanuel Vadot                      8 half-dBm per-rate power limit values
1722eb4d8dcSEmmanuel Vadot
1732eb4d8dcSEmmanuel Vadot                  rates-mcs:
1742eb4d8dcSEmmanuel Vadot                    $ref: /schemas/types.yaml#/definitions/uint8-matrix
1752eb4d8dcSEmmanuel Vadot                    description:
1762eb4d8dcSEmmanuel Vadot                      Sets of per-rate power limit values for 802.11n/802.11ac
1772eb4d8dcSEmmanuel Vadot                      rates for multiple channel bandwidth settings.
1782eb4d8dcSEmmanuel Vadot                      Each set starts with the number of channel bandwidth
1792eb4d8dcSEmmanuel Vadot                      settings for which the rate set applies, followed by
1802eb4d8dcSEmmanuel Vadot                      either 8 or 10 power limit values. The order of the
1812eb4d8dcSEmmanuel Vadot                      channel bandwidth settings is 20, 40, 80 and 160 MHz.
1822eb4d8dcSEmmanuel Vadot                    maxItems: 4
1832eb4d8dcSEmmanuel Vadot                    items:
1842eb4d8dcSEmmanuel Vadot                      minItems: 9
1852eb4d8dcSEmmanuel Vadot                      maxItems: 11
1862eb4d8dcSEmmanuel Vadot
1872eb4d8dcSEmmanuel Vadot                  rates-ru:
1882eb4d8dcSEmmanuel Vadot                    $ref: /schemas/types.yaml#/definitions/uint8-matrix
1892eb4d8dcSEmmanuel Vadot                    description:
1902eb4d8dcSEmmanuel Vadot                      Sets of per-rate power limit values for 802.11ax rates
1912eb4d8dcSEmmanuel Vadot                      for multiple channel bandwidth or resource unit settings.
1922eb4d8dcSEmmanuel Vadot                      Each set starts with the number of channel bandwidth or
1932eb4d8dcSEmmanuel Vadot                      resource unit settings for which the rate set applies,
1942eb4d8dcSEmmanuel Vadot                      followed by 12 power limit values. The order of the
1952eb4d8dcSEmmanuel Vadot                      channel resource unit settings is RU26, RU52, RU106,
1962eb4d8dcSEmmanuel Vadot                      RU242/SU20, RU484/SU40, RU996/SU80 and RU2x996/SU160.
1972eb4d8dcSEmmanuel Vadot                    items:
1982eb4d8dcSEmmanuel Vadot                      minItems: 13
1992eb4d8dcSEmmanuel Vadot                      maxItems: 13
2002eb4d8dcSEmmanuel Vadot
2012eb4d8dcSEmmanuel Vadot                  txs-delta:
2022eb4d8dcSEmmanuel Vadot                    $ref: /schemas/types.yaml#/definitions/uint32-array
2032eb4d8dcSEmmanuel Vadot                    description:
2042eb4d8dcSEmmanuel Vadot                      Half-dBm power delta for different numbers of antennas
2052eb4d8dcSEmmanuel Vadot
2062eb4d8dcSEmmanuel Vadotrequired:
2072eb4d8dcSEmmanuel Vadot  - compatible
2082eb4d8dcSEmmanuel Vadot  - reg
2092eb4d8dcSEmmanuel Vadot
210c9ccf3a3SEmmanuel VadotunevaluatedProperties: false
2112eb4d8dcSEmmanuel Vadot
2122eb4d8dcSEmmanuel Vadotexamples:
2132eb4d8dcSEmmanuel Vadot  - |
2142eb4d8dcSEmmanuel Vadot    pcie0 {
2152eb4d8dcSEmmanuel Vadot      #address-cells = <3>;
2162eb4d8dcSEmmanuel Vadot      #size-cells = <2>;
2172eb4d8dcSEmmanuel Vadot      wifi@0,0 {
2182eb4d8dcSEmmanuel Vadot        compatible = "mediatek,mt76";
2192eb4d8dcSEmmanuel Vadot        reg = <0x0000 0 0 0 0>;
2202eb4d8dcSEmmanuel Vadot        ieee80211-freq-limit = <5000000 6000000>;
2212eb4d8dcSEmmanuel Vadot        mediatek,mtd-eeprom = <&factory 0x8000>;
2222eb4d8dcSEmmanuel Vadot        big-endian;
2232eb4d8dcSEmmanuel Vadot
2242eb4d8dcSEmmanuel Vadot        led {
2252eb4d8dcSEmmanuel Vadot          led-sources = <2>;
2262eb4d8dcSEmmanuel Vadot        };
2272eb4d8dcSEmmanuel Vadot
2282eb4d8dcSEmmanuel Vadot        power-limits {
2292eb4d8dcSEmmanuel Vadot          r0 {
2302eb4d8dcSEmmanuel Vadot            regdomain = "FCC";
2312eb4d8dcSEmmanuel Vadot            txpower-5g {
2322eb4d8dcSEmmanuel Vadot               b0 {
2332eb4d8dcSEmmanuel Vadot                   channels = <36 48>;
2342eb4d8dcSEmmanuel Vadot                   rates-ofdm = /bits/ 8 <23 23 23 23 23 23 23 23>;
2352eb4d8dcSEmmanuel Vadot                   rates-mcs = /bits/ 8 <1 23 23 23 23 23 23 23 23 23 23>,
236e67e8565SEmmanuel Vadot                               /bits/ 8 <3 22 22 22 22 22 22 22 22 22 22>;
2372eb4d8dcSEmmanuel Vadot                   rates-ru = /bits/ 8 <3 22 22 22 22 22 22 22 22 22 22 22 22>,
238e67e8565SEmmanuel Vadot                              /bits/ 8 <4 20 20 20 20 20 20 20 20 20 20 20 20>;
2392eb4d8dcSEmmanuel Vadot               };
2402eb4d8dcSEmmanuel Vadot               b1 {
2412eb4d8dcSEmmanuel Vadot                   channels = <100 181>;
2422eb4d8dcSEmmanuel Vadot                   rates-ofdm = /bits/ 8 <14 14 14 14 14 14 14 14>;
2432eb4d8dcSEmmanuel Vadot                   rates-mcs = /bits/ 8  <4 14 14 14 14 14 14 14 14 14 14>;
2442eb4d8dcSEmmanuel Vadot                   txs-delta = <12 9 6>;
2452eb4d8dcSEmmanuel Vadot                   rates-ru = /bits/ 8  <7 14 14 14 14 14 14 14 14 14 14 14 14>;
2462eb4d8dcSEmmanuel Vadot               };
2472eb4d8dcSEmmanuel Vadot             };
2482eb4d8dcSEmmanuel Vadot          };
2492eb4d8dcSEmmanuel Vadot        };
2502eb4d8dcSEmmanuel Vadot      };
2512eb4d8dcSEmmanuel Vadot    };
2522eb4d8dcSEmmanuel Vadot
2532eb4d8dcSEmmanuel Vadot  - |
2542eb4d8dcSEmmanuel Vadot    wifi@10300000 {
2552eb4d8dcSEmmanuel Vadot      compatible = "mediatek,mt7628-wmac";
2562eb4d8dcSEmmanuel Vadot      reg = <0x10300000 0x100000>;
2572eb4d8dcSEmmanuel Vadot
2582eb4d8dcSEmmanuel Vadot      interrupt-parent = <&cpuintc>;
2592eb4d8dcSEmmanuel Vadot      interrupts = <6>;
2602eb4d8dcSEmmanuel Vadot
2612eb4d8dcSEmmanuel Vadot      mediatek,mtd-eeprom = <&factory 0x0>;
2622eb4d8dcSEmmanuel Vadot    };
2632eb4d8dcSEmmanuel Vadot
2642eb4d8dcSEmmanuel Vadot  - |
2652eb4d8dcSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
2662eb4d8dcSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
2672eb4d8dcSEmmanuel Vadot    wifi@18000000 {
2682eb4d8dcSEmmanuel Vadot      compatible = "mediatek,mt7622-wmac";
2692eb4d8dcSEmmanuel Vadot      reg = <0x10300000 0x100000>;
2702eb4d8dcSEmmanuel Vadot      interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_LOW>;
2712eb4d8dcSEmmanuel Vadot
2722eb4d8dcSEmmanuel Vadot      mediatek,infracfg = <&infracfg>;
2732eb4d8dcSEmmanuel Vadot
2742eb4d8dcSEmmanuel Vadot      power-domains = <&scpsys 3>;
2752eb4d8dcSEmmanuel Vadot    };
276c9ccf3a3SEmmanuel Vadot
277c9ccf3a3SEmmanuel Vadot  - |
278c9ccf3a3SEmmanuel Vadot    wifi@18000000 {
279c9ccf3a3SEmmanuel Vadot        compatible = "mediatek,mt7986-wmac";
280c9ccf3a3SEmmanuel Vadot        resets = <&watchdog 23>;
281c9ccf3a3SEmmanuel Vadot        reset-names = "consys";
282c9ccf3a3SEmmanuel Vadot        reg = <0x18000000 0x1000000>,
283c9ccf3a3SEmmanuel Vadot              <0x10003000 0x1000>,
284c9ccf3a3SEmmanuel Vadot              <0x11d10000 0x1000>;
285c9ccf3a3SEmmanuel Vadot        interrupts = <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>;
286b97ee269SEmmanuel Vadot        clocks = <&topckgen 50>,
287b97ee269SEmmanuel Vadot                 <&topckgen 62>;
288b97ee269SEmmanuel Vadot        clock-names = "mcu", "ap2conn";
289c9ccf3a3SEmmanuel Vadot        memory-region = <&wmcpu_emi>;
290c9ccf3a3SEmmanuel Vadot    };
291