Skip to contentSkip to conversation

ARM: dts: omap4: panda: TiWilink improvements

PATCH Superseded Andreas Kemnade 2 participants 7 messages Mar 30, 2025 – Apr 10, 2025

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Andreas Kemnade

author maintainer
#0 lore raw

v2 cover ARM: dts: omap4: panda: TiWilink improvements

Add proper definitions for 32k clock and enable bluetooth everywhere.

Changes:
v2:
- extend comments by trading in checkpatch compliance for readability
- remove one unnecessary newline

Andreas Kemnade (2):
ARM: dts: omap4: panda: fix resources needed for Panda
ARM: dts: omap4: panda: cleanup bluetooth

 .../boot/dts/ti/omap/omap4-panda-common.dtsi  | 39 +++++++++++++++++--
 arch/arm/boot/dts/ti/omap/omap4-panda-es.dts  | 32 ---------------
 2 files changed, 36 insertions(+), 35 deletions(-)
Signature · 1 line
2.39.5
author maintainer
#1 lore raw

PATCH v2 1/2 ARM: dts: omap4: panda: fix resources needed for Panda

The Pandaboard needs a 32k clock in the TWL6030 to be enabled to work. With some luck, it is enabled by some U-Boot fork. Do not rely on it and properly specify the requirement.

---
 arch/arm/boot/dts/ti/omap/omap4-panda-common.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/ti/omap/omap4-panda-common.dtsi +8 -0
index 97706d6296a6..c860b590142a 100644
@@ -130,6 +130,12 @@ hsusb1_phy: hsusb1_phy {
 		clock-frequency = <19200000>;
 	};
 
