Skip to contentSkip to conversation

ARM: dts: st: add WLAN/BT on disco boards

PATCH In review Valentin Caron 2 participants 11 messages Aug 27, 2024 – Oct 29, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover ARM: dts: st: add WLAN/BT on disco boards

This series enable WLAN/BT module on stm32mp1x discovery boards. Use LSCO from RTC to supply 32kHz clock to WLAN/BT modules. This is done by selecting "rtc_lsco_pins_a" in the WLAN pinctrl node.

And also add RTC nodes on stm32mp25x to enable RTC on stm32mp257f-ev1 board.

Christophe Roullier (2):
ARM: dts: stm32: add support of WLAN/BT on stm32mp157c-dk2
ARM: dts: stm32: add support of WLAN/BT on stm32mp135f-dk

Valentin Caron (7):
ARM: dts: stm32: rtc, add pin to provide LSCO on stm32mp15
ARM: dts: stm32: rtc, add pin to provide LSCO on stm32mp13
ARM: dts: stm32: rtc, add LSCO to WLAN/BT module on stm32mp157c-dk2
ARM: dts: stm32: rtc, add LSCO to WLAN/BT module on stm32mp135f-dk
arm64: dts: st: add RTC on stm32mp25x
arm64: dts: st: enable RTC on stm32mp257f-ev1 board
ARM: dts: stm32: rtc, add pin to provide LSCO on stm32mp25

 arch/arm/boot/dts/st/stm32mp13-pinctrl.dtsi   |  7 +++
 arch/arm/boot/dts/st/stm32mp135f-dk.dts       | 52 +++++++++++++++++++
 arch/arm/boot/dts/st/stm32mp15-pinctrl.dtsi   |  7 +++
 arch/arm/boot/dts/st/stm32mp157c-dk2.dts      | 51 +++++++++++++++++-
 arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi |  6 +++
 arch/arm64/boot/dts/st/stm32mp251.dtsi        | 10 ++++
 arch/arm64/boot/dts/st/stm32mp257f-ev1.dts    |  4 ++
 7 files changed, 136 insertions(+), 1 deletion(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/9 ARM: dts: stm32: rtc, add pin to provide LSCO on stm32mp15

Declare pin for LSCO in stm32-pinctrl provider node to reserve this pin for RTC OUT2_RMP, in stm32mp15-pinctrl.dtsi.

---
 arch/arm/boot/dts/st/stm32mp15-pinctrl.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/st/stm32mp15-pinctrl.dtsi +7 -0
index ae83e7b102323..0df526cc48f2b 100644
@@ -1696,6 +1696,13 @@ pins {
 		};
 	};
 
+	/omit-if-no-ref/
+	rtc_rsvd_pins_a: rtc-rsvd-0 {
+		pins {
+			pinmux = <STM32_PINMUX('I', 8, ANALOG)>; /* RTC_OUT2_RMP */
+		};
+	};
+
 	/omit-if-no-ref/
 	sai2a_pins_a: sai2a-0 {
 		pins {
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/9 ARM: dts: stm32: rtc, add pin to provide LSCO on stm32mp13

In reply to Valentin Caron

Declare pin for LSCO in stm32-pinctrl provider node to reserve this pin for RTC OUT2_RMP, in stm32mp13-pinctrl.dtsi.

---
 arch/arm/boot/dts/st/stm32mp13-pinctrl.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/st/stm32mp13-pinctrl.dtsi +7 -0
index c9f588a650944..5c28de7e365d9 100644
@@ -582,6 +582,13 @@ pins {
 		};
 	};
 
+	/omit-if-no-ref/
+	rtc_rsvd_pins_a: rtc-rsvd-0 {
+		pins {
+			pinmux = <STM32_PINMUX('I', 1, ANALOG)>; /* RTC_OUT2_RMP */
+		};
+	};
+
 	/omit-if-no-ref/
 	sai1a_pins_a: sai1a-0 {
 		pins {
Signature · 1 line
2.25.1
#3 lore raw

PATCH 3/9 ARM: dts: stm32: rtc, add LSCO to WLAN/BT module on stm32mp157c-dk2

In reply to Valentin Caron

On stm32mp157c-dk2 board, WLAN/BT module LPO_IN pin is wired to RTC OUT2_RMP pin.

Provide a pinctrl configuration to enable LSCO on OUT2_RMP.

---
 arch/arm/boot/dts/st/stm32mp157c-dk2.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/st/stm32mp157c-dk2.dts +10 -0
index 7a701f7ef0c70..8ac1233f9a02d 100644
@@ -84,6 +84,16 @@ ltdc_ep1_out: endpoint@1 {
 	};
 };
 
+&rtc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&rtc_rsvd_pins_a>;
+
+	rtc_lsco_pins_a: rtc-lsco-0 {
+		pins = "out2_rmp";
+		function = "lsco";
+	};
+};
+
 &usart2 {
 	pinctrl-names = "default", "sleep", "idle";
 	pinctrl-0 = <&usart2_pins_c>;
Signature · 1 line
2.25.1
#4 lore raw

PATCH 4/9 ARM: dts: stm32: rtc, add LSCO to WLAN/BT module on stm32mp135f-dk

In reply to Valentin Caron

On stm32mp135f-dk board, WLAN/BT module LPO_IN pin is wired to RTC OUT2_RMP pin.

Provide a pinctrl configuration to enable LSCO on OUT2_RMP.

---
 arch/arm/boot/dts/st/stm32mp135f-dk.dts | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/st/stm32mp135f-dk.dts +7 -0
index 1af335a39993b..ef33cbf3e601c 100644
@@ -346,7 +346,14 @@ ltdc_out_rgb: endpoint {
 };
 
 &rtc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&rtc_rsvd_pins_a>;
 	status = "okay";
+
+	rtc_lsco_pins_a: rtc-lsco-0 {
+		pins = "out2_rmp";
+		function = "lsco";
+	};
 };
 
 &scmi_regu {
Signature · 1 line
2.25.1
#5 lore raw

PATCH 5/9 ARM: dts: stm32: add support of WLAN/BT on stm32mp157c-dk2

In reply to Valentin Caron

From: Christophe Roullier <[email protected]>

Add support of WLAN/BT Murata Type 1DX module:
- usart2 is used for Bluetooth interface
- sdmmc2 is used for WLAN (sdio) interface

---
 arch/arm/boot/dts/st/stm32mp157c-dk2.dts | 41 +++++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)
arch/arm/boot/dts/st/stm32mp157c-dk2.dts +40 -1
index 8ac1233f9a02d..5f9c0160a9c49 100644
@@ -24,6 +24,11 @@ aliases {
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+
+	wifi_pwrseq: wifi-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>;
+	};
 };
 
 &cryp1 {
@@ -94,10 +99,44 @@ rtc_lsco_pins_a: rtc-lsco-0 {
 	};
 };
 
