Skip to contentSkip to conversation

ARM: tegra: enable wlan for t20 and t30

PATCH In review Wei Ni 3 participants 11 messages Sep 21, 2012 – Oct 15, 2012

Subsystems (4)
lore
Share & tools
lore

Wei Ni

author
#0 lore raw

v2 cover ARM: tegra: enable wlan for t20 and t30

Enable wlan for following tegra board:
Tegra30: Cardhu.
Tegra20: Seaboard, Ventana.

Note that this series depends on specific brcmfmac patches:
http://thread.gmane.org/gmane.linux.kernel.wireless.general/97337.

V2: -Since Broadcom restructure the dpc routine with above link,
it can fix non-OOB issue, so we remove the patches for brcmfmac driver.
-Support Cardhu a02 and a04 board.
-Remove the config WLAN and WIRELESS in the patch,
because they are default=y
-Add bus-width for sdhci in the dts file

Wei Ni (5):
ARM: tegra: set up wlan clocks for tegra dt
ARM: dt: t20 seaboard: turn on the power for wlan
ARM: dt: t20 ventana: set pinmux and power for wlan
ARM: dt: t30 cardhu: set pinmux and power for wlan
ARM: tegra: enable brcmfmac in defconfig

 arch/arm/boot/dts/tegra20-seaboard.dts   |    6 ++++++
 arch/arm/boot/dts/tegra20-ventana.dts    |   16 ++++++++++++++++
 arch/arm/boot/dts/tegra30-cardhu-a02.dts |    6 ++++++
 arch/arm/boot/dts/tegra30-cardhu-a04.dts |    6 ++++++
 arch/arm/boot/dts/tegra30-cardhu.dtsi    |   27 +++++++++++++++++++++++++++
 arch/arm/configs/tegra_defconfig         |    2 ++
 arch/arm/mach-tegra/board-dt-tegra20.c   |    4 ++++
 arch/arm/mach-tegra/board-dt-tegra30.c   |    4 ++++
 8 files changed, 71 insertions(+), 0 deletions(-)
author
#1 lore raw

PATCH v2 1/5 ARM: tegra: set up wlan clocks for tegra dt

Set up the wlan clock tree for Tegra20 and Tegra30.

---
 arch/arm/mach-tegra/board-dt-tegra20.c |    4 ++++
 arch/arm/mach-tegra/board-dt-tegra30.c |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
arch/arm/mach-tegra/board-dt-tegra20.c +4 -0
index c339444..d24467a 100644
@@ -103,8 +103,12 @@ static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = {
 	{ "pll_a",      "pll_p_out1",   56448000,       true },
 	{ "pll_a_out0", "pll_a",        11289600,       true },
 	{ "cdev1",      NULL,           0,              true },
+	{ "blink",      "clk_32k",      32768,          true },
 	{ "i2s1",       "pll_a_out0",   11289600,       false},
 	{ "i2s2",       "pll_a_out0",   11289600,       false},
+	{ "sdmmc1",	"pll_p",	48000000,	false},
+	{ "sdmmc3",	"pll_p",	48000000,	false},
+	{ "sdmmc4",	"pll_p",	48000000,	false},
 	{ NULL,		NULL,		0,		0},
 };
 
arch/arm/mach-tegra/board-dt-tegra30.c +4 -0
index 53bf60f..3277d1e 100644
@@ -61,11 +61,15 @@ static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = {
 	{ "pll_a_out0",	"pll_a",	11289600,	true },
 	{ "extern1",	"pll_a_out0",	0,		true },
 	{ "clk_out_1",	"extern1",	0,		true },
+	{ "blink",	"clk_32k",	32768,		true },
 	{ "i2s0",	"pll_a_out0",	11289600,	false},
 	{ "i2s1",	"pll_a_out0",	11289600,	false},
 	{ "i2s2",	"pll_a_out0",	11289600,	false},
 	{ "i2s3",	"pll_a_out0",	11289600,	false},
 	{ "i2s4",	"pll_a_out0",	11289600,	false},
+	{ "sdmmc1",	"pll_p",	48000000,	false},
+	{ "sdmmc3",	"pll_p",	48000000,	false},
+	{ "sdmmc4",	"pll_p",	48000000,	false},
 	{ NULL,		NULL,		0,		0},
 };
 
Signature · 1 line
1.7.1
author
#2 lore raw

PATCH v2 2/5 ARM: dt: t20 seaboard: turn on the power for wlan

In reply to Wei Ni

Enable the SDHCI1 controller. This is connected to the WiFi module.

---
 arch/arm/boot/dts/tegra20-seaboard.dts |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra20-seaboard.dts +6 -0
