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