* [PATCH v2 0/2] dt-bindings: convert mt76 and ieee80211 in yaml @ 2021-03-14 20:21 Lorenzo Bianconi 2021-03-14 20:21 ` [PATCH v2 1/2] dt-bindings:net:wireless:ieee80211: txt to yaml conversion Lorenzo Bianconi 2021-03-14 20:21 ` [PATCH v2 2/2] dt-bindings:net:wireless:mediatek,mt76: " Lorenzo Bianconi 0 siblings, 2 replies; 7+ messages in thread From: Lorenzo Bianconi @ 2021-03-14 20:21 UTC (permalink / raw) To: nbd Cc: linux-wireless, lorenzo.bianconi, robh, devicetree, sean.wang, ryder.lee, johannes Convert mt76 and ieee802111 dts bindings from .txt to .yaml Changes since v1: - introduce ieee80211.yaml bindings - remove unnecessary properties in mt76.yaml Lorenzo Bianconi (2): dt-bindings:net:wireless:ieee80211: txt to yaml conversion dt-bindings:net:wireless:mediatek,mt76: txt to yaml conversion .../bindings/net/wireless/ieee80211.txt | 24 ---- .../bindings/net/wireless/ieee80211.yaml | 41 ++++++ .../bindings/net/wireless/mediatek,mt76.txt | 78 ------------ .../bindings/net/wireless/mediatek,mt76.yaml | 117 ++++++++++++++++++ 4 files changed, 158 insertions(+), 102 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/wireless/ieee80211.txt create mode 100644 Documentation/devicetree/bindings/net/wireless/ieee80211.yaml delete mode 100644 Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt create mode 100644 Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml -- 2.29.2 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] dt-bindings:net:wireless:ieee80211: txt to yaml conversion 2021-03-14 20:21 [PATCH v2 0/2] dt-bindings: convert mt76 and ieee80211 in yaml Lorenzo Bianconi @ 2021-03-14 20:21 ` Lorenzo Bianconi 2021-03-24 17:16 ` Rob Herring 2021-03-24 21:03 ` Johannes Berg 2021-03-14 20:21 ` [PATCH v2 2/2] dt-bindings:net:wireless:mediatek,mt76: " Lorenzo Bianconi 1 sibling, 2 replies; 7+ messages in thread From: Lorenzo Bianconi @ 2021-03-14 20:21 UTC (permalink / raw) To: nbd Cc: linux-wireless, lorenzo.bianconi, robh, devicetree, sean.wang, ryder.lee, johannes Convert generic ieee80211 dts bindings from .txt to .yaml Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> --- .../bindings/net/wireless/ieee80211.txt | 24 ----------- .../bindings/net/wireless/ieee80211.yaml | 41 +++++++++++++++++++ 2 files changed, 41 insertions(+), 24 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/wireless/ieee80211.txt create mode 100644 Documentation/devicetree/bindings/net/wireless/ieee80211.yaml diff --git a/Documentation/devicetree/bindings/net/wireless/ieee80211.txt b/Documentation/devicetree/bindings/net/wireless/ieee80211.txt deleted file mode 100644 index f6442b1397f5..000000000000 --- a/Documentation/devicetree/bindings/net/wireless/ieee80211.txt +++ /dev/null @@ -1,24 +0,0 @@ -Common IEEE 802.11 properties - -This provides documentation of common properties that are valid for all wireless -devices. - -Optional properties: - - ieee80211-freq-limit : list of supported frequency ranges in KHz. This can be - used for devices that in a given config support less channels than - normally. It may happen chipset supports a wide wireless band but it is - limited to some part of it due to used antennas or power amplifier. - An example case for this can be tri-band wireless router with two - identical chipsets used for two different 5 GHz subbands. Using them - incorrectly could not work or decrease performance noticeably. - -Example: - -pcie@0,0 { - reg = <0x0000 0 0 0 0>; - wifi@0,0 { - reg = <0x0000 0 0 0 0>; - ieee80211-freq-limit = <2402000 2482000>, - <5170000 5250000>; - }; -}; diff --git a/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml b/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml new file mode 100644 index 000000000000..6fb9ae7403c1 --- /dev/null +++ b/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. + +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/wireless/ieee80211.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common IEEE 802.11 Binding + +maintainers: + - Johannes Berg <johannes@sipsolutions.net> + +description: | + This provides documentation of common properties that are valid for + all wireless devices + +properties: + ieee80211-freq-limit: + description: + List of supported frequency ranges in KHz. This can be used for devices + that in a given config support less channels than normally. It may happen + chipset supports a wide wireless band but it is limited to some part of + it due to used antennas or power amplifier. An example case for this + can be tri-band wireless router with two identical chipsets used for two + different 5 GHz subbands. Using them incorrectly could not work or + decrease performance noticeably + +additionalProperties: true + +examples: + - | + pcie0 { + #address-cells = <3>; + #size-cells = <2>; + wifi@0,0 { + reg = <0x0000 0 0 0 0>; + ieee80211-freq-limit = <2402000 2482000>, + <5170000 5250000>; + }; + }; -- 2.29.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings:net:wireless:ieee80211: txt to yaml conversion 2021-03-14 20:21 ` [PATCH v2 1/2] dt-bindings:net:wireless:ieee80211: txt to yaml conversion Lorenzo Bianconi @ 2021-03-24 17:16 ` Rob Herring 2021-03-24 21:03 ` Johannes Berg 1 sibling, 0 replies; 7+ messages in thread From: Rob Herring @ 2021-03-24 17:16 UTC (permalink / raw) To: Lorenzo Bianconi Cc: nbd, linux-wireless, lorenzo.bianconi, devicetree, sean.wang, ryder.lee, johannes On Sun, Mar 14, 2021 at 09:21:06PM +0100, Lorenzo Bianconi wrote: > Convert generic ieee80211 dts bindings from .txt to .yaml > > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> > --- > .../bindings/net/wireless/ieee80211.txt | 24 ----------- > .../bindings/net/wireless/ieee80211.yaml | 41 +++++++++++++++++++ > 2 files changed, 41 insertions(+), 24 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/net/wireless/ieee80211.txt > create mode 100644 Documentation/devicetree/bindings/net/wireless/ieee80211.yaml > > diff --git a/Documentation/devicetree/bindings/net/wireless/ieee80211.txt b/Documentation/devicetree/bindings/net/wireless/ieee80211.txt > deleted file mode 100644 > index f6442b1397f5..000000000000 > --- a/Documentation/devicetree/bindings/net/wireless/ieee80211.txt > +++ /dev/null > @@ -1,24 +0,0 @@ > -Common IEEE 802.11 properties > - > -This provides documentation of common properties that are valid for all wireless > -devices. > - > -Optional properties: > - - ieee80211-freq-limit : list of supported frequency ranges in KHz. This can be > - used for devices that in a given config support less channels than > - normally. It may happen chipset supports a wide wireless band but it is > - limited to some part of it due to used antennas or power amplifier. > - An example case for this can be tri-band wireless router with two > - identical chipsets used for two different 5 GHz subbands. Using them > - incorrectly could not work or decrease performance noticeably. > - > -Example: > - > -pcie@0,0 { > - reg = <0x0000 0 0 0 0>; > - wifi@0,0 { > - reg = <0x0000 0 0 0 0>; > - ieee80211-freq-limit = <2402000 2482000>, > - <5170000 5250000>; > - }; > -}; > diff --git a/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml b/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml > new file mode 100644 > index 000000000000..6fb9ae7403c1 > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml > @@ -0,0 +1,41 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. > + > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/wireless/ieee80211.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Common IEEE 802.11 Binding > + > +maintainers: > + - Johannes Berg <johannes@sipsolutions.net> > + > +description: | > + This provides documentation of common properties that are valid for > + all wireless devices > + > +properties: > + ieee80211-freq-limit: Needs a type ref: $ref: /schemas/types.yaml#/definitions/uint32-matrix items: minItems: 2 maxItems: 2 > + description: > + List of supported frequency ranges in KHz. This can be used for devices > + that in a given config support less channels than normally. It may happen > + chipset supports a wide wireless band but it is limited to some part of > + it due to used antennas or power amplifier. An example case for this > + can be tri-band wireless router with two identical chipsets used for two > + different 5 GHz subbands. Using them incorrectly could not work or > + decrease performance noticeably > + > +additionalProperties: true > + > +examples: > + - | > + pcie0 { > + #address-cells = <3>; > + #size-cells = <2>; > + wifi@0,0 { > + reg = <0x0000 0 0 0 0>; > + ieee80211-freq-limit = <2402000 2482000>, > + <5170000 5250000>; > + }; > + }; > -- > 2.29.2 > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings:net:wireless:ieee80211: txt to yaml conversion 2021-03-14 20:21 ` [PATCH v2 1/2] dt-bindings:net:wireless:ieee80211: txt to yaml conversion Lorenzo Bianconi 2021-03-24 17:16 ` Rob Herring @ 2021-03-24 21:03 ` Johannes Berg 2021-03-24 21:17 ` Lorenzo Bianconi 1 sibling, 1 reply; 7+ messages in thread From: Johannes Berg @ 2021-03-24 21:03 UTC (permalink / raw) To: Lorenzo Bianconi, nbd Cc: linux-wireless, lorenzo.bianconi, robh, devicetree, sean.wang, ryder.lee On Sun, 2021-03-14 at 21:21 +0100, Lorenzo Bianconi wrote: > > +++ b/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml > @@ -0,0 +1,41 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. > + > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/wireless/ieee80211.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Common IEEE 802.11 Binding > + > +maintainers: > + - Johannes Berg <johannes@sipsolutions.net> Heh, now I realize why I got CC'ed on these patches. I'm not sure that's really all that appropriate? I may be the wireless stack maintainer, but I really don't know much about DT, and so I'm not convinced that this entry helps anyone... johannes ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings:net:wireless:ieee80211: txt to yaml conversion 2021-03-24 21:03 ` Johannes Berg @ 2021-03-24 21:17 ` Lorenzo Bianconi 0 siblings, 0 replies; 7+ messages in thread From: Lorenzo Bianconi @ 2021-03-24 21:17 UTC (permalink / raw) To: Johannes Berg Cc: nbd, linux-wireless, lorenzo.bianconi, robh, devicetree, sean.wang, ryder.lee [-- Attachment #1: Type: text/plain, Size: 968 bytes --] > On Sun, 2021-03-14 at 21:21 +0100, Lorenzo Bianconi wrote: > > > > +++ b/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml > > @@ -0,0 +1,41 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. > > + > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/net/wireless/ieee80211.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Common IEEE 802.11 Binding > > + > > +maintainers: > > + - Johannes Berg <johannes@sipsolutions.net> > > Heh, now I realize why I got CC'ed on these patches. > > I'm not sure that's really all that appropriate? I may be the wireless > stack maintainer, but I really don't know much about DT, and so I'm not > convinced that this entry helps anyone... ack, I will add myself as maintainer (but I am not an expert as well :)) Regards, Lorenzo > > johannes > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] dt-bindings:net:wireless:mediatek,mt76: txt to yaml conversion 2021-03-14 20:21 [PATCH v2 0/2] dt-bindings: convert mt76 and ieee80211 in yaml Lorenzo Bianconi 2021-03-14 20:21 ` [PATCH v2 1/2] dt-bindings:net:wireless:ieee80211: txt to yaml conversion Lorenzo Bianconi @ 2021-03-14 20:21 ` Lorenzo Bianconi 2021-03-24 17:40 ` Rob Herring 1 sibling, 1 reply; 7+ messages in thread From: Lorenzo Bianconi @ 2021-03-14 20:21 UTC (permalink / raw) To: nbd Cc: linux-wireless, lorenzo.bianconi, robh, devicetree, sean.wang, ryder.lee, johannes Convert mt76 dts bindings from .txt to .yaml Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> --- .../bindings/net/wireless/mediatek,mt76.txt | 78 ------------ .../bindings/net/wireless/mediatek,mt76.yaml | 117 ++++++++++++++++++ 2 files changed, 117 insertions(+), 78 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt create mode 100644 Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt deleted file mode 100644 index ab7e7a00e534..000000000000 --- a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt +++ /dev/null @@ -1,78 +0,0 @@ -* MediaTek mt76xx devices - -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 SoC. For SoC, use the following compatible strings: - -compatible: -- "mediatek,mt7628-wmac" for MT7628/MT7688 -- "mediatek,mt7622-wmac" for MT7622 - -properties: -- reg: Address and length of the register set for the device. -- interrupts: Main device interrupt - -MT7622 specific properties: -- power-domains: phandle to the power domain that the WMAC is part of -- mediatek,infracfg: phandle to the infrastructure bus fabric syscon node - -Optional properties: - -- ieee80211-freq-limit: See ieee80211.txt -- mediatek,mtd-eeprom: Specify a MTD partition + offset containing EEPROM data -- big-endian: if the radio eeprom partition is written in big-endian, specify - this property -- mediatek,eeprom-merge-otp: 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 - -The MAC address can as well be set with corresponding optional properties -defined in net/ethernet.txt. - -Optional nodes: -- led: Properties for a connected LED - Optional properties: - - led-sources: See Documentation/devicetree/bindings/leds/common.txt - -&pcie { - pcie0 { - 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>; - }; - }; - }; -}; - -MT7628 example: - -wmac: wmac@10300000 { - compatible = "mediatek,mt7628-wmac"; - reg = <0x10300000 0x100000>; - - interrupt-parent = <&cpuintc>; - interrupts = <6>; - - mediatek,mtd-eeprom = <&factory 0x0000>; -}; - -MT7622 example: - -wmac: wmac@18000000 { - compatible = "mediatek,mt7622-wmac"; - reg = <0 0x18000000 0 0x100000>; - interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_LOW>; - - mediatek,infracfg = <&infracfg>; - - power-domains = <&scpsys MT7622_POWER_DOMAIN_WB>; -}; diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml new file mode 100644 index 000000000000..f472a09609e8 --- /dev/null +++ b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml @@ -0,0 +1,117 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. + +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/wireless/mediatek,mt76.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek mt76 wireless devices Generic Binding + +maintainers: + - Felix Fietkau <nbd@nbd.name> + - Lorenzo Bianconi <lorenzo@kernel.org> + +description: | + 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 SoC. + +properties: + compatible: + enum: + - mediatek,mt76 + - mediatek,mt7628-wmac + - mediatek,mt7622-wmac + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + power-domains: + maxItems: 1 + + mediatek,infracfg: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the infrastructure bus fabric syscon node. + This property is MT7622 specific + + ieee80211-freq-limit: + $ref: ieee80211.yaml# + + mediatek,mtd-eeprom: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: + Phandle to a MTD partition + offset containing EEPROM data + + big-endian: + type: boolean + description: + Specify if the radio eeprom partition is written in big-endian + + mediatek,eeprom-merge-otp: + type: boolean + description: + 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 + + led: + type: object + properties: + led-sources: + maxItems: 1 + $ref: /schemas/types.yaml#/definitions/uint32-array + description: + List of device current outputs the LED is connected to + +required: + - compatible + - reg + +additionalProperties: false + +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>; + }; + }; + }; + + - | + wmac: wmac@10300000 { + compatible = "mediatek,mt7628-wmac"; + reg = <0x10300000 0x100000>; + + interrupt-parent = <&cpuintc>; + interrupts = <6>; + + mediatek,mtd-eeprom = <&factory 0x0>; + }; + + - | + wlmac: wmac@18000000 { + compatible = "mediatek,mt7622-wmac"; + reg = <0x10300000 0x100000>; + interrupts = <0 211 8>; + + mediatek,infracfg = <&infracfg>; + + power-domains = <&scpsys 3>; + }; -- 2.29.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] dt-bindings:net:wireless:mediatek,mt76: txt to yaml conversion 2021-03-14 20:21 ` [PATCH v2 2/2] dt-bindings:net:wireless:mediatek,mt76: " Lorenzo Bianconi @ 2021-03-24 17:40 ` Rob Herring 0 siblings, 0 replies; 7+ messages in thread From: Rob Herring @ 2021-03-24 17:40 UTC (permalink / raw) To: Lorenzo Bianconi Cc: nbd, linux-wireless, lorenzo.bianconi, devicetree, sean.wang, ryder.lee, johannes On Sun, Mar 14, 2021 at 09:21:07PM +0100, Lorenzo Bianconi wrote: > Convert mt76 dts bindings from .txt to .yaml > > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> > --- > .../bindings/net/wireless/mediatek,mt76.txt | 78 ------------ > .../bindings/net/wireless/mediatek,mt76.yaml | 117 ++++++++++++++++++ > 2 files changed, 117 insertions(+), 78 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt > create mode 100644 Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml > > diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt > deleted file mode 100644 > index ab7e7a00e534..000000000000 > --- a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt > +++ /dev/null > @@ -1,78 +0,0 @@ > -* MediaTek mt76xx devices > - > -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 SoC. For SoC, use the following compatible strings: > - > -compatible: > -- "mediatek,mt7628-wmac" for MT7628/MT7688 > -- "mediatek,mt7622-wmac" for MT7622 > - > -properties: > -- reg: Address and length of the register set for the device. > -- interrupts: Main device interrupt > - > -MT7622 specific properties: > -- power-domains: phandle to the power domain that the WMAC is part of > -- mediatek,infracfg: phandle to the infrastructure bus fabric syscon node > - > -Optional properties: > - > -- ieee80211-freq-limit: See ieee80211.txt > -- mediatek,mtd-eeprom: Specify a MTD partition + offset containing EEPROM data > -- big-endian: if the radio eeprom partition is written in big-endian, specify > - this property > -- mediatek,eeprom-merge-otp: 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 > - > -The MAC address can as well be set with corresponding optional properties > -defined in net/ethernet.txt. > - > -Optional nodes: > -- led: Properties for a connected LED > - Optional properties: > - - led-sources: See Documentation/devicetree/bindings/leds/common.txt > - > -&pcie { > - pcie0 { > - 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>; > - }; > - }; > - }; > -}; > - > -MT7628 example: > - > -wmac: wmac@10300000 { > - compatible = "mediatek,mt7628-wmac"; > - reg = <0x10300000 0x100000>; > - > - interrupt-parent = <&cpuintc>; > - interrupts = <6>; > - > - mediatek,mtd-eeprom = <&factory 0x0000>; > -}; > - > -MT7622 example: > - > -wmac: wmac@18000000 { > - compatible = "mediatek,mt7622-wmac"; > - reg = <0 0x18000000 0 0x100000>; > - interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_LOW>; > - > - mediatek,infracfg = <&infracfg>; > - > - power-domains = <&scpsys MT7622_POWER_DOMAIN_WB>; > -}; > diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml > new file mode 100644 > index 000000000000..f472a09609e8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml > @@ -0,0 +1,117 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. > + > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/wireless/mediatek,mt76.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MediaTek mt76 wireless devices Generic Binding > + > +maintainers: > + - Felix Fietkau <nbd@nbd.name> > + - Lorenzo Bianconi <lorenzo@kernel.org> > + > +description: | > + 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 SoC. > + > +properties: > + compatible: > + enum: > + - mediatek,mt76 > + - mediatek,mt7628-wmac > + - mediatek,mt7622-wmac > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + power-domains: > + maxItems: 1 > + > + mediatek,infracfg: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > + Phandle to the infrastructure bus fabric syscon node. > + This property is MT7622 specific > + > + ieee80211-freq-limit: > + $ref: ieee80211.yaml# This is defining a node 'ieee80211-freq-limit' which in turn has property 'ieee80211-freq-limit'. You need before 'properties': allOf: - $ref: ieee80211.yaml# > + > + mediatek,mtd-eeprom: > + $ref: /schemas/types.yaml#/definitions/phandle-array > + description: > + Phandle to a MTD partition + offset containing EEPROM data > + > + big-endian: > + type: boolean > + description: > + Specify if the radio eeprom partition is written in big-endian > + > + mediatek,eeprom-merge-otp: > + type: boolean > + description: > + 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 > + > + led: > + type: object $ref: /schemas/leds/common.yaml# additionalProperties: false > + properties: > + led-sources: > + maxItems: 1 And then drop all this: > + $ref: /schemas/types.yaml#/definitions/uint32-array > + description: > + List of device current outputs the LED is connected to > + > +required: > + - compatible > + - reg > + > +additionalProperties: false With the above, this will need to be: unevaluatedProperties: false > + > +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>; > + }; > + }; > + }; > + > + - | > + wmac: wmac@10300000 { wifi@... > + compatible = "mediatek,mt7628-wmac"; > + reg = <0x10300000 0x100000>; > + > + interrupt-parent = <&cpuintc>; > + interrupts = <6>; > + > + mediatek,mtd-eeprom = <&factory 0x0>; > + }; > + > + - | > + wlmac: wmac@18000000 { wifi@... > + compatible = "mediatek,mt7622-wmac"; > + reg = <0x10300000 0x100000>; > + interrupts = <0 211 8>; > + > + mediatek,infracfg = <&infracfg>; > + > + power-domains = <&scpsys 3>; > + }; > -- > 2.29.2 > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-03-24 21:17 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-03-14 20:21 [PATCH v2 0/2] dt-bindings: convert mt76 and ieee80211 in yaml Lorenzo Bianconi 2021-03-14 20:21 ` [PATCH v2 1/2] dt-bindings:net:wireless:ieee80211: txt to yaml conversion Lorenzo Bianconi 2021-03-24 17:16 ` Rob Herring 2021-03-24 21:03 ` Johannes Berg 2021-03-24 21:17 ` Lorenzo Bianconi 2021-03-14 20:21 ` [PATCH v2 2/2] dt-bindings:net:wireless:mediatek,mt76: " Lorenzo Bianconi 2021-03-24 17:40 ` Rob Herring
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.