index e60dc71..0ee474d 100644
@@ -592,6 +592,12 @@
 		status = "okay";
 	};
 
+	sdhci at c8000000 {
+		status = "okay";
+		power-gpios = <&gpio 86 0>; /* gpio PK6 */
+		bus-width = <4>;
+	};
+
 	sdhci at c8000400 {
 		status = "okay";
 		cd-gpios = <&gpio 69 0>; /* gpio PI5 */
Signature · 1 line
1.7.1
author
#3 lore raw

PATCH v2 3/5 ARM: dt: t20 ventana: set pinmux and power for wlan

In reply to Wei Ni

Configure pinmux as required for WiFi.
Enable the SDHCI1 controller, which is connectted to the WiFi module.

---
 arch/arm/boot/dts/tegra20-ventana.dts |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra20-ventana.dts +16 -0
index 3e5952f..d8161fb 100644
@@ -237,6 +237,16 @@
 					"ld23_22";
 				nvidia,pull = <1>;
 			};
+			drive_sdio1 {
+				nvidia,pins = "drive_sdio1";
+				nvidia,high-speed-mode = <0>;
+				nvidia,schmitt = <1>;
+				nvidia,low-power-mode = <3>;
+				nvidia,pull-down-strength = <31>;
+				nvidia,pull-up-strength = <31>;
+				nvidia,slew-rate-rising = <3>;
+				nvidia,slew-rate-falling = <3>;
+			};
 		};
 	};
 
@@ -456,6 +466,12 @@
 		status = "okay";
 	};
 
+	sdhci at c8000000 {
+		status = "okay";
+		power-gpios = <&gpio 86 0>; /* gpio PK6 */
+		bus-width = <4>;
+	};
+
 	sdhci at c8000400 {
 		status = "okay";
 		cd-gpios = <&gpio 69 0>; /* gpio PI5 */
Signature · 1 line
1.7.1
author
#4 lore raw

PATCH v2 4/5 ARM: dt: t30 cardhu: set pinmux and power for wlan

In reply to Wei Ni

Configure pinmux as required for WiFi.
Enable the SDHCI1 controller for a02 and a04 board, which is connected to the WiFi module.
For now, always enable the regulator that provides power to the Wifi module.

---
 arch/arm/boot/dts/tegra30-cardhu-a02.dts |    6 ++++++
 arch/arm/boot/dts/tegra30-cardhu-a04.dts |    6 ++++++
 arch/arm/boot/dts/tegra30-cardhu.dtsi    |   27 +++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra30-cardhu-a02.dts +6 -0
index dd4222f..adc88aa 100644
@@ -83,5 +83,11 @@
 			gpio = <&gpio 83 0>; /* GPIO PK3 */
 		};
 	};
+
+	sdhci at 78000400 {
+		status = "okay";
+		power-gpios = <&gpio 28 0>; /* gpio PD4 */
+		bus-width = <4>;
+	};
 };
 
arch/arm/boot/dts/tegra30-cardhu-a04.dts +6 -0
index 0828f09..08163e1 100644
@@ -95,4 +95,10 @@
 			gpio = <&gpio 232 0>; /* GPIO PDD0 */
 		};
 	};
+
+	sdhci at 78000400 {
+		status = "okay";
+		power-gpios = <&gpio 27 0>; /* gpio PD3 */
+		bus-width = <4>;
+	};
 };
arch/arm/boot/dts/tegra30-cardhu.dtsi +27 -0
index d10c9c5..4475750 100644
@@ -52,6 +52,22 @@
 				nvidia,pull = <2>;
 				nvidia,tristate = <0>;
 			};
+			sdmmc3_clk_pa6 {
+				nvidia,pins = "sdmmc3_clk_pa6";
+				nvidia,function = "sdmmc3";
+				nvidia,pull = <0>;
+				nvidia,tristate = <0>;
+			};
+			sdmmc3_cmd_pa7 {
+				nvidia,pins =	"sdmmc3_cmd_pa7",
+						"sdmmc3_dat0_pb7",
+						"sdmmc3_dat1_pb6",
+						"sdmmc3_dat2_pb5",
+						"sdmmc3_dat3_pb4";
+				nvidia,function = "sdmmc3";
+				nvidia,pull = <2>;
+				nvidia,tristate = <0>;
+			};
 			sdmmc4_clk_pcc4 {
 				nvidia,pins =	"sdmmc4_clk_pcc4",
 						"sdmmc4_rst_n_pcc3";
@@ -81,6 +97,15 @@
 				nvidia,pull = <0>;
 				nvidia,tristate = <0>;
 			};
