ARM: tegra: enable wlan for t20 and t30

Started by Wei Ni on Sep 21, 2012 · 11 messages from 3 authors · Last reply Oct 15, 2012

Series

5 patches, 8 files

+71 −0

Subsystems (2)

Maintainers (2)

STALE5159d

Revision v2 (2 revisions archived).

Revisions (2)
  1. v1
  2. v2 current [diff against previous]

open the first message on its own page

  1. [PATCH v2 1/5] ARM: tegra: set up wlan clocks for tegra dt
    Revisions and related patches
    Revisions (2)
    1. v1
    2. v2 current [diff against previous]
  2. [PATCH v2 2/5] ARM: dt: t20 seaboard: turn on the power for wlan
    Revisions and related patches
    Revisions (2)
    1. v1
    2. v2 current [diff against previous]
  3. [PATCH v2 5/5] ARM: tegra: enable brcmfmac in defconfig
    Revisions and related patches
    Revisions (2)
    1. v1
    2. v2 current [diff against previous]
  4. [PATCH v2 4/5] ARM: dt: t30 cardhu: set pinmux and power for wlan
    Revisions and related patches
    Revisions (2)
    1. v1
    2. v2 current [diff against previous]
  5. [PATCH v2 3/5] ARM: dt: t20 ventana: set pinmux and power for wlan
    Revisions and related patches
    Revisions (2)
    1. v1
    2. v2 current [diff against previous]
Message details and related content
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(-)

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

Message details and related content
Set up the wlan clock tree for Tegra20 and Tegra30.

Signed-off-by: Wei Ni <redacted>
---
 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(-)
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c
index c339444..d24467a 100644
--- a/arch/arm/mach-tegra/board-dt-tegra20.c
+++ b/arch/arm/mach-tegra/board-dt-tegra20.c
@@ -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},
 };
 
diff --git a/arch/arm/mach-tegra/board-dt-tegra30.c b/arch/arm/mach-tegra/board-dt-tegra30.c
index 53bf60f..3277d1e 100644
--- a/arch/arm/mach-tegra/board-dt-tegra30.c
+++ b/arch/arm/mach-tegra/board-dt-tegra30.c
@@ -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},
 };
 
-- 
1.7.1

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

Message details and related content
Enable the SDHCI1 controller. This is connected to the WiFi module.

Signed-off-by: Wei Ni <redacted>
---
 arch/arm/boot/dts/tegra20-seaboard.dts |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/dts/tegra20-seaboard.dts b/arch/arm/boot/dts/tegra20-seaboard.dts
index e60dc71..0ee474d 100644
--- a/arch/arm/boot/dts/tegra20-seaboard.dts
+++ b/arch/arm/boot/dts/tegra20-seaboard.dts
@@ -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 */
-- 
1.7.1

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

Message details and related content
New options enabled:
* CFG80211_WEXT: (dependency)
* BRCMFMAC: wlan driver, enable as module.

Signed-off-by: Wei Ni <redacted>
---
 arch/arm/configs/tegra_defconfig |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig
index adcf3c2..04b18ea 100644
--- a/arch/arm/configs/tegra_defconfig
+++ b/arch/arm/configs/tegra_defconfig
@@ -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
-- 
1.7.1

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

Message details and related content
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.

Signed-off-by: Wei Ni <redacted>
---
 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(-)
diff --git a/arch/arm/boot/dts/tegra30-cardhu-a02.dts b/arch/arm/boot/dts/tegra30-cardhu-a02.dts
index dd4222f..adc88aa 100644
--- a/arch/arm/boot/dts/tegra30-cardhu-a02.dts
+++ b/arch/arm/boot/dts/tegra30-cardhu-a02.dts
@@ -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>;
+	};
 };
 
diff --git a/arch/arm/boot/dts/tegra30-cardhu-a04.dts b/arch/arm/boot/dts/tegra30-cardhu-a04.dts
index 0828f09..08163e1 100644
--- a/arch/arm/boot/dts/tegra30-cardhu-a04.dts
+++ b/arch/arm/boot/dts/tegra30-cardhu-a04.dts
@@ -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>;
+	};
 };
diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30-cardhu.dtsi
index d10c9c5..4475750 100644
--- a/arch/arm/boot/dts/tegra30-cardhu.dtsi
+++ b/arch/arm/boot/dts/tegra30-cardhu.dtsi
@@ -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>;
-- 
1.7.1

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

Message details and related content
Configure pinmux as required for WiFi.
Enable the SDHCI1 controller, which is connectted to the WiFi module.

Signed-off-by: Wei Ni <redacted>
---
 arch/arm/boot/dts/tegra20-ventana.dts |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/dts/tegra20-ventana.dts b/arch/arm/boot/dts/tegra20-ventana.dts
index 3e5952f..d8161fb 100644
--- a/arch/arm/boot/dts/tegra20-ventana.dts
+++ b/arch/arm/boot/dts/tegra20-ventana.dts
@@ -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 */
-- 
1.7.1

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

Message details and related content
On 09/21/2012 10:55 AM, Wei Ni wrote:
quoted hunk
New options enabled:
* CFG80211_WEXT: (dependency)
* BRCMFMAC: wlan driver, enable as module.

Signed-off-by: Wei Ni <redacted>
---
  arch/arm/configs/tegra_defconfig |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig
index adcf3c2..04b18ea 100644
--- a/arch/arm/configs/tegra_defconfig
+++ b/arch/arm/configs/tegra_defconfig
@@ -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

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

Message details and related content
On 09/21/2012 08:39 AM, Arend van Spriel wrote:
On 09/21/2012 10:55 AM, Wei Ni wrote:
quoted
New options enabled:
* CFG80211_WEXT: (dependency)
* BRCMFMAC: wlan driver, enable as module.

Signed-off-by: Wei Ni <redacted>
---
  arch/arm/configs/tegra_defconfig |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/configs/tegra_defconfig
b/arch/arm/configs/tegra_defconfig
index adcf3c2..04b18ea 100644
--- a/arch/arm/configs/tegra_defconfig
+++ b/arch/arm/configs/tegra_defconfig
@@ -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?
"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?

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

Message details and related content
On 09/21/2012 06:19 PM, Stephen Warren wrote:
On 09/21/2012 08:39 AM, Arend van Spriel wrote:
quoted
On 09/21/2012 10:55 AM, Wei Ni wrote:
quoted
New options enabled:
* CFG80211_WEXT: (dependency)
* BRCMFMAC: wlan driver, enable as module.

Signed-off-by: Wei Ni <redacted>
---
   arch/arm/configs/tegra_defconfig |    2 ++
   1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/configs/tegra_defconfig
b/arch/arm/configs/tegra_defconfig
index adcf3c2..04b18ea 100644
--- a/arch/arm/configs/tegra_defconfig
+++ b/arch/arm/configs/tegra_defconfig
@@ -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?
"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

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

Message details and related content
On 09/21/2012 01:05 PM, Arend van Spriel wrote:
On 09/21/2012 06:19 PM, Stephen Warren wrote:
quoted
On 09/21/2012 08:39 AM, Arend van Spriel wrote:
quoted
On 09/21/2012 10:55 AM, Wei Ni wrote:
quoted
New options enabled:
* CFG80211_WEXT: (dependency)
* BRCMFMAC: wlan driver, enable as module.

Signed-off-by: Wei Ni <redacted>
---
   arch/arm/configs/tegra_defconfig |    2 ++
   1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/configs/tegra_defconfig
b/arch/arm/configs/tegra_defconfig
index adcf3c2..04b18ea 100644
--- a/arch/arm/configs/tegra_defconfig
+++ b/arch/arm/configs/tegra_defconfig
@@ -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?
"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.

5 more quoted lines

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.
Message details and related content
On 09/21/2012 02:54 AM, Wei Ni wrote:
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.
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help