+/* Wifi */
+&sdmmc2 {
+	pinctrl-names = "default", "opendrain", "sleep";
+	pinctrl-0 = <&sdmmc2_b4_pins_a>;
+	pinctrl-1 = <&sdmmc2_b4_od_pins_a>;
+	pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>;
+	non-removable;
+	cap-sdio-irq;
+	st,neg-edge;
+	bus-width = <4>;
+	vmmc-supply = <&v3v3>;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	brcmf: bcrmf@1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+		pinctrl-names = "default";
+		pinctrl-0 = <&rtc_lsco_pins_a>;
+	};
+};
+
+/* Bluetooth */
 &usart2 {
 	pinctrl-names = "default", "sleep", "idle";
 	pinctrl-0 = <&usart2_pins_c>;
 	pinctrl-1 = <&usart2_sleep_pins_c>;
 	pinctrl-2 = <&usart2_idle_pins_c>;
-	status = "disabled";
+	uart-has-rtscts;
+	status = "okay";
+
+	bluetooth {
+		shutdown-gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
+		compatible = "brcm,bcm43438-bt";
+		max-speed = <3000000>;
+		vbat-supply = <&v3v3>;
+		vddio-supply = <&v3v3>;
+	};
 };
Signature · 1 line
2.25.1
#6 lore raw

PATCH 6/9 ARM: dts: stm32: add support of WLAN/BT on stm32mp135f-dk

In reply to Valentin Caron

From: Christophe Roullier <[email protected]>

Add support of WLAN/BT Murata Type 1DX module:
- usart2 is used for Bluetooth interface
- sdmmc2 is used for WLAN (sdio) interface

---
 arch/arm/boot/dts/st/stm32mp135f-dk.dts | 45 +++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
arch/arm/boot/dts/st/stm32mp135f-dk.dts +45 -0
index ef33cbf3e601c..3a276589fef79 100644
@@ -121,6 +121,19 @@ panel_in_rgb: endpoint {
 			};
 		};
 	};