+			sdio3 {
+				nvidia,pins = "drive_sdio3";
+				nvidia,high-speed-mode = <0>;
+				nvidia,schmitt = <0>;
+				nvidia,pull-down-strength = <46>;
+				nvidia,pull-up-strength = <42>;
+				nvidia,slew-rate-rising = <1>;
+				nvidia,slew-rate-falling = <1>;
+			};
 		};
 	};
 
@@ -409,6 +434,8 @@
 			regulator-name = "vdd_com";
 			regulator-min-microvolt = <3300000>;
 			regulator-max-microvolt = <3300000>;
+			regulator-always-on;
+			regulator-boot-on;
 			enable-active-high;
 			gpio = <&gpio 24 0>; /* gpio PD0 */
 			vin-supply = <&sys_3v3_reg>;
Signature · 1 line
1.7.1
author
#5 lore raw

PATCH v2 5/5 ARM: tegra: enable brcmfmac in defconfig

In reply to Wei Ni

New options enabled:
* CFG80211_WEXT: (dependency)
* BRCMFMAC: wlan driver, enable as module.

---
 arch/arm/configs/tegra_defconfig |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/configs/tegra_defconfig +2 -0
index adcf3c2..04b18ea 100644
@@ -73,6 +73,7 @@ CONFIG_BT_BNEP=y
 CONFIG_BT_HIDP=y
 CONFIG_BT_HCIBTUSB=m
 CONFIG_CFG80211=y
+CONFIG_CFG80211_WEXT=y
 CONFIG_MAC80211=y
 CONFIG_RFKILL=y
 CONFIG_RFKILL_INPUT=y
@@ -98,6 +99,7 @@ CONFIG_USB_PEGASUS=y
 CONFIG_USB_USBNET=y
 CONFIG_USB_NET_SMSC75XX=y
 CONFIG_USB_NET_SMSC95XX=y
+CONFIG_BRCMFMAC=m
 CONFIG_RT2X00=y
 CONFIG_RT2800USB=m
 CONFIG_INPUT_EVDEV=y
Signature · 1 line
1.7.1
#6 lore raw

Re: [PATCH v2 5/5] ARM: tegra: enable brcmfmac in defconfig

Quoted 14 lines · Wei Ni

New options enabled:
* CFG80211_WEXT: (dependency)
* BRCMFMAC: wlan driver, enable as module.

---
  arch/arm/configs/tegra_defconfig |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/configs/tegra_defconfig +0 -0
index adcf3c2..04b18ea 100644

arch/arm/configs/tegra_defconfig CONFIG_BT_BNEP=y · line 76

Quoted 4 lines
arch/arm/configs/tegra_defconfig +1 -0
@@ -73,6 +73,7 @@ CONFIG_BT_BNEP=y
  CONFIG_BT_HIDP=y
  CONFIG_BT_HCIBTUSB=m
  CONFIG_CFG80211=y
+CONFIG_CFG80211_WEXT=y

Any particular reason for enabling this? The driver does not specifically need it. The option only allows use of WEXT dependent user-space tools like iwconfig and iwlist. At least it is not needed by brcmfmac driver hence it does not select it.

You indicate there is a dependency. Could you elaborate?

Gr. AvS

#7 lore raw

Re: [PATCH v2 5/5] ARM: tegra: enable brcmfmac in defconfig

Quoted 26 lines · Arend van Spriel
Quoted 15 lines · Wei Ni

New options enabled:
* CFG80211_WEXT: (dependency)
* BRCMFMAC: wlan driver, enable as module.

---
  arch/arm/configs/tegra_defconfig |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/configs/tegra_defconfig +0 -0
index adcf3c2..04b18ea 100644

arch/arm/configs/tegra_defconfig CONFIG_BT_BNEP=y · line 76

Quoted 4 lines
arch/arm/configs/tegra_defconfig +1 -0
@@ -73,6 +73,7 @@ CONFIG_BT_BNEP=y
  CONFIG_BT_HIDP=y
  CONFIG_BT_HCIBTUSB=m
  CONFIG_CFG80211=y
+CONFIG_CFG80211_WEXT=y

Any particular reason for enabling this? The driver does not specifically need it. The option only allows use of WEXT dependent user-space tools like iwconfig and iwlist. At least it is not needed by brcmfmac driver hence it does not select it.

Quoted 1 line

You indicate there is a dependency. Could you elaborate?

"Dependency" probably isn't correct.

However, the intent of tegra_defconfig is to provide a useful configuration for Tegra boards. Without the ability to use iwconfig/iwlist, enabling the wireless driver doesn't seem useful; how would someone configure the wireless connection?

#8 lore raw

Re: [PATCH v2 5/5] ARM: tegra: enable brcmfmac in defconfig

