MediaTek mt76 wireless devices

Schema identifier ($id): "http://devicetree.org/schemas/net/wireless/mediatek,mt76.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Felix Fietkau <nbd@nbd.name>", "Lorenzo Bianconi <lorenzo@kernel.org>", "Ryder Lee <ryder.lee@mediatek.com>"

This node provides properties for configuring the MediaTek mt76xx wireless device. The node is expected to be specified as a child node of the PCI controller to which the wireless chip is connected. Alternatively, it can specify the wireless part of the MT7628/MT7688 or MT7622/MT7986 SoC.

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "mediatek,mt76", "mediatek,mt7628-wmac", "mediatek,mt7622-wmac", "mediatek,mt7981-wmac", "mediatek,mt7986-wmac"

reg — required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 3

MT7986 should contain 3 regions consys, dcm, and sku, in this order.

interrupts — not listed as required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

major interrupt for rings

Item 2

additional interrupt for ring 19

Item 3

additional interrupt for ring 4

Item 4

additional interrupt for ring 5

power-domains — not listed as required here #

Maximum number of items (maxItems): 1

memory-region — not listed as required here #

Maximum number of items (maxItems): 1

resets — not listed as required here #

Maximum number of items (maxItems): 1

Specify the consys reset for mt7986.

reset-names — not listed as required here #

Exact value (const): "consys"

clocks — not listed as required here #

Maximum number of items (maxItems): 2

Specify the consys clocks for mt7986.

clock-names — not listed as required here #

Array item rules (items) #

Item 1

Exact value (const): "mcu"

Item 2

Exact value (const): "ap2conn"

mediatek,infracfg — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle

Phandle to the infrastructure bus fabric syscon node. This property is MT7622 specific

ieee80211-freq-limit — not listed as required here #

true — No constraints added by this property rule.

nvmem-cells — not listed as required here #

Array item rules (items) #

Item 1

NVMEM cell with EEPROM

nvmem-cell-names — not listed as required here #

Array item rules (items) #

Item 1

Exact value (const): "eeprom"

mediatek,eeprom-data — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array

EEPROM data embedded as array.

mediatek,mtd-eeprom — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle-array

Array item rules (items) #

Item 1

Array item rules (items)

Item 1

phandle to MTD partition

Item 2

offset containing EEPROM data

Phandle to a MTD partition + offset containing EEPROM data

Deprecated (deprecated): true

big-endian — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag

Specify if the radio eeprom partition is written in big-endian

mediatek,eeprom-merge-otp — not listed as required here #

Value type (type): "boolean"

Merge EEPROM data with OTP data. Can be used on boards where the flash calibration data is generic and specific calibration data should be pulled from the OTP ROM

mediatek,disable-radar-background — not listed as required here #

Value type (type): "boolean"

Disable/enable radar/CAC detection running on a dedicated offchannel chain available on some hw. Background radar/CAC detection allows to avoid the CAC downtime switching on a different channel during CAC detection on the selected radar channel.

led — not listed as required here #

Value type (type): "object"

Shared schema rule ($ref): /schemas/leds/common.yaml#

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

led-active-low — not listed as required here

LED is enabled with ground signal.

Value type (type): "boolean"

led-sources — not listed as required here

Maximum number of items (maxItems): 1

power-limits — not listed as required here #

Value type (type): "object"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Properties matching a name pattern (patternProperties) #

^r[0-9]+ — name matches this regular expression

Value type (type): "object"

Properties not matched by properties or patternProperties in this schema (additionalProperties)

false

Not allowed by this rule.

Properties and child nodes (properties)

regdomain — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/string

Regdomain refers to a legal regulatory region. Different countries define different levels of allowable transmitter power, time that a channel can be occupied, and different available channels

Allowed values (enum): "FCC", "ETSI", "JP"

country — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/string

String pattern (pattern): "^[A-Z]{2}$"

ISO 3166-1 alpha-2 country code for power limits

Properties matching a name pattern (patternProperties)

^txpower-[256]g$ — name matches this regular expression

Value type (type): "object"

Properties not matched by properties or patternProperties in this schema (additionalProperties)

false

Not allowed by this rule.

Properties matching a name pattern (patternProperties)

^b[0-9]+$ — name matches this regular expression

Value type (type): "object"

Properties not matched by properties or patternProperties in this schema (additionalProperties)

false

Not allowed by this rule.

Properties and child nodes (properties)

channels — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 2

Pairs of first and last channel number of the selected band

rates-cck — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint8-array

Minimum number of items (minItems): 4

Maximum number of items (maxItems): 4

4 half-dBm per-rate power limit values

rates-ofdm — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint8-array

Minimum number of items (minItems): 8

Maximum number of items (maxItems): 8

8 half-dBm per-rate power limit values

rates-mcs — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint8-matrix

Sets of per-rate power limit values for 802.11n/802.11ac rates for multiple channel bandwidth settings. Each set starts with the number of channel bandwidth settings for which the rate set applies, followed by either 8 or 10 power limit values. The order of the channel bandwidth settings is 20, 40, 80 and 160 MHz.

Maximum number of items (maxItems): 4

Array item rules (items)

Minimum number of items (minItems): 9

Maximum number of items (maxItems): 11

rates-ru — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint8-matrix

