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 31*aa1a8ff2SEmmanuel Vadot - mediatek,mt7981-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 57b97ee269SEmmanuel Vadot clocks: 58b97ee269SEmmanuel Vadot maxItems: 2 59b97ee269SEmmanuel Vadot description: 60b97ee269SEmmanuel Vadot Specify the consys clocks for mt7986. 61b97ee269SEmmanuel Vadot 62b97ee269SEmmanuel Vadot clock-names: 63b97ee269SEmmanuel Vadot items: 64b97ee269SEmmanuel Vadot - const: mcu 65b97ee269SEmmanuel Vadot - const: ap2conn 66b97ee269SEmmanuel 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 75*aa1a8ff2SEmmanuel Vadot nvmem-cells: 76*aa1a8ff2SEmmanuel Vadot items: 77*aa1a8ff2SEmmanuel Vadot - description: NVMEM cell with EEPROM 78*aa1a8ff2SEmmanuel Vadot 79*aa1a8ff2SEmmanuel Vadot nvmem-cell-names: 80*aa1a8ff2SEmmanuel Vadot items: 81*aa1a8ff2SEmmanuel Vadot - const: eeprom 82*aa1a8ff2SEmmanuel Vadot 838cc087a1SEmmanuel Vadot mediatek,eeprom-data: 848cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 858cc087a1SEmmanuel Vadot description: 868cc087a1SEmmanuel Vadot EEPROM data embedded as array. 878cc087a1SEmmanuel Vadot 882eb4d8dcSEmmanuel Vadot mediatek,mtd-eeprom: 892eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle-array 90c9ccf3a3SEmmanuel Vadot items: 91c9ccf3a3SEmmanuel Vadot - items: 92c9ccf3a3SEmmanuel Vadot - description: phandle to MTD partition 93c9ccf3a3SEmmanuel Vadot - description: offset containing EEPROM data 942eb4d8dcSEmmanuel Vadot description: 952eb4d8dcSEmmanuel Vadot Phandle to a MTD partition + offset containing EEPROM data 96*aa1a8ff2SEmmanuel Vadot deprecated: true 972eb4d8dcSEmmanuel Vadot 982eb4d8dcSEmmanuel Vadot big-endian: 992eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 1002eb4d8dcSEmmanuel Vadot description: 1012eb4d8dcSEmmanuel Vadot Specify if the radio eeprom partition is written in big-endian 1022eb4d8dcSEmmanuel Vadot 1032eb4d8dcSEmmanuel Vadot mediatek,eeprom-merge-otp: 1042eb4d8dcSEmmanuel Vadot type: boolean 1052eb4d8dcSEmmanuel Vadot description: 1062eb4d8dcSEmmanuel Vadot Merge EEPROM data with OTP data. Can be used on boards where the flash 1072eb4d8dcSEmmanuel Vadot calibration data is generic and specific calibration data should be 1082eb4d8dcSEmmanuel Vadot pulled from the OTP ROM 1092eb4d8dcSEmmanuel Vadot 110c9ccf3a3SEmmanuel Vadot mediatek,disable-radar-background: 111c9ccf3a3SEmmanuel Vadot type: boolean 112c9ccf3a3SEmmanuel Vadot description: 113c9ccf3a3SEmmanuel Vadot Disable/enable radar/CAC detection running on a dedicated offchannel 114c9ccf3a3SEmmanuel Vadot chain available on some hw. 115c9ccf3a3SEmmanuel Vadot Background radar/CAC detection allows to avoid the CAC downtime 116c9ccf3a3SEmmanuel Vadot switching on a different channel during CAC detection on the selected 117c9ccf3a3SEmmanuel Vadot radar channel. 118c9ccf3a3SEmmanuel Vadot 1192eb4d8dcSEmmanuel Vadot led: 1202eb4d8dcSEmmanuel Vadot type: object 1212eb4d8dcSEmmanuel Vadot $ref: /schemas/leds/common.yaml# 1222eb4d8dcSEmmanuel Vadot additionalProperties: false 1232eb4d8dcSEmmanuel Vadot properties: 124fac71e4eSEmmanuel Vadot led-active-low: 125fac71e4eSEmmanuel Vadot description: 126fac71e4eSEmmanuel Vadot LED is enabled with ground signal. 127fac71e4eSEmmanuel Vadot type: boolean 128fac71e4eSEmmanuel Vadot 1292eb4d8dcSEmmanuel Vadot led-sources: 1302eb4d8dcSEmmanuel Vadot maxItems: 1 1312eb4d8dcSEmmanuel Vadot 1322eb4d8dcSEmmanuel Vadot power-limits: 1332eb4d8dcSEmmanuel Vadot type: object 1342eb4d8dcSEmmanuel Vadot additionalProperties: false 1352eb4d8dcSEmmanuel Vadot patternProperties: 1362eb4d8dcSEmmanuel Vadot "^r[0-9]+": 1372eb4d8dcSEmmanuel Vadot type: object 1382eb4d8dcSEmmanuel Vadot additionalProperties: false 1392eb4d8dcSEmmanuel Vadot properties: 1402eb4d8dcSEmmanuel Vadot regdomain: 1412eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 1422eb4d8dcSEmmanuel Vadot description: 1432eb4d8dcSEmmanuel Vadot Regdomain refers to a legal regulatory region. Different 1442eb4d8dcSEmmanuel Vadot countries define different levels of allowable transmitter 1452eb4d8dcSEmmanuel Vadot power, time that a channel can be occupied, and different 1462eb4d8dcSEmmanuel Vadot available channels 1472eb4d8dcSEmmanuel Vadot enum: 1482eb4d8dcSEmmanuel Vadot - FCC 1492eb4d8dcSEmmanuel Vadot - ETSI 1502eb4d8dcSEmmanuel Vadot - JP 1512eb4d8dcSEmmanuel Vadot 1522eb4d8dcSEmmanuel Vadot patternProperties: 1532eb4d8dcSEmmanuel Vadot "^txpower-[256]g$": 1542eb4d8dcSEmmanuel Vadot type: object 1552eb4d8dcSEmmanuel Vadot additionalProperties: false 1562eb4d8dcSEmmanuel Vadot patternProperties: 1572eb4d8dcSEmmanuel Vadot "^b[0-9]+$": 1582eb4d8dcSEmmanuel Vadot type: object 1592eb4d8dcSEmmanuel Vadot additionalProperties: false 1602eb4d8dcSEmmanuel Vadot properties: 1612eb4d8dcSEmmanuel Vadot channels: 1622eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 1632eb4d8dcSEmmanuel Vadot minItems: 2 1642eb4d8dcSEmmanuel Vadot maxItems: 2 1652eb4d8dcSEmmanuel Vadot description: 1662eb4d8dcSEmmanuel Vadot Pairs of first and last channel number of the selected 1672eb4d8dcSEmmanuel Vadot band 1682eb4d8dcSEmmanuel Vadot 1692eb4d8dcSEmmanuel Vadot rates-cck: 1702eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-array 1712eb4d8dcSEmmanuel Vadot minItems: 4 1722eb4d8dcSEmmanuel Vadot maxItems: 4 1732eb4d8dcSEmmanuel Vadot description: 1742eb4d8dcSEmmanuel Vadot 4 half-dBm per-rate power limit values 1752eb4d8dcSEmmanuel Vadot 1762eb4d8dcSEmmanuel Vadot rates-ofdm: 1772eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-array 1782eb4d8dcSEmmanuel Vadot minItems: 8 1792eb4d8dcSEmmanuel Vadot maxItems: 8 1802eb4d8dcSEmmanuel Vadot description: 1812eb4d8dcSEmmanuel Vadot 8 half-dBm per-rate power limit values 1822eb4d8dcSEmmanuel Vadot 1832eb4d8dcSEmmanuel Vadot rates-mcs: 1842eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-matrix 1852eb4d8dcSEmmanuel Vadot description: 1862eb4d8dcSEmmanuel Vadot Sets of per-rate power limit values for 802.11n/802.11ac 1872eb4d8dcSEmmanuel Vadot rates for multiple channel bandwidth settings. 1882eb4d8dcSEmmanuel Vadot Each set starts with the number of channel bandwidth 1892eb4d8dcSEmmanuel Vadot settings for which the rate set applies, followed by 1902eb4d8dcSEmmanuel Vadot either 8 or 10 power limit values. The order of the 1912eb4d8dcSEmmanuel Vadot channel bandwidth settings is 20, 40, 80 and 160 MHz. 1922eb4d8dcSEmmanuel Vadot maxItems: 4 1932eb4d8dcSEmmanuel Vadot items: 1942eb4d8dcSEmmanuel Vadot minItems: 9 1952eb4d8dcSEmmanuel Vadot maxItems: 11 1962eb4d8dcSEmmanuel Vadot 1972eb4d8dcSEmmanuel Vadot rates-ru: 1982eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-matrix 1992eb4d8dcSEmmanuel Vadot description: 2002eb4d8dcSEmmanuel Vadot Sets of per-rate power limit values for 802.11ax rates 2012eb4d8dcSEmmanuel Vadot for multiple channel bandwidth or resource unit settings. 2022eb4d8dcSEmmanuel Vadot Each set starts with the number of channel bandwidth or 2032eb4d8dcSEmmanuel Vadot resource unit settings for which the rate set applies, 2042eb4d8dcSEmmanuel Vadot followed by 12 power limit values. The order of the 2052eb4d8dcSEmmanuel Vadot channel resource unit settings is RU26, RU52, RU106, 2062eb4d8dcSEmmanuel Vadot RU242/SU20, RU484/SU40, RU996/SU80 and RU2x996/SU160. 2072eb4d8dcSEmmanuel Vadot items: 2082eb4d8dcSEmmanuel Vadot minItems: 13 2092eb4d8dcSEmmanuel Vadot maxItems: 13 2102eb4d8dcSEmmanuel Vadot 2112eb4d8dcSEmmanuel Vadot txs-delta: 2122eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 2132eb4d8dcSEmmanuel Vadot description: 2142eb4d8dcSEmmanuel Vadot Half-dBm power delta for different numbers of antennas 2152eb4d8dcSEmmanuel Vadot 2162eb4d8dcSEmmanuel Vadotrequired: 2172eb4d8dcSEmmanuel Vadot - compatible 2182eb4d8dcSEmmanuel Vadot - reg 2192eb4d8dcSEmmanuel Vadot 220c9ccf3a3SEmmanuel VadotunevaluatedProperties: false 2212eb4d8dcSEmmanuel Vadot 2222eb4d8dcSEmmanuel Vadotexamples: 2232eb4d8dcSEmmanuel Vadot - | 2242eb4d8dcSEmmanuel Vadot pcie0 { 2252eb4d8dcSEmmanuel Vadot #address-cells = <3>; 2262eb4d8dcSEmmanuel Vadot #size-cells = <2>; 2272eb4d8dcSEmmanuel Vadot wifi@0,0 { 2282eb4d8dcSEmmanuel Vadot compatible = "mediatek,mt76"; 2292eb4d8dcSEmmanuel Vadot reg = <0x0000 0 0 0 0>; 2302eb4d8dcSEmmanuel Vadot ieee80211-freq-limit = <5000000 6000000>; 2312eb4d8dcSEmmanuel Vadot mediatek,mtd-eeprom = <&factory 0x8000>; 2322eb4d8dcSEmmanuel Vadot big-endian; 2332eb4d8dcSEmmanuel Vadot 2342eb4d8dcSEmmanuel Vadot led { 2352eb4d8dcSEmmanuel Vadot led-sources = <2>; 2362eb4d8dcSEmmanuel Vadot }; 2372eb4d8dcSEmmanuel Vadot 2382eb4d8dcSEmmanuel Vadot power-limits { 2392eb4d8dcSEmmanuel Vadot r0 { 2402eb4d8dcSEmmanuel Vadot regdomain = "FCC"; 2412eb4d8dcSEmmanuel Vadot txpower-5g { 2422eb4d8dcSEmmanuel Vadot b0 { 2432eb4d8dcSEmmanuel Vadot channels = <36 48>; 2442eb4d8dcSEmmanuel Vadot rates-ofdm = /bits/ 8 <23 23 23 23 23 23 23 23>; 2452eb4d8dcSEmmanuel Vadot rates-mcs = /bits/ 8 <1 23 23 23 23 23 23 23 23 23 23>, 246e67e8565SEmmanuel Vadot /bits/ 8 <3 22 22 22 22 22 22 22 22 22 22>; 2472eb4d8dcSEmmanuel Vadot rates-ru = /bits/ 8 <3 22 22 22 22 22 22 22 22 22 22 22 22>, 248e67e8565SEmmanuel Vadot /bits/ 8 <4 20 20 20 20 20 20 20 20 20 20 20 20>; 2492eb4d8dcSEmmanuel Vadot }; 2502eb4d8dcSEmmanuel Vadot b1 { 2512eb4d8dcSEmmanuel Vadot channels = <100 181>; 2522eb4d8dcSEmmanuel Vadot rates-ofdm = /bits/ 8 <14 14 14 14 14 14 14 14>; 2532eb4d8dcSEmmanuel Vadot rates-mcs = /bits/ 8 <4 14 14 14 14 14 14 14 14 14 14>; 2542eb4d8dcSEmmanuel Vadot txs-delta = <12 9 6>; 2552eb4d8dcSEmmanuel Vadot rates-ru = /bits/ 8 <7 14 14 14 14 14 14 14 14 14 14 14 14>; 2562eb4d8dcSEmmanuel Vadot }; 2572eb4d8dcSEmmanuel Vadot }; 2582eb4d8dcSEmmanuel Vadot }; 2592eb4d8dcSEmmanuel Vadot }; 2602eb4d8dcSEmmanuel Vadot }; 2612eb4d8dcSEmmanuel Vadot }; 2622eb4d8dcSEmmanuel Vadot 2632eb4d8dcSEmmanuel Vadot - | 2642eb4d8dcSEmmanuel Vadot wifi@10300000 { 2652eb4d8dcSEmmanuel Vadot compatible = "mediatek,mt7628-wmac"; 2662eb4d8dcSEmmanuel Vadot reg = <0x10300000 0x100000>; 2672eb4d8dcSEmmanuel Vadot 2682eb4d8dcSEmmanuel Vadot interrupt-parent = <&cpuintc>; 2692eb4d8dcSEmmanuel Vadot interrupts = <6>; 2702eb4d8dcSEmmanuel Vadot 271*aa1a8ff2SEmmanuel Vadot nvmem-cells = <&eeprom>; 272*aa1a8ff2SEmmanuel Vadot nvmem-cell-names = "eeprom"; 2732eb4d8dcSEmmanuel Vadot }; 2742eb4d8dcSEmmanuel Vadot 2752eb4d8dcSEmmanuel Vadot - | 2762eb4d8dcSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 2772eb4d8dcSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 2782eb4d8dcSEmmanuel Vadot wifi@18000000 { 2792eb4d8dcSEmmanuel Vadot compatible = "mediatek,mt7622-wmac"; 2802eb4d8dcSEmmanuel Vadot reg = <0x10300000 0x100000>; 2812eb4d8dcSEmmanuel Vadot interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_LOW>; 2822eb4d8dcSEmmanuel Vadot 2832eb4d8dcSEmmanuel Vadot mediatek,infracfg = <&infracfg>; 2842eb4d8dcSEmmanuel Vadot 2852eb4d8dcSEmmanuel Vadot power-domains = <&scpsys 3>; 2862eb4d8dcSEmmanuel Vadot }; 287c9ccf3a3SEmmanuel Vadot 288c9ccf3a3SEmmanuel Vadot - | 289c9ccf3a3SEmmanuel Vadot wifi@18000000 { 290c9ccf3a3SEmmanuel Vadot compatible = "mediatek,mt7986-wmac"; 291c9ccf3a3SEmmanuel Vadot resets = <&watchdog 23>; 292c9ccf3a3SEmmanuel Vadot reset-names = "consys"; 293c9ccf3a3SEmmanuel Vadot reg = <0x18000000 0x1000000>, 294c9ccf3a3SEmmanuel Vadot <0x10003000 0x1000>, 295c9ccf3a3SEmmanuel Vadot <0x11d10000 0x1000>; 296c9ccf3a3SEmmanuel Vadot interrupts = <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>; 297b97ee269SEmmanuel Vadot clocks = <&topckgen 50>, 298b97ee269SEmmanuel Vadot <&topckgen 62>; 299b97ee269SEmmanuel Vadot clock-names = "mcu", "ap2conn"; 300c9ccf3a3SEmmanuel Vadot memory-region = <&wmcpu_emi>; 301c9ccf3a3SEmmanuel Vadot }; 302