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 Vadotproperties: 232eb4d8dcSEmmanuel Vadot compatible: 242eb4d8dcSEmmanuel Vadot enum: 252eb4d8dcSEmmanuel Vadot - mediatek,mt76 262eb4d8dcSEmmanuel Vadot - mediatek,mt7628-wmac 272eb4d8dcSEmmanuel Vadot - mediatek,mt7622-wmac 28aa1a8ff2SEmmanuel Vadot - mediatek,mt7981-wmac 29c9ccf3a3SEmmanuel Vadot - mediatek,mt7986-wmac 302eb4d8dcSEmmanuel Vadot 312eb4d8dcSEmmanuel Vadot reg: 32c9ccf3a3SEmmanuel Vadot minItems: 1 33c9ccf3a3SEmmanuel Vadot maxItems: 3 34c9ccf3a3SEmmanuel Vadot description: 35c9ccf3a3SEmmanuel Vadot MT7986 should contain 3 regions consys, dcm, and sku, in this order. 362eb4d8dcSEmmanuel Vadot 372eb4d8dcSEmmanuel Vadot interrupts: 38*01950c46SEmmanuel Vadot minItems: 1 39*01950c46SEmmanuel Vadot items: 40*01950c46SEmmanuel Vadot - description: major interrupt for rings 41*01950c46SEmmanuel Vadot - description: additional interrupt for ring 19 42*01950c46SEmmanuel Vadot - description: additional interrupt for ring 4 43*01950c46SEmmanuel Vadot - description: additional interrupt for ring 5 442eb4d8dcSEmmanuel Vadot 452eb4d8dcSEmmanuel Vadot power-domains: 462eb4d8dcSEmmanuel Vadot maxItems: 1 472eb4d8dcSEmmanuel Vadot 48c9ccf3a3SEmmanuel Vadot memory-region: 49c9ccf3a3SEmmanuel Vadot maxItems: 1 50c9ccf3a3SEmmanuel Vadot 51c9ccf3a3SEmmanuel Vadot resets: 52c9ccf3a3SEmmanuel Vadot maxItems: 1 53c9ccf3a3SEmmanuel Vadot description: 54c9ccf3a3SEmmanuel Vadot Specify the consys reset for mt7986. 55c9ccf3a3SEmmanuel Vadot 56d5b0e70fSEmmanuel Vadot reset-names: 57c9ccf3a3SEmmanuel Vadot const: consys 58c9ccf3a3SEmmanuel Vadot 59b97ee269SEmmanuel Vadot clocks: 60b97ee269SEmmanuel Vadot maxItems: 2 61b97ee269SEmmanuel Vadot description: 62b97ee269SEmmanuel Vadot Specify the consys clocks for mt7986. 63b97ee269SEmmanuel Vadot 64b97ee269SEmmanuel Vadot clock-names: 65b97ee269SEmmanuel Vadot items: 66b97ee269SEmmanuel Vadot - const: mcu 67b97ee269SEmmanuel Vadot - const: ap2conn 68b97ee269SEmmanuel Vadot 692eb4d8dcSEmmanuel Vadot mediatek,infracfg: 702eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 712eb4d8dcSEmmanuel Vadot description: 722eb4d8dcSEmmanuel Vadot Phandle to the infrastructure bus fabric syscon node. 732eb4d8dcSEmmanuel Vadot This property is MT7622 specific 742eb4d8dcSEmmanuel Vadot 752eb4d8dcSEmmanuel Vadot ieee80211-freq-limit: true 762eb4d8dcSEmmanuel Vadot 77aa1a8ff2SEmmanuel Vadot nvmem-cells: 78aa1a8ff2SEmmanuel Vadot items: 79aa1a8ff2SEmmanuel Vadot - description: NVMEM cell with EEPROM 80aa1a8ff2SEmmanuel Vadot 81aa1a8ff2SEmmanuel Vadot nvmem-cell-names: 82aa1a8ff2SEmmanuel Vadot items: 83aa1a8ff2SEmmanuel Vadot - const: eeprom 84aa1a8ff2SEmmanuel Vadot 858cc087a1SEmmanuel Vadot mediatek,eeprom-data: 868cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 878cc087a1SEmmanuel Vadot description: 888cc087a1SEmmanuel Vadot EEPROM data embedded as array. 898cc087a1SEmmanuel Vadot 902eb4d8dcSEmmanuel Vadot mediatek,mtd-eeprom: 912eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle-array 92c9ccf3a3SEmmanuel Vadot items: 93c9ccf3a3SEmmanuel Vadot - items: 94c9ccf3a3SEmmanuel Vadot - description: phandle to MTD partition 95c9ccf3a3SEmmanuel Vadot - description: offset containing EEPROM data 962eb4d8dcSEmmanuel Vadot description: 972eb4d8dcSEmmanuel Vadot Phandle to a MTD partition + offset containing EEPROM data 98aa1a8ff2SEmmanuel Vadot deprecated: true 992eb4d8dcSEmmanuel Vadot 1002eb4d8dcSEmmanuel Vadot big-endian: 1012eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 1022eb4d8dcSEmmanuel Vadot description: 1032eb4d8dcSEmmanuel Vadot Specify if the radio eeprom partition is written in big-endian 1042eb4d8dcSEmmanuel Vadot 1052eb4d8dcSEmmanuel Vadot mediatek,eeprom-merge-otp: 1062eb4d8dcSEmmanuel Vadot type: boolean 1072eb4d8dcSEmmanuel Vadot description: 1082eb4d8dcSEmmanuel Vadot Merge EEPROM data with OTP data. Can be used on boards where the flash 1092eb4d8dcSEmmanuel Vadot calibration data is generic and specific calibration data should be 1102eb4d8dcSEmmanuel Vadot pulled from the OTP ROM 1112eb4d8dcSEmmanuel Vadot 112c9ccf3a3SEmmanuel Vadot mediatek,disable-radar-background: 113c9ccf3a3SEmmanuel Vadot type: boolean 114c9ccf3a3SEmmanuel Vadot description: 115c9ccf3a3SEmmanuel Vadot Disable/enable radar/CAC detection running on a dedicated offchannel 116c9ccf3a3SEmmanuel Vadot chain available on some hw. 117c9ccf3a3SEmmanuel Vadot Background radar/CAC detection allows to avoid the CAC downtime 118c9ccf3a3SEmmanuel Vadot switching on a different channel during CAC detection on the selected 119c9ccf3a3SEmmanuel Vadot radar channel. 120c9ccf3a3SEmmanuel Vadot 1212eb4d8dcSEmmanuel Vadot led: 1222eb4d8dcSEmmanuel Vadot type: object 1232eb4d8dcSEmmanuel Vadot $ref: /schemas/leds/common.yaml# 1242eb4d8dcSEmmanuel Vadot additionalProperties: false 1252eb4d8dcSEmmanuel Vadot properties: 126fac71e4eSEmmanuel Vadot led-active-low: 127fac71e4eSEmmanuel Vadot description: 128fac71e4eSEmmanuel Vadot LED is enabled with ground signal. 129fac71e4eSEmmanuel Vadot type: boolean 130fac71e4eSEmmanuel Vadot 1312eb4d8dcSEmmanuel Vadot led-sources: 1322eb4d8dcSEmmanuel Vadot maxItems: 1 1332eb4d8dcSEmmanuel Vadot 1342eb4d8dcSEmmanuel Vadot power-limits: 1352eb4d8dcSEmmanuel Vadot type: object 1362eb4d8dcSEmmanuel Vadot additionalProperties: false 1372eb4d8dcSEmmanuel Vadot patternProperties: 1382eb4d8dcSEmmanuel Vadot "^r[0-9]+": 1392eb4d8dcSEmmanuel Vadot type: object 1402eb4d8dcSEmmanuel Vadot additionalProperties: false 1412eb4d8dcSEmmanuel Vadot properties: 1422eb4d8dcSEmmanuel Vadot regdomain: 1432eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 1442eb4d8dcSEmmanuel Vadot description: 1452eb4d8dcSEmmanuel Vadot Regdomain refers to a legal regulatory region. Different 1462eb4d8dcSEmmanuel Vadot countries define different levels of allowable transmitter 1472eb4d8dcSEmmanuel Vadot power, time that a channel can be occupied, and different 1482eb4d8dcSEmmanuel Vadot available channels 1492eb4d8dcSEmmanuel Vadot enum: 1502eb4d8dcSEmmanuel Vadot - FCC 1512eb4d8dcSEmmanuel Vadot - ETSI 1522eb4d8dcSEmmanuel Vadot - JP 1532eb4d8dcSEmmanuel Vadot 1542eb4d8dcSEmmanuel Vadot patternProperties: 1552eb4d8dcSEmmanuel Vadot "^txpower-[256]g$": 1562eb4d8dcSEmmanuel Vadot type: object 1572eb4d8dcSEmmanuel Vadot additionalProperties: false 1582eb4d8dcSEmmanuel Vadot patternProperties: 1592eb4d8dcSEmmanuel Vadot "^b[0-9]+$": 1602eb4d8dcSEmmanuel Vadot type: object 1612eb4d8dcSEmmanuel Vadot additionalProperties: false 1622eb4d8dcSEmmanuel Vadot properties: 1632eb4d8dcSEmmanuel Vadot channels: 1642eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 1652eb4d8dcSEmmanuel Vadot minItems: 2 1662eb4d8dcSEmmanuel Vadot maxItems: 2 1672eb4d8dcSEmmanuel Vadot description: 1682eb4d8dcSEmmanuel Vadot Pairs of first and last channel number of the selected 1692eb4d8dcSEmmanuel Vadot band 1702eb4d8dcSEmmanuel Vadot 1712eb4d8dcSEmmanuel Vadot rates-cck: 1722eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-array 1732eb4d8dcSEmmanuel Vadot minItems: 4 1742eb4d8dcSEmmanuel Vadot maxItems: 4 1752eb4d8dcSEmmanuel Vadot description: 1762eb4d8dcSEmmanuel Vadot 4 half-dBm per-rate power limit values 1772eb4d8dcSEmmanuel Vadot 1782eb4d8dcSEmmanuel Vadot rates-ofdm: 1792eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-array 1802eb4d8dcSEmmanuel Vadot minItems: 8 1812eb4d8dcSEmmanuel Vadot maxItems: 8 1822eb4d8dcSEmmanuel Vadot description: 1832eb4d8dcSEmmanuel Vadot 8 half-dBm per-rate power limit values 1842eb4d8dcSEmmanuel Vadot 1852eb4d8dcSEmmanuel Vadot rates-mcs: 1862eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-matrix 1872eb4d8dcSEmmanuel Vadot description: 1882eb4d8dcSEmmanuel Vadot Sets of per-rate power limit values for 802.11n/802.11ac 1892eb4d8dcSEmmanuel Vadot rates for multiple channel bandwidth settings. 1902eb4d8dcSEmmanuel Vadot Each set starts with the number of channel bandwidth 1912eb4d8dcSEmmanuel Vadot settings for which the rate set applies, followed by 1922eb4d8dcSEmmanuel Vadot either 8 or 10 power limit values. The order of the 1932eb4d8dcSEmmanuel Vadot channel bandwidth settings is 20, 40, 80 and 160 MHz. 1942eb4d8dcSEmmanuel Vadot maxItems: 4 1952eb4d8dcSEmmanuel Vadot items: 1962eb4d8dcSEmmanuel Vadot minItems: 9 1972eb4d8dcSEmmanuel Vadot maxItems: 11 1982eb4d8dcSEmmanuel Vadot 1992eb4d8dcSEmmanuel Vadot rates-ru: 2002eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-matrix 2012eb4d8dcSEmmanuel Vadot description: 2022eb4d8dcSEmmanuel Vadot Sets of per-rate power limit values for 802.11ax rates 2032eb4d8dcSEmmanuel Vadot for multiple channel bandwidth or resource unit settings. 2042eb4d8dcSEmmanuel Vadot Each set starts with the number of channel bandwidth or 2052eb4d8dcSEmmanuel Vadot resource unit settings for which the rate set applies, 2062eb4d8dcSEmmanuel Vadot followed by 12 power limit values. The order of the 2072eb4d8dcSEmmanuel Vadot channel resource unit settings is RU26, RU52, RU106, 2082eb4d8dcSEmmanuel Vadot RU242/SU20, RU484/SU40, RU996/SU80 and RU2x996/SU160. 2092eb4d8dcSEmmanuel Vadot items: 2102eb4d8dcSEmmanuel Vadot minItems: 13 2112eb4d8dcSEmmanuel Vadot maxItems: 13 2122eb4d8dcSEmmanuel Vadot 2132eb4d8dcSEmmanuel Vadot txs-delta: 2142eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 2152eb4d8dcSEmmanuel Vadot description: 2162eb4d8dcSEmmanuel Vadot Half-dBm power delta for different numbers of antennas 2172eb4d8dcSEmmanuel Vadot 2182eb4d8dcSEmmanuel Vadotrequired: 2192eb4d8dcSEmmanuel Vadot - compatible 2202eb4d8dcSEmmanuel Vadot - reg 2212eb4d8dcSEmmanuel Vadot 222*01950c46SEmmanuel VadotallOf: 223*01950c46SEmmanuel Vadot - $ref: ieee80211.yaml# 224*01950c46SEmmanuel Vadot - if: 225*01950c46SEmmanuel Vadot properties: 226*01950c46SEmmanuel Vadot compatible: 227*01950c46SEmmanuel Vadot contains: 228*01950c46SEmmanuel Vadot enum: 229*01950c46SEmmanuel Vadot - mediatek,mt7981-wmac 230*01950c46SEmmanuel Vadot - mediatek,mt7986-wmac 231*01950c46SEmmanuel Vadot then: 232*01950c46SEmmanuel Vadot properties: 233*01950c46SEmmanuel Vadot interrupts: 234*01950c46SEmmanuel Vadot minItems: 4 235*01950c46SEmmanuel Vadot else: 236*01950c46SEmmanuel Vadot properties: 237*01950c46SEmmanuel Vadot interrupts: 238*01950c46SEmmanuel Vadot maxItems: 1 239*01950c46SEmmanuel Vadot 240c9ccf3a3SEmmanuel VadotunevaluatedProperties: false 2412eb4d8dcSEmmanuel Vadot 2422eb4d8dcSEmmanuel Vadotexamples: 2432eb4d8dcSEmmanuel Vadot - | 2442eb4d8dcSEmmanuel Vadot pcie0 { 2452eb4d8dcSEmmanuel Vadot #address-cells = <3>; 2462eb4d8dcSEmmanuel Vadot #size-cells = <2>; 2472eb4d8dcSEmmanuel Vadot wifi@0,0 { 2482eb4d8dcSEmmanuel Vadot compatible = "mediatek,mt76"; 2492eb4d8dcSEmmanuel Vadot reg = <0x0000 0 0 0 0>; 2502eb4d8dcSEmmanuel Vadot ieee80211-freq-limit = <5000000 6000000>; 2512eb4d8dcSEmmanuel Vadot mediatek,mtd-eeprom = <&factory 0x8000>; 2522eb4d8dcSEmmanuel Vadot big-endian; 2532eb4d8dcSEmmanuel Vadot 2542eb4d8dcSEmmanuel Vadot led { 2552eb4d8dcSEmmanuel Vadot led-sources = <2>; 2562eb4d8dcSEmmanuel Vadot }; 2572eb4d8dcSEmmanuel Vadot 2582eb4d8dcSEmmanuel Vadot power-limits { 2592eb4d8dcSEmmanuel Vadot r0 { 2602eb4d8dcSEmmanuel Vadot regdomain = "FCC"; 2612eb4d8dcSEmmanuel Vadot txpower-5g { 2622eb4d8dcSEmmanuel Vadot b0 { 2632eb4d8dcSEmmanuel Vadot channels = <36 48>; 2642eb4d8dcSEmmanuel Vadot rates-ofdm = /bits/ 8 <23 23 23 23 23 23 23 23>; 2652eb4d8dcSEmmanuel Vadot rates-mcs = /bits/ 8 <1 23 23 23 23 23 23 23 23 23 23>, 266e67e8565SEmmanuel Vadot /bits/ 8 <3 22 22 22 22 22 22 22 22 22 22>; 2672eb4d8dcSEmmanuel Vadot rates-ru = /bits/ 8 <3 22 22 22 22 22 22 22 22 22 22 22 22>, 268e67e8565SEmmanuel Vadot /bits/ 8 <4 20 20 20 20 20 20 20 20 20 20 20 20>; 2692eb4d8dcSEmmanuel Vadot }; 2702eb4d8dcSEmmanuel Vadot b1 { 2712eb4d8dcSEmmanuel Vadot channels = <100 181>; 2722eb4d8dcSEmmanuel Vadot rates-ofdm = /bits/ 8 <14 14 14 14 14 14 14 14>; 2732eb4d8dcSEmmanuel Vadot rates-mcs = /bits/ 8 <4 14 14 14 14 14 14 14 14 14 14>; 2742eb4d8dcSEmmanuel Vadot txs-delta = <12 9 6>; 2752eb4d8dcSEmmanuel Vadot rates-ru = /bits/ 8 <7 14 14 14 14 14 14 14 14 14 14 14 14>; 2762eb4d8dcSEmmanuel Vadot }; 2772eb4d8dcSEmmanuel Vadot }; 2782eb4d8dcSEmmanuel Vadot }; 2792eb4d8dcSEmmanuel Vadot }; 2802eb4d8dcSEmmanuel Vadot }; 2812eb4d8dcSEmmanuel Vadot }; 2822eb4d8dcSEmmanuel Vadot 2832eb4d8dcSEmmanuel Vadot - | 2842eb4d8dcSEmmanuel Vadot wifi@10300000 { 2852eb4d8dcSEmmanuel Vadot compatible = "mediatek,mt7628-wmac"; 2862eb4d8dcSEmmanuel Vadot reg = <0x10300000 0x100000>; 2872eb4d8dcSEmmanuel Vadot 2882eb4d8dcSEmmanuel Vadot interrupt-parent = <&cpuintc>; 2892eb4d8dcSEmmanuel Vadot interrupts = <6>; 2902eb4d8dcSEmmanuel Vadot 291aa1a8ff2SEmmanuel Vadot nvmem-cells = <&eeprom>; 292aa1a8ff2SEmmanuel Vadot nvmem-cell-names = "eeprom"; 2932eb4d8dcSEmmanuel Vadot }; 2942eb4d8dcSEmmanuel Vadot 2952eb4d8dcSEmmanuel Vadot - | 2962eb4d8dcSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 2972eb4d8dcSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 2982eb4d8dcSEmmanuel Vadot wifi@18000000 { 2992eb4d8dcSEmmanuel Vadot compatible = "mediatek,mt7622-wmac"; 3002eb4d8dcSEmmanuel Vadot reg = <0x10300000 0x100000>; 3012eb4d8dcSEmmanuel Vadot interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_LOW>; 3022eb4d8dcSEmmanuel Vadot 3032eb4d8dcSEmmanuel Vadot mediatek,infracfg = <&infracfg>; 3042eb4d8dcSEmmanuel Vadot 3052eb4d8dcSEmmanuel Vadot power-domains = <&scpsys 3>; 3062eb4d8dcSEmmanuel Vadot }; 307c9ccf3a3SEmmanuel Vadot 308c9ccf3a3SEmmanuel Vadot - | 309c9ccf3a3SEmmanuel Vadot wifi@18000000 { 310c9ccf3a3SEmmanuel Vadot compatible = "mediatek,mt7986-wmac"; 311c9ccf3a3SEmmanuel Vadot resets = <&watchdog 23>; 312c9ccf3a3SEmmanuel Vadot reset-names = "consys"; 313c9ccf3a3SEmmanuel Vadot reg = <0x18000000 0x1000000>, 314c9ccf3a3SEmmanuel Vadot <0x10003000 0x1000>, 315c9ccf3a3SEmmanuel Vadot <0x11d10000 0x1000>; 316*01950c46SEmmanuel Vadot interrupts = <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>, 317*01950c46SEmmanuel Vadot <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>, 318*01950c46SEmmanuel Vadot <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>, 319*01950c46SEmmanuel Vadot <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>; 320b97ee269SEmmanuel Vadot clocks = <&topckgen 50>, 321b97ee269SEmmanuel Vadot <&topckgen 62>; 322b97ee269SEmmanuel Vadot clock-names = "mcu", "ap2conn"; 323c9ccf3a3SEmmanuel Vadot memory-region = <&wmcpu_emi>; 324c9ccf3a3SEmmanuel Vadot }; 325