Quoted 27 lines · Stephen Warren
Quoted 26 lines · Arend van Spriel
Quoted 15 lines · Wei Ni

New options enabled:
* CFG80211_WEXT: (dependency)
* BRCMFMAC: wlan driver, enable as module.

---
   arch/arm/configs/tegra_defconfig |    2 ++
   1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/configs/tegra_defconfig +0 -0
index adcf3c2..04b18ea 100644

arch/arm/configs/tegra_defconfig CONFIG_BT_BNEP=y · line 76

Quoted 4 lines
arch/arm/configs/tegra_defconfig +1 -0
@@ -73,6 +73,7 @@ CONFIG_BT_BNEP=y
   CONFIG_BT_HIDP=y
   CONFIG_BT_HCIBTUSB=m
   CONFIG_CFG80211=y
+CONFIG_CFG80211_WEXT=y

Any particular reason for enabling this? The driver does not specifically need it. The option only allows use of WEXT dependent user-space tools like iwconfig and iwlist. At least it is not needed by brcmfmac driver hence it does not select it.

Quoted 8 lines
Quoted 1 line

You indicate there is a dependency. Could you elaborate?

"Dependency" probably isn't correct.

However, the intent of tegra_defconfig is to provide a useful configuration for Tegra boards. Without the ability to use iwconfig/iwlist, enabling the wireless driver doesn't seem useful; how would someone configure the wireless connection?

Let me explain. CFG80211 provides a netlink api called NL80211 which is favorable over WEXT api. In user-space the iw tool is replacing iwconfig and iwlist. Also wpa_supplicant has support for both wext and nl80211.

CFG80211_WEXT basically provides an adaptation/compatibility layer that allows user-space tools to interact with cfg80211 drivers. However, it is intended to be phased out so I would not recommend putting it in a defconfig.

Gr. AvS

#9 lore raw

Re: [PATCH v2 5/5] ARM: tegra: enable brcmfmac in defconfig

Quoted 37 lines · Arend van Spriel
Quoted 27 lines · Stephen Warren
Quoted 26 lines · Arend van Spriel
Quoted 15 lines · Wei Ni

New options enabled:
* CFG80211_WEXT: (dependency)
* BRCMFMAC: wlan driver, enable as module.

---
   arch/arm/configs/tegra_defconfig |    2 ++
   1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/configs/tegra_defconfig +0 -0
index adcf3c2..04b18ea 100644

arch/arm/configs/tegra_defconfig CONFIG_BT_BNEP=y · line 76

Quoted 4 lines
arch/arm/configs/tegra_defconfig +1 -0
@@ -73,6 +73,7 @@ CONFIG_BT_BNEP=y
   CONFIG_BT_HIDP=y
   CONFIG_BT_HCIBTUSB=m
   CONFIG_CFG80211=y
+CONFIG_CFG80211_WEXT=y

Any particular reason for enabling this? The driver does not specifically need it. The option only allows use of WEXT dependent user-space tools like iwconfig and iwlist. At least it is not needed by brcmfmac driver hence it does not select it.

Quoted 8 lines
Quoted 1 line

You indicate there is a dependency. Could you elaborate?

"Dependency" probably isn't correct.

However, the intent of tegra_defconfig is to provide a useful configuration for Tegra boards. Without the ability to use iwconfig/iwlist, enabling the wireless driver doesn't seem useful; how would someone configure the wireless connection?

Quoted 8 lines

Let me explain. CFG80211 provides a netlink api called NL80211 which is favorable over WEXT api. In user-space the iw tool is replacing iwconfig and iwlist. Also wpa_supplicant has support for both wext and nl80211.

CFG80211_WEXT basically provides an adaptation/compatibility layer that allows user-space tools to interact with cfg80211 drivers. However, it is intended to be phased out so I would not recommend putting it in a defconfig.

OK, I suppose that I'd expect to use a given kernel's defconfig with a fairly recent distro, so switching to "iw" is reasonable, and so removing that defconfig entry is reasonable. I'll just remove that line when applying these patches unless there's any other need for a re-spin.

#10 lore raw
In reply to Wei Ni
Quoted 6 lines · Wei Ni

Enable wlan for following tegra board:
Tegra30: Cardhu.
Tegra20: Seaboard, Ventana.

Note that this series depends on specific brcmfmac patches:
http://thread.gmane.org/gmane.linux.kernel.wireless.general/97337.

Now that those patches are in 3.7-rc1, I've applied this series to Tegra's for-3.8/wifi branch (first 4) and for-3.8/defconfig branch (last 1). I'm not 100% sure yet exactly which patches will appear for 3.8; I might just make a single for-3.8/dt branch instead of having a separate wifi branch; we'll see...

Thanks.