dt-bindings: net: wireless: Convert WL1251 to DT schema
Subsystems (2)
PATCH 1/1 dt-bindings: net: wireless: Convert WL1251 to DT schema
Convert the Texas Instruments WL1251 Wireless LAN Controller bindings to DT schema.
During the conversion, the following updates were made:
- Added the 'clocks' property. It was missing from the txt binding but is used in device trees (omap3-n900.dts).
- Added 'spi-cpol' and 'spi-cpha'. These were present in the original txt binding's example but missing from its property list.
- 'vio-supply' and 'spi-max-frequency' are no longer required. The txt binding listed them as required, but they are only applicable when the chip is connected via SPI.
--- .../bindings/net/wireless/ti,wl1251.txt | 64 ------------- .../bindings/net/wireless/ti,wl1251.yaml | 92 +++++++++++++++++++ 2 files changed, 92 insertions(+), 64 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt create mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wl1251.yaml
Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt deleted +0 -64
@@ -1,64 +0,0 @@ -* Texas Instruments wl1251 wireless lan controller - -The wl1251 chip can be connected via SPI or via SDIO. This -document describes the binding for the SPI connected chip. - -Required properties: -- compatible : Should be "ti,wl1251" -- reg : Chip select address of device -- spi-max-frequency : Maximum SPI clocking speed of device in Hz -- interrupts : Should contain interrupt line -- vio-supply : phandle to regulator providing VIO - -Optional properties: -- ti,wl1251-has-eeprom : boolean, the wl1251 has an eeprom connected, which - provides configuration data (calibration, MAC, ...) -- ti,power-gpio : GPIO connected to chip's PMEN pin if operated in - SPI mode -- Please consult Documentation/devicetree/bindings/spi/spi-bus.txt - for optional SPI connection related properties, - -Examples: - -&spi1 { - wl1251@0 { - compatible = "ti,wl1251"; - - reg = <0>; - spi-max-frequency = <48000000>; - spi-cpol; - spi-cpha; - - interrupt-parent = <&gpio2>; - interrupts = <10 IRQ_TYPE_NONE>; /* gpio line 42 */ - - vio-supply = <&vio>; - ti,power-gpio = <&gpio3 23 GPIO_ACTIVE_HIGH>; /* 87 */ - }; -}; - -&mmc3 { - vmmc-supply = <&wlan_en>; - - bus-width = <4>; - non-removable; - ti,non-removable; - cap-power-off-card; - - pinctrl-names = "default"; - pinctrl-0 = <&mmc3_pins>; - - #address-cells = <1>; - #size-cells = <0>; - - wlan: wifi@1 { - compatible = "ti,wl1251"; - - reg = <1>; - - interrupt-parent = <&gpio1>; - interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* GPIO_21 */ - - ti,wl1251-has-eeprom; - }; -};
Documentation/devicetree/bindings/net/wireless/ti,wl1251.yaml new file +92 -0
92 lines not on this page · raw message
Signature · 1 line
2.43.0
Rob Herring
maintainerQuoted 144 lines · Eduard Bostina
Convert the Texas Instruments WL1251 Wireless LAN Controller bindings to DT schema.
During the conversion, the following updates were made:
- Added the 'clocks' property. It was missing from the txt binding but is used in device trees (omap3-n900.dts).
- Added 'spi-cpol' and 'spi-cpha'. These were present in the original txt binding's example but missing from its property list.
- 'vio-supply' and 'spi-max-frequency' are no longer required. The txt binding listed them as required, but they are only applicable when the chip is connected via SPI.Signed-off-by Eduard Bostina <[email protected]>--- .../bindings/net/wireless/ti,wl1251.txt | 64 ------------- .../bindings/net/wireless/ti,wl1251.yaml | 92 +++++++++++++++++++ 2 files changed, 92 insertions(+), 64 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt create mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wl1251.yamlDocumentation/devicetree/bindings/net/wireless/ti,wl1251.txt deleted +0
-64@@ -1,64 +0,0 @@ -* Texas Instruments wl1251 wireless lan controller - -The wl1251 chip can be connected via SPI or via SDIO. This -document describes the binding for the SPI connected chip. - -Required properties: -- compatible : Should be "ti,wl1251" -- reg : Chip select address of device -- spi-max-frequency : Maximum SPI clocking speed of device in Hz -- interrupts : Should contain interrupt line -- vio-supply : phandle to regulator providing VIO - -Optional properties: -- ti,wl1251-has-eeprom : boolean, the wl1251 has an eeprom connected, which - provides configuration data (calibration, MAC, ...) -- ti,power-gpio : GPIO connected to chip's PMEN pin if operated in - SPI mode -- Please consult Documentation/devicetree/bindings/spi/spi-bus.txt - for optional SPI connection related properties, - -Examples: - -&spi1 { - wl1251@0 { - compatible = "ti,wl1251"; - - reg = <0>; - spi-max-frequency = <48000000>; - spi-cpol; - spi-cpha; - - interrupt-parent = <&gpio2>; - interrupts = <10 IRQ_TYPE_NONE>; /* gpio line 42 */ - - vio-supply = <&vio>; - ti,power-gpio = <&gpio3 23 GPIO_ACTIVE_HIGH>; /* 87 */ - }; -}; - -&mmc3 { - vmmc-supply = <&wlan_en>; - - bus-width = <4>; - non-removable; - ti,non-removable; - cap-power-off-card; - - pinctrl-names = "default"; - pinctrl-0 = <&mmc3_pins>; - - #address-cells = <1>; - #size-cells = <0>; - - wlan: wifi@1 { - compatible = "ti,wl1251"; - - reg = <1>; - - interrupt-parent = <&gpio1>; - interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* GPIO_21 */ - - ti,wl1251-has-eeprom; - }; -};Documentation/devicetree/bindings/net/wireless/ti,wl1251.yaml new file +48
-0@@ -0,0 +1,92 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/wireless/ti,wl1251.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments WL1251 Wireless LAN Controller + +maintainers: + - Eduard Bostina <[email protected]> + +properties: + compatible: + const: ti,wl1251 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + vio-supply: + description: + Phandle to the regulator providing VIO. Required when connected via SPI. + + ti,power-gpio: + maxItems: 1 + description: + GPIO connected to chip's PMEN pin if operated in SPI mode. + + ti,wl1251-has-eeprom: + type: boolean + description: + The wl1251 has an EEPROM connected, which provides configuration + data (calibration, MAC, ...). + + clocks: + maxItems: 1 + + spi-max-frequency: true + spi-cpol: true + spi-cpha: true + +required: + - compatible + - reg + - interrupts +
Documentation/devicetree/bindings/net/wireless/ti,wl1251.yaml line 58
Quoted 10 lines
Documentation/devicetree/bindings/net/wireless/ti,wl1251.yaml new file +10
-0+allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/gpio/gpio.h> + spi1 {
spi {
Quoted 7 lines
Documentation/devicetree/bindings/net/wireless/ti,wl1251.yaml new file +7
-0+ #address-cells = <1>; + #size-cells = <0>; + wl1251@0 { + compatible = "ti,wl1251"; + reg = <0>; + spi-max-frequency = <48000000>; + spi-cpol;
Documentation/devicetree/bindings/net/wireless/ti,wl1251.yaml line 75
Quoted 10 lines
Documentation/devicetree/bindings/net/wireless/ti,wl1251.yaml new file +10
-0+ spi-cpha; + interrupt-parent = <&gpio2>; + interrupts = <10 IRQ_TYPE_NONE>; + vio-supply = <&vio>; + ti,power-gpio = <&gpio3 23 GPIO_ACTIVE_HIGH>; + }; + }; + - | + #include <dt-bindings/interrupt-controller/irq.h> + mmc3 {
mmc {
Documentation/devicetree/bindings/net/wireless/ti,wl1251.yaml line 82
Quoted 7 lines
Documentation/devicetree/bindings/net/wireless/ti,wl1251.yaml new file +7
-0+ vmmc-supply = <&wlan_en>; + bus-width = <4>; + non-removable; + ti,non-removable; + cap-power-off-card; + pinctrl-names = "default"; + pinctrl-0 = <&mmc3_pins>;
Drop all these. Not relevant to this binding.
Quoted 14 lines
Documentation/devicetree/bindings/net/wireless/ti,wl1251.yaml new file +10
-0+ #address-cells = <1>; + #size-cells = <0>; + wifi@1 { + compatible = "ti,wl1251"; + reg = <1>; + interrupt-parent = <&gpio1>; + interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; + ti,wl1251-has-eeprom; + }; + };Signature · 1 line
2.43.0