diff mbox series

[V2,15/22] ARM: dts: stm32: Enable WiFi on AV96

Message ID 20200331005701.283998-16-marex@denx.de (mailing list archive)
State New, archived
Headers show
Series ARM: dts: stm32: Repair AV96 board | expand

Commit Message

Marek Vasut March 31, 2020, 12:56 a.m. UTC
The WiFi/Bluetooth SDIO chip is attached to SDMMC3 on AV96, describe it
in DT to make it available. Remove WiFi LED and turn it into a regulator,
because it is a GPIO controlling the WL_REG_ON input of the WiFi chip.
The LED is just an indicator connected to the same line, but not the
primary function.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
To: linux-arm-kernel@lists.infradead.org
---
V2: No change
---
 arch/arm/boot/dts/stm32mp157a-avenger96.dts | 38 +++++++++++++++++----
 1 file changed, 31 insertions(+), 7 deletions(-)

Comments

Manivannan Sadhasivam March 31, 2020, 6:43 a.m. UTC | #1
On Tue, Mar 31, 2020 at 02:56:54AM +0200, Marek Vasut wrote:
> The WiFi/Bluetooth SDIO chip is attached to SDMMC3 on AV96, describe it
> in DT to make it available. Remove WiFi LED and turn it into a regulator,
> because it is a GPIO controlling the WL_REG_ON input of the WiFi chip.
> The LED is just an indicator connected to the same line, but not the
> primary function.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks,
Mani

> Cc: Alexandre Torgue <alexandre.torgue@st.com>
> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> Cc: Patrick Delaunay <patrick.delaunay@st.com>
> Cc: linux-stm32@st-md-mailman.stormreply.com
> To: linux-arm-kernel@lists.infradead.org
> ---
> V2: No change
> ---
>  arch/arm/boot/dts/stm32mp157a-avenger96.dts | 38 +++++++++++++++++----
>  1 file changed, 31 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/stm32mp157a-avenger96.dts b/arch/arm/boot/dts/stm32mp157a-avenger96.dts
> index 3aeb3afa37d9..12ee95d5adb1 100644
> --- a/arch/arm/boot/dts/stm32mp157a-avenger96.dts
> +++ b/arch/arm/boot/dts/stm32mp157a-avenger96.dts
> @@ -65,13 +65,6 @@ led4 {
>  		};
>  
>  		led5 {
> -			label = "yellow:wifi";
> -			gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
> -			linux,default-trigger = "phy0tx";
> -			default-state = "off";
> -		};
> -
> -		led6 {
>  			label = "blue:bt";
>  			gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
>  			linux,default-trigger = "bluetooth-power";
> @@ -103,6 +96,17 @@ vdd_io: regulator-buck-io {
>  		regulator-boot-on;
>  		vin-supply = <&vdd>;
>  	};
> +
> +	wlan_pwr: regulator-wlan {
> +		compatible = "regulator-fixed";
> +
> +		regulator-name = "wl-reg";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +
> +		gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +	};
>  };
>  
>  &ethernet0 {
> @@ -382,6 +386,26 @@ &sdmmc2 {
>  	status = "okay";
>  };
>  
> +&sdmmc3 {
> +	pinctrl-names = "default", "opendrain", "sleep";
> +	pinctrl-0 = <&sdmmc3_b4_pins_b>;
> +	pinctrl-1 = <&sdmmc3_b4_od_pins_b>;
> +	pinctrl-2 = <&sdmmc3_b4_sleep_pins_b>;
> +	broken-cd;
> +	non-removable;
> +	st,neg-edge;
> +	bus-width = <4>;
> +	vmmc-supply = <&wlan_pwr>;
> +	status = "okay";
> +
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	brcmf: bcrmf@1 {
> +		reg = <1>;
> +		compatible = "brcm,bcm4329-fmac";
> +	};
> +};
> +
>  &uart4 {
>  	/* On Low speed expansion header */
>  	label = "LS-UART1";
> -- 
> 2.25.1
>
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/stm32mp157a-avenger96.dts b/arch/arm/boot/dts/stm32mp157a-avenger96.dts
index 3aeb3afa37d9..12ee95d5adb1 100644
--- a/arch/arm/boot/dts/stm32mp157a-avenger96.dts
+++ b/arch/arm/boot/dts/stm32mp157a-avenger96.dts
@@ -65,13 +65,6 @@  led4 {
 		};
 
 		led5 {
-			label = "yellow:wifi";
-			gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
-			linux,default-trigger = "phy0tx";
-			default-state = "off";
-		};
-
-		led6 {
 			label = "blue:bt";
 			gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "bluetooth-power";
@@ -103,6 +96,17 @@  vdd_io: regulator-buck-io {
 		regulator-boot-on;
 		vin-supply = <&vdd>;
 	};
+
+	wlan_pwr: regulator-wlan {
+		compatible = "regulator-fixed";
+
+		regulator-name = "wl-reg";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
 };
 
 &ethernet0 {
@@ -382,6 +386,26 @@  &sdmmc2 {
 	status = "okay";
 };
 
+&sdmmc3 {
+	pinctrl-names = "default", "opendrain", "sleep";
+	pinctrl-0 = <&sdmmc3_b4_pins_b>;
+	pinctrl-1 = <&sdmmc3_b4_od_pins_b>;
+	pinctrl-2 = <&sdmmc3_b4_sleep_pins_b>;
+	broken-cd;
+	non-removable;
+	st,neg-edge;
+	bus-width = <4>;
+	vmmc-supply = <&wlan_pwr>;
+	status = "okay";
+
+	#address-cells = <1>;
+	#size-cells = <0>;
+	brcmf: bcrmf@1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+	};
+};
+
 &uart4 {
 	/* On Low speed expansion header */
 	label = "LS-UART1";