xref: /openbmc/linux/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
11735e44dSLorenzo Bianconi# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
21735e44dSLorenzo Bianconi# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
31735e44dSLorenzo Bianconi%YAML 1.2
41735e44dSLorenzo Bianconi---
51735e44dSLorenzo Bianconi$id: http://devicetree.org/schemas/net/wireless/mediatek,mt76.yaml#
61735e44dSLorenzo Bianconi$schema: http://devicetree.org/meta-schemas/core.yaml#
71735e44dSLorenzo Bianconi
89fa3ad1aSKrzysztof Kozlowskititle: MediaTek mt76 wireless devices
91735e44dSLorenzo Bianconi
101735e44dSLorenzo Bianconimaintainers:
111735e44dSLorenzo Bianconi  - Felix Fietkau <nbd@nbd.name>
121735e44dSLorenzo Bianconi  - Lorenzo Bianconi <lorenzo@kernel.org>
131735e44dSLorenzo Bianconi  - Ryder Lee <ryder.lee@mediatek.com>
141735e44dSLorenzo Bianconi
151735e44dSLorenzo Bianconidescription: |
161735e44dSLorenzo Bianconi  This node provides properties for configuring the MediaTek mt76xx
171735e44dSLorenzo Bianconi  wireless device. The node is expected to be specified as a child
181735e44dSLorenzo Bianconi  node of the PCI controller to which the wireless chip is connected.
191735e44dSLorenzo Bianconi  Alternatively, it can specify the wireless part of the MT7628/MT7688
2056bd1c86SPeter Chiu  or MT7622/MT7986 SoC.
211735e44dSLorenzo Bianconi
221735e44dSLorenzo BianconiallOf:
231735e44dSLorenzo Bianconi  - $ref: ieee80211.yaml#
241735e44dSLorenzo Bianconi
251735e44dSLorenzo Bianconiproperties:
261735e44dSLorenzo Bianconi  compatible:
271735e44dSLorenzo Bianconi    enum:
281735e44dSLorenzo Bianconi      - mediatek,mt76
291735e44dSLorenzo Bianconi      - mediatek,mt7628-wmac
301735e44dSLorenzo Bianconi      - mediatek,mt7622-wmac
317a01cad9SDaniel Golle      - mediatek,mt7981-wmac
3256bd1c86SPeter Chiu      - mediatek,mt7986-wmac
331735e44dSLorenzo Bianconi
341735e44dSLorenzo Bianconi  reg:
3556bd1c86SPeter Chiu    minItems: 1
3656bd1c86SPeter Chiu    maxItems: 3
3756bd1c86SPeter Chiu    description:
3856bd1c86SPeter Chiu      MT7986 should contain 3 regions consys, dcm, and sku, in this order.
391735e44dSLorenzo Bianconi
401735e44dSLorenzo Bianconi  interrupts:
411735e44dSLorenzo Bianconi    maxItems: 1
421735e44dSLorenzo Bianconi
431735e44dSLorenzo Bianconi  power-domains:
441735e44dSLorenzo Bianconi    maxItems: 1
451735e44dSLorenzo Bianconi
4656bd1c86SPeter Chiu  memory-region:
4756bd1c86SPeter Chiu    maxItems: 1
4856bd1c86SPeter Chiu
4956bd1c86SPeter Chiu  resets:
5056bd1c86SPeter Chiu    maxItems: 1
5156bd1c86SPeter Chiu    description:
5256bd1c86SPeter Chiu      Specify the consys reset for mt7986.
5356bd1c86SPeter Chiu
540a1e19c8SRob Herring  reset-names:
5556bd1c86SPeter Chiu    const: consys
5656bd1c86SPeter Chiu
5712fba11cSPeter Chiu  clocks:
5812fba11cSPeter Chiu    maxItems: 2
5912fba11cSPeter Chiu    description:
6012fba11cSPeter Chiu      Specify the consys clocks for mt7986.
6112fba11cSPeter Chiu
6212fba11cSPeter Chiu  clock-names:
6312fba11cSPeter Chiu    items:
6412fba11cSPeter Chiu      - const: mcu
6512fba11cSPeter Chiu      - const: ap2conn
6612fba11cSPeter Chiu
671735e44dSLorenzo Bianconi  mediatek,infracfg:
681735e44dSLorenzo Bianconi    $ref: /schemas/types.yaml#/definitions/phandle
691735e44dSLorenzo Bianconi    description:
701735e44dSLorenzo Bianconi      Phandle to the infrastructure bus fabric syscon node.
711735e44dSLorenzo Bianconi      This property is MT7622 specific
721735e44dSLorenzo Bianconi
731735e44dSLorenzo Bianconi  ieee80211-freq-limit: true
741735e44dSLorenzo Bianconi
75*f4b68370SRafał Miłecki  nvmem-cells:
76*f4b68370SRafał Miłecki    items:
77*f4b68370SRafał Miłecki      - description: NVMEM cell with EEPROM
78*f4b68370SRafał Miłecki
79*f4b68370SRafał Miłecki  nvmem-cell-names:
80*f4b68370SRafał Miłecki    items:
81*f4b68370SRafał Miłecki      - const: eeprom
82*f4b68370SRafał Miłecki
83a8315b2bSDaniel Golle  mediatek,eeprom-data:
84a8315b2bSDaniel Golle    $ref: /schemas/types.yaml#/definitions/uint32-array
85a8315b2bSDaniel Golle    description:
86a8315b2bSDaniel Golle      EEPROM data embedded as array.
87a8315b2bSDaniel Golle
881735e44dSLorenzo Bianconi  mediatek,mtd-eeprom:
891735e44dSLorenzo Bianconi    $ref: /schemas/types.yaml#/definitions/phandle-array
9039bd2b6aSRob Herring    items:
9139bd2b6aSRob Herring      - items:
9239bd2b6aSRob Herring          - description: phandle to MTD partition
9339bd2b6aSRob Herring          - description: offset containing EEPROM data
941735e44dSLorenzo Bianconi    description:
951735e44dSLorenzo Bianconi      Phandle to a MTD partition + offset containing EEPROM data
96*f4b68370SRafał Miłecki    deprecated: true
971735e44dSLorenzo Bianconi
981735e44dSLorenzo Bianconi  big-endian:
991735e44dSLorenzo Bianconi    $ref: /schemas/types.yaml#/definitions/flag
1001735e44dSLorenzo Bianconi    description:
1011735e44dSLorenzo Bianconi      Specify if the radio eeprom partition is written in big-endian
1021735e44dSLorenzo Bianconi
1031735e44dSLorenzo Bianconi  mediatek,eeprom-merge-otp:
1041735e44dSLorenzo Bianconi    type: boolean
1051735e44dSLorenzo Bianconi    description:
1061735e44dSLorenzo Bianconi      Merge EEPROM data with OTP data. Can be used on boards where the flash
1071735e44dSLorenzo Bianconi      calibration data is generic and specific calibration data should be
1081735e44dSLorenzo Bianconi      pulled from the OTP ROM
1091735e44dSLorenzo Bianconi
1100214f6c7SLorenzo Bianconi  mediatek,disable-radar-background:
1110214f6c7SLorenzo Bianconi    type: boolean
1120214f6c7SLorenzo Bianconi    description:
1130214f6c7SLorenzo Bianconi      Disable/enable radar/CAC detection running on a dedicated offchannel
1140214f6c7SLorenzo Bianconi      chain available on some hw.
1150214f6c7SLorenzo Bianconi      Background radar/CAC detection allows to avoid the CAC downtime
1160214f6c7SLorenzo Bianconi      switching on a different channel during CAC detection on the selected
1170214f6c7SLorenzo Bianconi      radar channel.
1180214f6c7SLorenzo Bianconi
1191735e44dSLorenzo Bianconi  led:
1201735e44dSLorenzo Bianconi    type: object
1211735e44dSLorenzo Bianconi    $ref: /schemas/leds/common.yaml#
1221735e44dSLorenzo Bianconi    additionalProperties: false
1231735e44dSLorenzo Bianconi    properties:
12464822bdbSFrank Wunderlich      led-active-low:
12564822bdbSFrank Wunderlich        description:
12664822bdbSFrank Wunderlich          LED is enabled with ground signal.
12764822bdbSFrank Wunderlich        type: boolean
12864822bdbSFrank Wunderlich
1291735e44dSLorenzo Bianconi      led-sources:
1301735e44dSLorenzo Bianconi        maxItems: 1
1311735e44dSLorenzo Bianconi
1322de6ccebSLorenzo Bianconi  power-limits:
1332de6ccebSLorenzo Bianconi    type: object
1342de6ccebSLorenzo Bianconi    additionalProperties: false
1352de6ccebSLorenzo Bianconi    patternProperties:
1362de6ccebSLorenzo Bianconi      "^r[0-9]+":
1372de6ccebSLorenzo Bianconi        type: object
1382de6ccebSLorenzo Bianconi        additionalProperties: false
1392de6ccebSLorenzo Bianconi        properties:
1402de6ccebSLorenzo Bianconi          regdomain:
1412de6ccebSLorenzo Bianconi            $ref: /schemas/types.yaml#/definitions/string
1422de6ccebSLorenzo Bianconi            description:
1432de6ccebSLorenzo Bianconi              Regdomain refers to a legal regulatory region. Different
1442de6ccebSLorenzo Bianconi              countries define different levels of allowable transmitter
1452de6ccebSLorenzo Bianconi              power, time that a channel can be occupied, and different
1462de6ccebSLorenzo Bianconi              available channels
1472de6ccebSLorenzo Bianconi            enum:
1482de6ccebSLorenzo Bianconi              - FCC
1492de6ccebSLorenzo Bianconi              - ETSI
1502de6ccebSLorenzo Bianconi              - JP
1512de6ccebSLorenzo Bianconi
1522de6ccebSLorenzo Bianconi        patternProperties:
1532de6ccebSLorenzo Bianconi          "^txpower-[256]g$":
1542de6ccebSLorenzo Bianconi            type: object
1552de6ccebSLorenzo Bianconi            additionalProperties: false
1562de6ccebSLorenzo Bianconi            patternProperties:
1572de6ccebSLorenzo Bianconi              "^b[0-9]+$":
1582de6ccebSLorenzo Bianconi                type: object
1592de6ccebSLorenzo Bianconi                additionalProperties: false
1602de6ccebSLorenzo Bianconi                properties:
1612de6ccebSLorenzo Bianconi                  channels:
1622de6ccebSLorenzo Bianconi                    $ref: /schemas/types.yaml#/definitions/uint32-array
1632de6ccebSLorenzo Bianconi                    minItems: 2
1642de6ccebSLorenzo Bianconi                    maxItems: 2
1652de6ccebSLorenzo Bianconi                    description:
1662de6ccebSLorenzo Bianconi                      Pairs of first and last channel number of the selected
1672de6ccebSLorenzo Bianconi                      band
1682de6ccebSLorenzo Bianconi
1692de6ccebSLorenzo Bianconi                  rates-cck:
1702de6ccebSLorenzo Bianconi                    $ref: /schemas/types.yaml#/definitions/uint8-array
1712de6ccebSLorenzo Bianconi                    minItems: 4
1722de6ccebSLorenzo Bianconi                    maxItems: 4
1732de6ccebSLorenzo Bianconi                    description:
1742de6ccebSLorenzo Bianconi                      4 half-dBm per-rate power limit values
1752de6ccebSLorenzo Bianconi
1762de6ccebSLorenzo Bianconi                  rates-ofdm:
1772de6ccebSLorenzo Bianconi                    $ref: /schemas/types.yaml#/definitions/uint8-array
1782de6ccebSLorenzo Bianconi                    minItems: 8
1792de6ccebSLorenzo Bianconi                    maxItems: 8
1802de6ccebSLorenzo Bianconi                    description:
1812de6ccebSLorenzo Bianconi                      8 half-dBm per-rate power limit values
1822de6ccebSLorenzo Bianconi
1832de6ccebSLorenzo Bianconi                  rates-mcs:
1842de6ccebSLorenzo Bianconi                    $ref: /schemas/types.yaml#/definitions/uint8-matrix
1852de6ccebSLorenzo Bianconi                    description:
1862de6ccebSLorenzo Bianconi                      Sets of per-rate power limit values for 802.11n/802.11ac
1872de6ccebSLorenzo Bianconi                      rates for multiple channel bandwidth settings.
1882de6ccebSLorenzo Bianconi                      Each set starts with the number of channel bandwidth
1892de6ccebSLorenzo Bianconi                      settings for which the rate set applies, followed by
1902de6ccebSLorenzo Bianconi                      either 8 or 10 power limit values. The order of the
1912de6ccebSLorenzo Bianconi                      channel bandwidth settings is 20, 40, 80 and 160 MHz.
1922de6ccebSLorenzo Bianconi                    maxItems: 4
1932de6ccebSLorenzo Bianconi                    items:
1942de6ccebSLorenzo Bianconi                      minItems: 9
1952de6ccebSLorenzo Bianconi                      maxItems: 11
1962de6ccebSLorenzo Bianconi
1972de6ccebSLorenzo Bianconi                  rates-ru:
1982de6ccebSLorenzo Bianconi                    $ref: /schemas/types.yaml#/definitions/uint8-matrix
1992de6ccebSLorenzo Bianconi                    description:
2002de6ccebSLorenzo Bianconi                      Sets of per-rate power limit values for 802.11ax rates
2012de6ccebSLorenzo Bianconi                      for multiple channel bandwidth or resource unit settings.
2022de6ccebSLorenzo Bianconi                      Each set starts with the number of channel bandwidth or
2032de6ccebSLorenzo Bianconi                      resource unit settings for which the rate set applies,
2042de6ccebSLorenzo Bianconi                      followed by 12 power limit values. The order of the
2052de6ccebSLorenzo Bianconi                      channel resource unit settings is RU26, RU52, RU106,
2062de6ccebSLorenzo Bianconi                      RU242/SU20, RU484/SU40, RU996/SU80 and RU2x996/SU160.
2072de6ccebSLorenzo Bianconi                    items:
2082de6ccebSLorenzo Bianconi                      minItems: 13
2092de6ccebSLorenzo Bianconi                      maxItems: 13
2102de6ccebSLorenzo Bianconi
2112de6ccebSLorenzo Bianconi                  txs-delta:
2122de6ccebSLorenzo Bianconi                    $ref: /schemas/types.yaml#/definitions/uint32-array
2132de6ccebSLorenzo Bianconi                    description:
2142de6ccebSLorenzo Bianconi                      Half-dBm power delta for different numbers of antennas
2152de6ccebSLorenzo Bianconi
2161735e44dSLorenzo Bianconirequired:
2171735e44dSLorenzo Bianconi  - compatible
2181735e44dSLorenzo Bianconi  - reg
2191735e44dSLorenzo Bianconi
22056bd1c86SPeter ChiuunevaluatedProperties: false
2211735e44dSLorenzo Bianconi
2221735e44dSLorenzo Bianconiexamples:
2231735e44dSLorenzo Bianconi  - |
2241735e44dSLorenzo Bianconi    pcie0 {
2251735e44dSLorenzo Bianconi      #address-cells = <3>;
2261735e44dSLorenzo Bianconi      #size-cells = <2>;
2271735e44dSLorenzo Bianconi      wifi@0,0 {
2281735e44dSLorenzo Bianconi        compatible = "mediatek,mt76";
2291735e44dSLorenzo Bianconi        reg = <0x0000 0 0 0 0>;
2301735e44dSLorenzo Bianconi        ieee80211-freq-limit = <5000000 6000000>;
2311735e44dSLorenzo Bianconi        mediatek,mtd-eeprom = <&factory 0x8000>;
2321735e44dSLorenzo Bianconi        big-endian;
2331735e44dSLorenzo Bianconi
2341735e44dSLorenzo Bianconi        led {
2351735e44dSLorenzo Bianconi          led-sources = <2>;
2361735e44dSLorenzo Bianconi        };
2372de6ccebSLorenzo Bianconi
2382de6ccebSLorenzo Bianconi        power-limits {
2392de6ccebSLorenzo Bianconi          r0 {
2402de6ccebSLorenzo Bianconi            regdomain = "FCC";
2412de6ccebSLorenzo Bianconi            txpower-5g {
2422de6ccebSLorenzo Bianconi               b0 {
2432de6ccebSLorenzo Bianconi                   channels = <36 48>;
2442de6ccebSLorenzo Bianconi                   rates-ofdm = /bits/ 8 <23 23 23 23 23 23 23 23>;
2452de6ccebSLorenzo Bianconi                   rates-mcs = /bits/ 8 <1 23 23 23 23 23 23 23 23 23 23>,
246434a4010SRob Herring                               /bits/ 8 <3 22 22 22 22 22 22 22 22 22 22>;
2472de6ccebSLorenzo Bianconi                   rates-ru = /bits/ 8 <3 22 22 22 22 22 22 22 22 22 22 22 22>,
248434a4010SRob Herring                              /bits/ 8 <4 20 20 20 20 20 20 20 20 20 20 20 20>;
2492de6ccebSLorenzo Bianconi               };
2502de6ccebSLorenzo Bianconi               b1 {
2512de6ccebSLorenzo Bianconi                   channels = <100 181>;
2522de6ccebSLorenzo Bianconi                   rates-ofdm = /bits/ 8 <14 14 14 14 14 14 14 14>;
2532de6ccebSLorenzo Bianconi                   rates-mcs = /bits/ 8  <4 14 14 14 14 14 14 14 14 14 14>;
2542de6ccebSLorenzo Bianconi                   txs-delta = <12 9 6>;
2552de6ccebSLorenzo Bianconi                   rates-ru = /bits/ 8  <7 14 14 14 14 14 14 14 14 14 14 14 14>;
2562de6ccebSLorenzo Bianconi               };
2572de6ccebSLorenzo Bianconi             };
2582de6ccebSLorenzo Bianconi          };
2592de6ccebSLorenzo Bianconi        };
2601735e44dSLorenzo Bianconi      };
2611735e44dSLorenzo Bianconi    };
2621735e44dSLorenzo Bianconi
2631735e44dSLorenzo Bianconi  - |
2641735e44dSLorenzo Bianconi    wifi@10300000 {
2651735e44dSLorenzo Bianconi      compatible = "mediatek,mt7628-wmac";
2661735e44dSLorenzo Bianconi      reg = <0x10300000 0x100000>;
2671735e44dSLorenzo Bianconi
2681735e44dSLorenzo Bianconi      interrupt-parent = <&cpuintc>;
2691735e44dSLorenzo Bianconi      interrupts = <6>;
2701735e44dSLorenzo Bianconi
271*f4b68370SRafał Miłecki      nvmem-cells = <&eeprom>;
272*f4b68370SRafał Miłecki      nvmem-cell-names = "eeprom";
2731735e44dSLorenzo Bianconi    };
2741735e44dSLorenzo Bianconi
2751735e44dSLorenzo Bianconi  - |
2761735e44dSLorenzo Bianconi    #include <dt-bindings/interrupt-controller/arm-gic.h>
2771735e44dSLorenzo Bianconi    #include <dt-bindings/interrupt-controller/irq.h>
2781735e44dSLorenzo Bianconi    wifi@18000000 {
2791735e44dSLorenzo Bianconi      compatible = "mediatek,mt7622-wmac";
2801735e44dSLorenzo Bianconi      reg = <0x10300000 0x100000>;
2811735e44dSLorenzo Bianconi      interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_LOW>;
2821735e44dSLorenzo Bianconi
2831735e44dSLorenzo Bianconi      mediatek,infracfg = <&infracfg>;
2841735e44dSLorenzo Bianconi
2851735e44dSLorenzo Bianconi      power-domains = <&scpsys 3>;
2861735e44dSLorenzo Bianconi    };
28756bd1c86SPeter Chiu
28856bd1c86SPeter Chiu  - |
28956bd1c86SPeter Chiu    wifi@18000000 {
29056bd1c86SPeter Chiu        compatible = "mediatek,mt7986-wmac";
29156bd1c86SPeter Chiu        resets = <&watchdog 23>;
29256bd1c86SPeter Chiu        reset-names = "consys";
29356bd1c86SPeter Chiu        reg = <0x18000000 0x1000000>,
29456bd1c86SPeter Chiu              <0x10003000 0x1000>,
29556bd1c86SPeter Chiu              <0x11d10000 0x1000>;
29656bd1c86SPeter Chiu        interrupts = <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>;
29712fba11cSPeter Chiu        clocks = <&topckgen 50>,
29812fba11cSPeter Chiu                 <&topckgen 62>;
29912fba11cSPeter Chiu        clock-names = "mcu", "ap2conn";
30056bd1c86SPeter Chiu        memory-region = <&wmcpu_emi>;
30156bd1c86SPeter Chiu    };
302