+
+	v3v3_ao: v3v3-ao {
+		compatible = "regulator-fixed";
+		regulator-name = "v3v3_ao";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+	};
+
+	wifi_pwrseq: wifi-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		reset-gpios = <&mcp23017 11 GPIO_ACTIVE_LOW>;
+	};
 };
 
 &adc_1 {
@@ -392,6 +405,30 @@ &sdmmc1 {
 	status = "okay";
 };
 
+/* Wifi */
+&sdmmc2 {
+	pinctrl-names = "default", "opendrain", "sleep";
+	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_clk_pins_a>;
+	pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_clk_pins_a>;
+	pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>;
+	non-removable;
+	cap-sdio-irq;
+	st,neg-edge;
+	bus-width = <4>;
+	vmmc-supply = <&v3v3_ao>;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	brcmf: bcrmf@1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+		pinctrl-names = "default";
+		pinctrl-0 = <&rtc_lsco_pins_a>;
+	};
+};
+
 &spi5 {
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&spi5_pins_a>;
@@ -498,6 +535,14 @@ &usart2 {
 	pinctrl-2 = <&usart2_idle_pins_a>;
 	uart-has-rtscts;
 	status = "okay";
+
+	bluetooth {
+		shutdown-gpios = <&mcp23017 13 GPIO_ACTIVE_HIGH>;
+		compatible = "brcm,bcm43438-bt";
+		max-speed = <3000000>;
+		vbat-supply = <&v3v3_ao>;
+		vddio-supply = <&v3v3_ao>;
+	};
 };
 
 &usbh_ehci {
Signature · 1 line
2.25.1
#7 lore raw

PATCH 7/9 arm64: dts: st: add RTC on stm32mp25x

In reply to Valentin Caron

Add compatible, clock, and interrupt properties of STM32 RTC on stm32mp25x SOCs.

---
 arch/arm64/boot/dts/st/stm32mp251.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/st/stm32mp251.dtsi +10 -0
index 1167cf63d7e87..81f59a5b4f61a 100644
@@ -916,6 +916,16 @@ gpiok: gpio@442e0000 {
 			};
 		};
 
+		rtc: rtc@46000000 {
+			compatible = "st,stm32mp25-rtc";
+			reg = <0x46000000 0x400>;
+			clocks = <&scmi_clk CK_SCMI_RTC>,
+				 <&scmi_clk CK_SCMI_RTCCK>;
+			clock-names = "pclk", "rtc_ck";
+			interrupts-extended = <&exti2 17 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
 		pinctrl_z: pinctrl@46200000 {
 			#address-cells = <1>;
 			#size-cells = <1>;
Signature · 1 line
2.25.1
#8 lore raw

PATCH 8/9 arm64: dts: st: enable RTC on stm32mp257f-ev1 board

In reply to Valentin Caron

Enable RTC on stm32mp257f-ev1 board.

---
 arch/arm64/boot/dts/st/stm32mp257f-ev1.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/st/stm32mp257f-ev1.dts +4 -0
index 214191a8322b8..6b68aeaf79ba3 100644
@@ -93,6 +93,10 @@ &i2c8 {
 	status = "disabled";
 };
 
+&rtc {
+	status = "okay";
+};
+
 &scmi_regu {
 	scmi_vddio1: regulator@0 {
 		regulator-min-microvolt = <1800000>;
Signature · 1 line
2.25.1
#9 lore raw

PATCH 9/9 ARM: dts: stm32: rtc, add pin to provide LSCO on stm32mp25

In reply to Valentin Caron

Declare pin for LSCO in stm32-pinctrl provider node to reserve this pin for RTC OUT2_RMP, in stm32mp25-pinctrl.dtsi.

---
 arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi +6 -0
index 8fdd5f020425d..ce74f7c4fbe7e 100644
@@ -82,6 +82,12 @@ pins {
 		};
 	};
 
+	rtc_rsvd_pins_a: rtc-rsvd-0 {
+		pins {
+			pinmux = <STM32_PINMUX('I', 8, RSVD)>; /* RTC_OUT2_RMP */
+		};
+	};
+
 	sdmmc1_b4_pins_a: sdmmc1-b4-0 {
 		pins1 {
 			pinmux = <STM32_PINMUX('E', 4, AF10)>, /* SDMMC1_D0 */
Signature · 1 line
2.25.1
maintainer
#10 lore raw
In reply to Valentin Caron

Hi Valentin

Quoted 20 lines · Valentin Caron

This series enable WLAN/BT module on stm32mp1x discovery boards. Use LSCO from RTC to supply 32kHz clock to WLAN/BT modules. This is done by selecting "rtc_lsco_pins_a" in the WLAN pinctrl node.

And also add RTC nodes on stm32mp25x to enable RTC on stm32mp257f-ev1 board.

Christophe Roullier (2):
ARM: dts: stm32: add support of WLAN/BT on stm32mp157c-dk2
ARM: dts: stm32: add support of WLAN/BT on stm32mp135f-dk

Valentin Caron (7):
ARM: dts: stm32: rtc, add pin to provide LSCO on stm32mp15
ARM: dts: stm32: rtc, add pin to provide LSCO on stm32mp13
ARM: dts: stm32: rtc, add LSCO to WLAN/BT module on stm32mp157c-dk2
ARM: dts: stm32: rtc, add LSCO to WLAN/BT module on stm32mp135f-dk
arm64: dts: st: add RTC on stm32mp25x
arm64: dts: st: enable RTC on stm32mp257f-ev1 board
ARM: dts: stm32: rtc, add pin to provide LSCO on stm32mp25

Quoted 9 lines
  arch/arm/boot/dts/st/stm32mp13-pinctrl.dtsi   |  7 +++
  arch/arm/boot/dts/st/stm32mp135f-dk.dts       | 52 +++++++++++++++++++
  arch/arm/boot/dts/st/stm32mp15-pinctrl.dtsi   |  7 +++
  arch/arm/boot/dts/st/stm32mp157c-dk2.dts      | 51 +++++++++++++++++-
  arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi |  6 +++
  arch/arm64/boot/dts/st/stm32mp251.dtsi        | 10 ++++
  arch/arm64/boot/dts/st/stm32mp257f-ev1.dts    |  4 ++
  7 files changed, 136 insertions(+), 1 deletion(-)

I applied the series by removing patch[9] as it raised a build issue.
Furthermore, the pin pin configuration in patch [9] was not used in a board, so no need to take it.

Regards
Alex