+	wl12xx_pwrseq: wl12xx-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		clocks = <&twl 0>;
+		clock-names = "ext_clock";
+	};
+
 	/* regulator for wl12xx on sdio5 */
 	wl12xx_vmmc: wl12xx_vmmc {
 		pinctrl-names = "default";
@@ -408,6 +414,7 @@ twl: twl@48 {
 		reg = <0x48>;
 		/* IRQ# = 7 */
 		interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_1N cascaded to gic */
+		#clock-cells = <1>;
 		system-power-controller;
 	};
 
@@ -488,6 +495,7 @@ &mmc5 {
 	non-removable;
 	bus-width = <4>;
 	cap-power-off-card;
+	mmc-pwrseq = <&wl12xx_pwrseq>;
 
 	#address-cells = <1>;
 	#size-cells = <0>;
Signature · 1 line
2.39.5
maintainer Reviewed-by on v2 1/2
#2 lore raw

Re: [PATCH v2 1/2] ARM: dts: omap4: panda: fix resources needed for Panda

Quoted 3 lines · Andreas Kemnade

The Pandaboard needs a 32k clock in the TWL6030 to be enabled to work. With some luck, it is enabled by some U-Boot fork. Do not rely on it and properly specify the requirement.

It would be nice to mention who exactly needs the 32K clock. From your changes it looks like the wl12xx module needs it?

Quoted 32 lines
---
 arch/arm/boot/dts/ti/omap/omap4-panda-common.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/ti/omap/omap4-panda-common.dtsi +7 -0
index 97706d6296a6..c860b590142a 100644
@@ -130,6 +130,12 @@ hsusb1_phy: hsusb1_phy {
 		clock-frequency = <19200000>;
 	};
 
+	wl12xx_pwrseq: wl12xx-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		clocks = <&twl 0>;
+		clock-names = "ext_clock";
+	};
+
 	/* regulator for wl12xx on sdio5 */
 	wl12xx_vmmc: wl12xx_vmmc {
 		pinctrl-names = "default";
@@ -408,6 +414,7 @@ twl: twl@48 {
 		reg = <0x48>;
 		/* IRQ# = 7 */
 		interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_1N cascaded to gic */
+		#clock-cells = <1>;
 		system-power-controller;
 	};
 

arch/arm/boot/dts/ti/omap/omap4-panda-common.dtsi &mmc5 { · line 501

Quoted 7 lines
arch/arm/boot/dts/ti/omap/omap4-panda-common.dtsi +1 -0
@@ -488,6 +495,7 @@ &mmc5 {
 	non-removable;
 	bus-width = <4>;
 	cap-power-off-card;
+	mmc-pwrseq = <&wl12xx_pwrseq>;
 
 	#address-cells = <1>;
 	#size-cells = <0>;
Signature · 2 lines
cheers,
-roger
author maintainer
#3 lore raw

Re: [PATCH v2 1/2] ARM: dts: omap4: panda: fix resources needed for Panda

Quoted 8 lines · On Wed, 2 Apr 2025 15:11:47 +0300 Roger Quadros <[email protected]> wrote:
Quoted 3 lines · Andreas Kemnade

The Pandaboard needs a 32k clock in the TWL6030 to be enabled to work. With some luck, it is enabled by some U-Boot fork. Do not rely on it and properly specify the requirement.

It would be nice to mention who exactly needs the 32K clock. From your changes it looks like the wl12xx module needs it?

correct, I will send a better descrption.

Regards,
Andreas

author maintainer
#4 lore raw

PATCH v2 2/2 ARM: dts: omap4: panda: cleanup bluetooth

In reply to Andreas Kemnade

Bluetooth is available on the other Panda board versions, too, so move stuff to common and specify the needed clock properly.

---
 .../boot/dts/ti/omap/omap4-panda-common.dtsi  | 31 ++++++++++++++++--
 arch/arm/boot/dts/ti/omap/omap4-panda-es.dts  | 32 -------------------
 2 files changed, 28 insertions(+), 35 deletions(-)
arch/arm/boot/dts/ti/omap/omap4-panda-common.dtsi +28 -3
index c860b590142a..05c871d31d7b 100644
@@ -367,10 +367,8 @@ OMAP4_IOPAD(0x130, PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c4_sda */
 	 */
 	wl12xx_gpio: wl12xx-gpio-pins {
 		pinctrl-single,pins = <
-			OMAP4_IOPAD(0x066, PIN_OUTPUT | MUX_MODE3)		/* gpmc_a19.gpio_43 */
-			OMAP4_IOPAD(0x06c, PIN_OUTPUT | MUX_MODE3)		/* gpmc_a22.gpio_46 */
+			OMAP4_IOPAD(0x066, PIN_OUTPUT | MUX_MODE3)		/* gpmc_a19.gpio_43 - WLAN_EN */
 			OMAP4_IOPAD(0x070, PIN_OUTPUT_PULLUP | MUX_MODE3)	/* gpmc_a24.gpio_48 */
-			OMAP4_IOPAD(0x072, PIN_OUTPUT_PULLUP | MUX_MODE3)	/* gpmc_a25.gpio_49 */
 		>;
 	};
 
@@ -393,6 +391,22 @@ button_pins: button-pins {
 			OMAP4_IOPAD(0x114, PIN_INPUT_PULLUP | MUX_MODE3)	/* gpio_121 */
 		>;
 	};
+
+	bt_pins: bt-pins {
+		pinctrl-single,pins = <
+			OMAP4_IOPAD(0x06c, PIN_OUTPUT | MUX_MODE3)	  /* gpmc_a22.gpio_46 - BTEN */
+			OMAP4_IOPAD(0x072, PIN_OUTPUT_PULLUP | MUX_MODE3) /* gpmc_a25.gpio_49 - BTWAKEUP */
+		>;
+	};
+
+	uart2_pins: uart2-pins {
+		pinctrl-single,pins = <
+			OMAP4_IOPAD(0x118, PIN_INPUT_PULLUP | MUX_MODE0)  /* uart2_cts.uart2_cts - HCI */
+			OMAP4_IOPAD(0x11a, PIN_OUTPUT | MUX_MODE0)	  /* uart2_rts.uart2_rts */
+			OMAP4_IOPAD(0x11c, PIN_INPUT_PULLUP | MUX_MODE0)  /* uart2_rx.uart2_rx */
+			OMAP4_IOPAD(0x11e, PIN_OUTPUT | MUX_MODE0)	  /* uart2_tx.uart2_tx */
+		>;
+	};
 };
 
 &omap4_pmx_wkup {
@@ -531,8 +545,19 @@ &twl_usb_comparator {
 };
 
 &uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart2_pins>;
 	interrupts-extended = <&wakeupgen GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH
 			       &omap4_pmx_core OMAP4_UART2_RX>;
+
+	bluetooth {
+		compatible = "ti,wl1271-st";
+		pinctrl-names = "default";
+		pinctrl-0 = <&bt_pins>;
+		enable-gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>;	/* GPIO_46 */
+		clocks = <&twl 0>;
+		clock-names = "ext_clock";
+	};
 };
 
 &uart3 {
arch/arm/boot/dts/ti/omap/omap4-panda-es.dts +0 -32
index fe7b156d10ed..a933fe560834 100644
@@ -49,22 +49,6 @@ button_pins: button-pins {
 			OMAP4_IOPAD(0x0fc, PIN_INPUT_PULLUP | MUX_MODE3) /* gpio_113 */
 		>;
 	};
-
-	bt_pins: bt-pins {
-		pinctrl-single,pins = <
-			OMAP4_IOPAD(0x06c, PIN_OUTPUT | MUX_MODE3)		/* gpmc_a22.gpio_46 - BTEN */
-			OMAP4_IOPAD(0x072, PIN_OUTPUT_PULLUP | MUX_MODE3)	/* gpmc_a25.gpio_49 - BTWAKEUP */
-		>;
-	};
-
-	uart2_pins: uart2-pins {
-		pinctrl-single,pins = <
-			OMAP4_IOPAD(0x118, PIN_INPUT_PULLUP | MUX_MODE0)	/* uart2_cts.uart2_cts - HCI */
-			OMAP4_IOPAD(0x11a, PIN_OUTPUT | MUX_MODE0)		/* uart2_rts.uart2_rts */
-			OMAP4_IOPAD(0x11c, PIN_INPUT_PULLUP | MUX_MODE0)	/* uart2_rx.uart2_rx */
-			OMAP4_IOPAD(0x11e, PIN_OUTPUT | MUX_MODE0)		/* uart2_tx.uart2_tx */
-		>;
-	};
 };
 
 &led_wkgpio_pins {
@@ -96,19 +80,3 @@ buttonS2 {
 &gpio1_target {
 	 ti,no-reset-on-init;
 };
-
-&wl12xx_gpio {
-	pinctrl-single,pins = <
-		OMAP4_IOPAD(0x066, PIN_OUTPUT | MUX_MODE3)		/* gpmc_a19.gpio_43 */
-		OMAP4_IOPAD(0x070, PIN_OUTPUT_PULLUP | MUX_MODE3)	/* gpmc_a24.gpio_48 */
-	>;
-};
-
-&uart2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart2_pins &bt_pins>;
-	bluetooth: tiwi {
-		compatible = "ti,wl1271-st";
-		enable-gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>;	/* GPIO_46 */
-	};
-};
Signature · 1 line
2.39.5
maintainer Reviewed-by on v2 2/2
#5 lore raw

Re: [PATCH v2 2/2] ARM: dts: omap4: panda: cleanup bluetooth

Hi Andreas,

Quoted 14 lines · Andreas Kemnade

Bluetooth is available on the other Panda board versions, too, so move stuff to common and specify the needed clock properly.

---
 .../boot/dts/ti/omap/omap4-panda-common.dtsi  | 31 ++++++++++++++++--
 arch/arm/boot/dts/ti/omap/omap4-panda-es.dts  | 32 -------------------
 2 files changed, 28 insertions(+), 35 deletions(-)
arch/arm/boot/dts/ti/omap/omap4-panda-common.dtsi +0 -0
index c860b590142a..05c871d31d7b 100644

arch/arm/boot/dts/ti/omap/omap4-panda-common.dtsi OMAP4_IOPAD(0x130, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */ · line 371

Quoted 7 lines
arch/arm/boot/dts/ti/omap/omap4-panda-common.dtsi +1 -2
@@ -367,10 +367,8 @@ OMAP4_IOPAD(0x130, PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c4_sda */
 	 */
 	wl12xx_gpio: wl12xx-gpio-pins {
 		pinctrl-single,pins = <
-			OMAP4_IOPAD(0x066, PIN_OUTPUT | MUX_MODE3)		/* gpmc_a19.gpio_43 */
-			OMAP4_IOPAD(0x06c, PIN_OUTPUT | MUX_MODE3)		/* gpmc_a22.gpio_46 */
+			OMAP4_IOPAD(0x066, PIN_OUTPUT | MUX_MODE3)		/* gpmc_a19.gpio_43 - WLAN_EN */
 			OMAP4_IOPAD(0x070, PIN_OUTPUT_PULLUP | MUX_MODE3)	/* gpmc_a24.gpio_48 */

Apparently GPIO 48 is FM audio related and has nothing to do with wl12xx? So should we drop it from here?

Quoted 84 lines
arch/arm/boot/dts/ti/omap/omap4-panda-common.dtsi +27 -1
-			OMAP4_IOPAD(0x072, PIN_OUTPUT_PULLUP | MUX_MODE3)	/* gpmc_a25.gpio_49 */
 		>;
 	};
 
@@ -393,6 +391,22 @@ button_pins: button-pins {
 			OMAP4_IOPAD(0x114, PIN_INPUT_PULLUP | MUX_MODE3)	/* gpio_121 */
 		>;
 	};
+
+	bt_pins: bt-pins {
+		pinctrl-single,pins = <
+			OMAP4_IOPAD(0x06c, PIN_OUTPUT | MUX_MODE3)	  /* gpmc_a22.gpio_46 - BTEN */
+			OMAP4_IOPAD(0x072, PIN_OUTPUT_PULLUP | MUX_MODE3) /* gpmc_a25.gpio_49 - BTWAKEUP */
+		>;
+	};
+
+	uart2_pins: uart2-pins {
+		pinctrl-single,pins = <
+			OMAP4_IOPAD(0x118, PIN_INPUT_PULLUP | MUX_MODE0)  /* uart2_cts.uart2_cts - HCI */
+			OMAP4_IOPAD(0x11a, PIN_OUTPUT | MUX_MODE0)	  /* uart2_rts.uart2_rts */
+			OMAP4_IOPAD(0x11c, PIN_INPUT_PULLUP | MUX_MODE0)  /* uart2_rx.uart2_rx */
+			OMAP4_IOPAD(0x11e, PIN_OUTPUT | MUX_MODE0)	  /* uart2_tx.uart2_tx */
+		>;
+	};
 };
 
 &omap4_pmx_wkup {
@@ -531,8 +545,19 @@ &twl_usb_comparator {
 };
 
 &uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart2_pins>;
 	interrupts-extended = <&wakeupgen GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH
 			       &omap4_pmx_core OMAP4_UART2_RX>;
+
+	bluetooth {
+		compatible = "ti,wl1271-st";
+		pinctrl-names = "default";
+		pinctrl-0 = <&bt_pins>;
+		enable-gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>;	/* GPIO_46 */
+		clocks = <&twl 0>;
+		clock-names = "ext_clock";
+	};
 };
 
 &uart3 {
arch/arm/boot/dts/ti/omap/omap4-panda-es.dts +0 -22
index fe7b156d10ed..a933fe560834 100644
@@ -49,22 +49,6 @@ button_pins: button-pins {
 			OMAP4_IOPAD(0x0fc, PIN_INPUT_PULLUP | MUX_MODE3) /* gpio_113 */
 		>;
 	};
-
-	bt_pins: bt-pins {
-		pinctrl-single,pins = <
-			OMAP4_IOPAD(0x06c, PIN_OUTPUT | MUX_MODE3)		/* gpmc_a22.gpio_46 - BTEN */
-			OMAP4_IOPAD(0x072, PIN_OUTPUT_PULLUP | MUX_MODE3)	/* gpmc_a25.gpio_49 - BTWAKEUP */
-		>;
-	};
-
-	uart2_pins: uart2-pins {
-		pinctrl-single,pins = <
-			OMAP4_IOPAD(0x118, PIN_INPUT_PULLUP | MUX_MODE0)	/* uart2_cts.uart2_cts - HCI */
-			OMAP4_IOPAD(0x11a, PIN_OUTPUT | MUX_MODE0)		/* uart2_rts.uart2_rts */
-			OMAP4_IOPAD(0x11c, PIN_INPUT_PULLUP | MUX_MODE0)	/* uart2_rx.uart2_rx */
-			OMAP4_IOPAD(0x11e, PIN_OUTPUT | MUX_MODE0)		/* uart2_tx.uart2_tx */
-		>;
-	};
 };
 
 &led_wkgpio_pins {
@@ -96,19 +80,3 @@ buttonS2 {
 &gpio1_target {
 	 ti,no-reset-on-init;
 };
-
-&wl12xx_gpio {
-	pinctrl-single,pins = <
-		OMAP4_IOPAD(0x066, PIN_OUTPUT | MUX_MODE3)		/* gpmc_a19.gpio_43 */
-		OMAP4_IOPAD(0x070, PIN_OUTPUT_PULLUP | MUX_MODE3)	/* gpmc_a24.gpio_48 */
-	>;

arch/arm/boot/dts/ti/omap/omap4-panda-es.dts buttonS2 { · line 114

Quoted 10 lines
arch/arm/boot/dts/ti/omap/omap4-panda-es.dts +0 -10
-};
-
-&uart2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart2_pins &bt_pins>;
-	bluetooth: tiwi {
-		compatible = "ti,wl1271-st";
-		enable-gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>;	/* GPIO_46 */
-	};
-};

otherwise,

Signature · 2 lines
cheers,
-roger
author maintainer
#6 lore raw

Re: [PATCH v2 2/2] ARM: dts: omap4: panda: cleanup bluetooth

Am Wed, 2 Apr 2025 14:54:12 +0300
schrieb Roger Quadros <[email protected]>:

Quoted 12 lines

Hi Andreas,

Quoted 9 lines · Andreas Kemnade

Bluetooth is available on the other Panda board versions, too, so move stuff to common and specify the needed clock properly.

---
 .../boot/dts/ti/omap/omap4-panda-common.dtsi  | 31 ++++++++++++++++--
 arch/arm/boot/dts/ti/omap/omap4-panda-es.dts  | 32 -------------------
 2 files changed, 28 insertions(+), 35 deletions(-)
Quoted 16 lines

arch/arm/boot/dts/ti/omap/omap4-panda-common.dtsi OMAP4_IOPAD(0x130, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */ · line 371

Quoted 12 lines
arch/arm/boot/dts/ti/omap/omap4-panda-common.dtsi +1 -2
index c860b590142a..05c871d31d7b 100644
@@ -367,10 +367,8 @@ OMAP4_IOPAD(0x130, PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c4_sda */
 	 */
 	wl12xx_gpio: wl12xx-gpio-pins {
 		pinctrl-single,pins = <
-			OMAP4_IOPAD(0x066, PIN_OUTPUT | MUX_MODE3)		/* gpmc_a19.gpio_43 */
-			OMAP4_IOPAD(0x06c, PIN_OUTPUT | MUX_MODE3)		/* gpmc_a22.gpio_46 */
+			OMAP4_IOPAD(0x066, PIN_OUTPUT | MUX_MODE3)		/* gpmc_a19.gpio_43 - WLAN_EN */
 			OMAP4_IOPAD(0x070, PIN_OUTPUT_PULLUP | MUX_MODE3)	/* gpmc_a24.gpio_48 */  

Apparently GPIO 48 is FM audio related and has nothing to do with wl12xx? So should we drop it from here?

Well, FM audio is part of the wl12xx, so it is a bit related. There is no driver for the FM part upstream. It is a bit suboptimal, so feel free to submit a patch to put it somewhere else.

Regards,
Andreas