Skip to contentSkip to conversation

ARM: OMAP3: igep0020: Set WIFI/BT GPIO pins in correct mux mode

PATCH Superseded Anders Hedlund 3 participants 4 messages Oct 29, 2012 – Nov 7, 2012

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

PATCH 1/1 ARM: OMAP3: igep0020: Set WIFI/BT GPIO pins in correct mux mode

Configure the WIFI/BT GPIO pin muxes unless the bootloader hasn't already done so.

Cc Jonas Zetterberg <[email protected]>
Cc Enric Balletbo i Serra <[email protected]>
---
 arch/arm/mach-omap2/board-igep0020.c |    7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/mach-omap2/board-igep0020.c +7 -0
index dbc705a..17e45bc 100644
@@ -579,6 +579,13 @@ static void __init igep_wlan_bt_init(void)
 	} else
 		return;
 
+#ifdef CONFIG_OMAP_MUX
+	/* Make sure that the GPIO pins are muxed correctly */
+	omap_mux_init_gpio(igep_wlan_bt_gpios[0].gpio, OMAP_PIN_OUTPUT);
+	omap_mux_init_gpio(igep_wlan_bt_gpios[1].gpio, OMAP_PIN_OUTPUT);
+	omap_mux_init_gpio(igep_wlan_bt_gpios[2].gpio, OMAP_PIN_OUTPUT);
+#endif
+
 	err = gpio_request_array(igep_wlan_bt_gpios,
 				 ARRAY_SIZE(igep_wlan_bt_gpios));
 	if (err) {
Signature · 1 line
1.7.10.4
#1 lore raw

Hi,

Thanks for the patch, just one comment below.

2012/10/29 Anders Hedlund <[email protected]>:

Quoted 15 lines

Configure the WIFI/BT GPIO pin muxes unless the bootloader hasn't already done so.

Cc Jonas Zetterberg <[email protected]>
Cc Enric Balletbo i Serra <[email protected]>
---
 arch/arm/mach-omap2/board-igep0020.c |    7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/mach-omap2/board-igep0020.c +0 -0
index dbc705a..17e45bc 100644

arch/arm/mach-omap2/board-igep0020.c static void __init igep_wlan_bt_init(void) · line 582

Quoted 4 lines
arch/arm/mach-omap2/board-igep0020.c +1 -0
@@ -579,6 +579,13 @@ static void __init igep_wlan_bt_init(void)
        } else
                return;
 
+#ifdef CONFIG_OMAP_MUX

The ifdef is not required here (the mux.h file does this for you)

Quoted 10 lines
arch/arm/mach-omap2/board-igep0020.c +6 -1
+       /* Make sure that the GPIO pins are muxed correctly */
+       omap_mux_init_gpio(igep_wlan_bt_gpios[0].gpio, OMAP_PIN_OUTPUT);
+       omap_mux_init_gpio(igep_wlan_bt_gpios[1].gpio, OMAP_PIN_OUTPUT);
+       omap_mux_init_gpio(igep_wlan_bt_gpios[2].gpio, OMAP_PIN_OUTPUT);
+#endif
+
        err = gpio_request_array(igep_wlan_bt_gpios,
                                 ARRAY_SIZE(igep_wlan_bt_gpios));
        if (err) {
--
Quoted 2 lines

1.7.10.4

Tony, after corrections, as this is a fix could be included ? Or we need to wait to the next merge window.

The problem is, with recent u-boot these pins are not muxed because u-boot sets only the minimum required for uboot functionality and kernel boot. In kernel these pins must be muxed in order to get the wifi and bluetooth work.

( CCing: Javier Martinez and Matthias Brugger )

#3 lore raw

PATCH v2 1/1 ARM: OMAP3: igep0020: Set WIFI/BT GPIO pins in correct mux mode

In reply to Anders Hedlund

Setup the WIFI/BT GPIO pin muxes to enable WIFI/BT functionality.

Cc Jonas Zetterberg <[email protected]>
Cc Enric Balletbo i Serra <[email protected]>
Cc Javier Martinez Canillas <[email protected]>
Cc Matthias Brugger <[email protected]>
---
 arch/arm/mach-omap2/board-igep0020.c |    5 +++++
 1 file changed, 5 insertions(+)
arch/arm/mach-omap2/board-igep0020.c +5 -0
index 2821448..2a21947 100644
@@ -583,6 +583,11 @@ static void __init igep_wlan_bt_init(void)
 	} else
 		return;
 
+	/* Make sure that the GPIO pins are muxed correctly */
+	omap_mux_init_gpio(igep_wlan_bt_gpios[0].gpio, OMAP_PIN_OUTPUT);
+	omap_mux_init_gpio(igep_wlan_bt_gpios[1].gpio, OMAP_PIN_OUTPUT);
+	omap_mux_init_gpio(igep_wlan_bt_gpios[2].gpio, OMAP_PIN_OUTPUT);
+
 	err = gpio_request_array(igep_wlan_bt_gpios,
 				 ARRAY_SIZE(igep_wlan_bt_gpios));
 	if (err) {
Signature · 1 line
1.7.10.4
maintainer
#2 lore raw
In reply to Enric Balletbo Serra
Quoted 8 lines · Enric Balletbo Serra

Tony, after corrections, as this is a fix could be included ? Or we need to wait to the next merge window.

The problem is, with recent u-boot these pins are not muxed because u-boot sets only the minimum required for uboot functionality and kernel boot. In kernel these pins must be muxed in order to get the wifi and bluetooth work.

OK I'll add it to omap-for-v3.7-rc4/fixes-part2 with updated description for the regression. Will also move the maintainers entry there from the board branch.

Regards,

Tony