2013-07-30 17:27:57

by Luciano Coelho

[permalink] [raw]
Subject: [PATCH 0/4] ARM: dts: add WiLink support to panda and omap4-sdp

Hi,

These patches add the necessary DT configuration to use the WLAN part
of WiLink on OMAP4 Pandaboard and on OMAP4-SDP (including Blaze).

I've tested these changes on Panda and it works fine. But I couldn't
test the OMAP4 SDP changes properly on 3.11-rc3 because I'm having
problems with clocks and SDIO stuff. So it's pretty much just
compiled tested. I've tried this (without the new clock definition
stuff) on Blaze with 3.10 and it was working, though.

Please take a look and let me know what you think.

Luca.


Luciano Coelho (4):
ARM: dts: omap4-panda: add MMC5 (WiLink WLAN) configuration
arm: dts: omap4-panda-common: add WiLink6 device tree nodes
ARM: dts: omap4-sdp: add MMC5 (WiLink WLAN) configuration
arm: dts: omap4-sdp: add WiLink7 device tree node

arch/arm/boot/dts/omap4-panda-common.dtsi | 45 +++++++++++++++++++++++++++-
arch/arm/boot/dts/omap4-sdp.dts | 49 +++++++++++++++++++++++++++++++
2 files changed, 93 insertions(+), 1 deletion(-)

--
1.8.3.2



2013-07-30 17:28:06

by Luciano Coelho

[permalink] [raw]
Subject: [PATCH 3/4] ARM: dts: omap4-sdp: add MMC5 (WiLink WLAN) configuration

Add regulator, pin muxing and MMC5 configuration to be used by the
on-board WiLink6 module.

Signed-off-by: Luciano Coelho <[email protected]>
---
arch/arm/boot/dts/omap4-sdp.dts | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
index 7951b4e..3845615 100644
--- a/arch/arm/boot/dts/omap4-sdp.dts
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -140,6 +140,16 @@
"DMic", "Digital Mic",
"Digital Mic", "Digital Mic1 Bias";
};
+
+ wilink_wl_en: fixedregulator@1 {
+ compatible = "regulator-fixed";
+ regulator-name = "wilink_wl_en";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ gpio = <&gpio2 22 0>; /* gpio line 54 */
+ startup-delay-us = <70000>;
+ enable-active-high;
+ };
};

&omap4_pmx_wkup {
@@ -166,6 +176,7 @@
&mcbsp2_pins
&dss_hdmi_pins
&tpd12s015_pins
+ &wilink_pins
>;

uart2_pins: pinmux_uart2_pins {
@@ -295,6 +306,19 @@
0xf0 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */
>;
};
+
+ wilink_pins: pinmux_wilink_pins {
+ pinctrl-single,pins = <
+ 0x7a 0x103 /* gpio_53 INPUT | MODE3 */
+ 0x7c 0x3 /* gpio_54 OUTPUT | MODE3 */
+ 0x148 0x118 /* clk INPUT PULLUP | MODE0 */
+ 0x14a 0x118 /* cmd INPUT PULLUP | MODE0 */
+ 0x14c 0x118 /* dat0 INPUT PULLUP | MODE0 */
+ 0x14e 0x118 /* dat1 INPUT PULLUP | MODE0 */
+ 0x150 0x118 /* dat2 INPUT PULLUP | MODE0 */
+ 0x152 0x118 /* dat3 INPUT PULLUP | MODE0 */
+ >;
+ };
};

&i2c1 {
@@ -420,8 +444,13 @@
};

&mmc5 {
+ status = "okay";
+ vmmc-supply = <&wilink_wl_en>;
bus-width = <4>;
+ cap-power-off-card;
+ keep-power-in-suspend;
ti,non-removable;
+ ti,needs-special-hs-handling;
};