Sets of per-rate power limit values for 802.11ax rates for multiple channel bandwidth or resource unit settings. Each set starts with the number of channel bandwidth or resource unit settings for which the rate set applies, followed by 12 power limit values. The order of the channel resource unit settings is RU26, RU52, RU106, RU242/SU20, RU484/SU40, RU996/SU80 and RU2x996/SU160.

Array item rules (items)

Minimum number of items (minItems): 13

Maximum number of items (maxItems): 13

paths-cck — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint8-array

Minimum number of items (minItems): 4

Maximum number of items (maxItems): 4

4 half-dBm backoff values (1 - 4 antennas, single spacial stream)

paths-ofdm — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint8-array

Minimum number of items (minItems): 4

Maximum number of items (maxItems): 4

4 half-dBm backoff values (1 - 4 antennas, single spacial stream)

paths-ofdm-bf — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint8-array

Minimum number of items (minItems): 4

Maximum number of items (maxItems): 4

4 half-dBm backoff values for beamforming (1 - 4 antennas, single spacial stream)

paths-ru — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint8-matrix

Sets of half-dBm backoff values for 802.11ax rates for 1T1ss (aka 1 transmitting antenna with 1 spacial stream), 2T1ss, 3T1ss, 4T1ss, 2T2ss, 3T2ss, 4T2ss, 3T3ss, 4T3ss and 4T4ss. Each set starts with the number of channel bandwidth or resource unit settings for which the rate set applies, followed by 10 power limit values. The order of the channel resource unit settings is RU26, RU52, RU106, RU242/SU20, RU484/SU40, RU996/SU80 and RU2x996/SU160.

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 7

Array item rules (items)

Minimum number of items (minItems): 11

Maximum number of items (maxItems): 11

paths-ru-bf — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint8-matrix

Sets of half-dBm backoff (beamforming) values for 802.11ax rates for 1T1ss (aka 1 transmitting antenna with 1 spacial stream), 2T1ss, 3T1ss, 4T1ss, 2T2ss, 3T2ss, 4T2ss, 3T3ss, 4T3ss and 4T4ss. Each set starts with the number of channel bandwidth or resource unit settings for which the rate set applies, followed by 10 power limit values. The order of the channel resource unit settings is RU26, RU52, RU106, RU242/SU20, RU484/SU40, RU996/SU80 and RU2x996/SU160.

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 7

Array item rules (items)

Minimum number of items (minItems): 11

Maximum number of items (maxItems): 11

txs-delta — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array

Half-dBm power delta for different numbers of antennas

Required in this object (required): "compatible", "reg"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): ieee80211.yaml#

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "mediatek,mt7981-wmac", "mediatek,mt7986-wmac"

When the condition matches (then) #

Properties and child nodes (properties)

interrupts — not listed as required here

Minimum number of items (minItems): 4

When the condition does not match (else) #

Properties and child nodes (properties)

interrupts — not listed as required here

Maximum number of items (maxItems): 1

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

pcie0 {
  #address-cells = <3>;
  #size-cells = <2>;
  wifi@0,0 {
    compatible = "mediatek,mt76";
    reg = <0x0000 0 0 0 0>;
    ieee80211-freq-limit = <5000000 6000000>;
    mediatek,mtd-eeprom = <&factory 0x8000>;
    big-endian;

    led {
      led-sources = <2>;
    };

    power-limits {
      r0 {
        regdomain = "FCC";
        txpower-5g {
           b0 {
               channels = <36 48>;
               rates-ofdm = /bits/ 8 <23 23 23 23 23 23 23 23>;
               rates-mcs = /bits/ 8 <1 23 23 23 23 23 23 23 23 23 23>,
                           /bits/ 8 <3 22 22 22 22 22 22 22 22 22 22>;
               rates-ru = /bits/ 8 <3 22 22 22 22 22 22 22 22 22 22 22 22>,
                          /bits/ 8 <4 20 20 20 20 20 20 20 20 20 20 20 20>;
           };
           b1 {
               channels = <100 181>;
               rates-ofdm = /bits/ 8 <14 14 14 14 14 14 14 14>;
               rates-mcs = /bits/ 8  <4 14 14 14 14 14 14 14 14 14 14>;
               txs-delta = <12 9 6>;
               rates-ru = /bits/ 8  <7 14 14 14 14 14 14 14 14 14 14 14 14>;
           };
         };
      };
    };
  };
};
wifi@10300000 {
  compatible = "mediatek,mt7628-wmac";
  reg = <0x10300000 0x100000>;

  interrupt-parent = <&cpuintc>;
  interrupts = <6>;

  nvmem-cells = <&eeprom>;
  nvmem-cell-names = "eeprom";
};
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
wifi@18000000 {
  compatible = "mediatek,mt7622-wmac";
  reg = <0x10300000 0x100000>;
  interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_LOW>;

  mediatek,infracfg = <&infracfg>;

  power-domains = <&scpsys 3>;
};
wifi@18000000 {
    compatible = "mediatek,mt7986-wmac";
    resets = <&watchdog 23>;
    reset-names = "consys";
    reg = <0x18000000 0x1000000>,
          <0x10003000 0x1000>,
          <0x11d10000 0x1000>;
    interrupts = <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
                 <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
                 <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>,
                 <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>;
    clocks = <&topckgen 50>,
             <&topckgen 62>;
    clock-names = "mcu", "ap2conn";
    memory-region = <&wmcpu_emi>;
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Line 2: Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.

Edit this page