&emif1 {
--
1.8.3.2


2013-07-30 17:28:09

by Luciano Coelho

[permalink] [raw]
Subject: [PATCH 4/4] arm: dts: omap4-sdp: add WiLink7 device tree node

Add appropriate device tree node for Blaze's WiLink7 module. It uses
a GPIO as interrupt, so configure the gpio2 node as interrupt parent
and assign the corresponding GPIO. Additionally, add the clock
frequencies used by the module.

Signed-off-by: Luciano Coelho <[email protected]>
---
arch/arm/boot/dts/omap4-sdp.dts | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
index 3845615..2fecca1 100644
--- a/arch/arm/boot/dts/omap4-sdp.dts
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -150,6 +150,26 @@
startup-delay-us = <70000>;
enable-active-high;
};
+
+ wlan {
+ compatible = "ti,wilink7";
+ interrupt-parent = <&gpio2>;
+ interrupts = <21 0x4>; /* gpio line 53, high level triggered */
+ clocks = <&refclock &tcxoclock>;
+ clock-names = "refclock tcxoclock";
+
+ refclock: refclock {
+ compatible = "ti,wilink-clock";
+ #clock-cells = <0>;
+ clock-frequency = <26000000>;
+ };
+
+ tcxoclock: tcxoclock {
+ compatible = "ti,wilink-clock";
+ #clock-cells = <0>;
+ clock-frequency = <26000000>;
+ };
+ };
};

&omap4_pmx_wkup {
--
1.8.3.2


2013-07-30 17:28:08

by Luciano Coelho

[permalink] [raw]
Subject: [PATCH 1/4] ARM: dts: omap4-panda: add MMC5 (WiLink WLAN) configuration

Add regulator, pin muxing and MMC5 configuration to be used by the
on-board WiLink6 module.

Signed-off-by: Luciano Coelho <[email protected]>
---
arch/arm/boot/dts/omap4-panda-common.dtsi | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index faa95b5..b3f6e1f 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -107,6 +107,16 @@
*/
clock-frequency = <19200000>;
};
+
+ wilink_wl_en: fixedregulator@1 {
+ compatible = "regulator-fixed";
+ regulator-name = "wilink_wl_en";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ gpio = <&gpio2 11 0>; /* gpio line 43 */
+ startup-delay-us = <70000>;
+ enable-active-high;
+ };
};

&omap4_pmx_wkup {
@@ -132,6 +142,7 @@
&dss_hdmi_pins
&tpd12s015_pins
&hsusbb1_pins
+ &wilink_pins
>;

twl6030_pins: pinmux_twl6030_pins {
@@ -235,6 +246,19 @@
0x1c (PIN_OUTPUT | MUX_MODE3) /* gpio_wk8 */
>;
};
+
+ wilink_pins: pinmux_wilink_pins {
+ pinctrl-single,pins = <
+ 0x7a 0x103 /* gpio_53 INPUT | MODE3 */
+ 0x66 0x3 /* gpio_43 OUTPUT | MODE3 */
+ 0x148 0x118 /* clk INPUT PULLUP | MODE0 */
+ 0x14a 0x118 /* cmd INPUT PULLUP | MODE0 */
+ 0x14c 0x118 /* dat0 INPUT PULLUP | MODE0 */
+ 0x14e 0x118 /* dat1 INPUT PULLUP | MODE0 */
+ 0x150 0x118 /* dat2 INPUT PULLUP | MODE0 */
+ 0x152 0x118 /* dat3 INPUT PULLUP | MODE0 */
+ >;
+ };
};

&i2c1 {
@@ -314,8 +338,13 @@
};

&mmc5 {
- ti,non-removable;
+ status = "okay";
+ vmmc-supply = <&wilink_wl_en>;
bus-width = <4>;
+ cap-power-off-card;
+ keep-power-in-suspend;
+ ti,non-removable;
+ ti,needs-special-hs-handling;
};

&emif1 {
--
1.8.3.2


2013-07-30 17:28:06

by Luciano Coelho

[permalink] [raw]
Subject: [PATCH 2/4] arm: dts: omap4-panda-common: add WiLink6 device tree nodes

Add the WiLink device tree nodes. On omap4-panda, a WiLink6 module is
connected on MMC5 and a GPIO interrupt is used. The refclock
frequency is 38.4MHz.

Signed-off-by: Luciano Coelho <[email protected]>
---
arch/arm/boot/dts/omap4-panda-common.dtsi | 14 ++++++++++++++
1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index b3f6e1f..77e4a42 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -117,6 +117,20 @@
startup-delay-us = <70000>;
enable-active-high;
};
+
+ wlan {
+ compatible = "ti,wilink6";
+ interrupt-parent = <&gpio2>;
+ interrupts = <21 0x4>; /* gpio line 53, high level triggered */
+ clocks = <&refclock>;
+ clock-names = "refclock";
+
+ refclock: refclock {
+ compatible = "ti,wilink-clock";
+ #clock-cells = <0>;
+ clock-frequency = <38400000>;
+ };
+ };
};

&omap4_pmx_wkup {
--
1.8.3.2