ARM: dts: add WiLink support to panda and omap4-sdp
v2 cover ARM: dts: add WiLink support to panda and omap4-sdp
Hi,
In v2: use IRQ_TYPE_LEVEL_HIGH when defining the interrupts, as suggested by Laurent.
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 | 46 +++++++++++++++++++++++++++- arch/arm/boot/dts/omap4-sdp.dts | 50 +++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.3.2
PATCH v2 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.
--- arch/arm/boot/dts/omap4-panda-common.dtsi | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-)
arch/arm/boot/dts/omap4-panda-common.dtsi +30 -1
@@ -107,6 +107,16 @@ */ clock-frequency = <19200000>; }; + + wilink_wl_en: fixedregulator at 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 {
Signature · 1 line
1.8.3.2
PATCH v2 1/4 ARM: dts: omap4-panda: add MMC5 (WiLink WLAN) configuration
Quoted 42 lines · Luciano Coelho
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(-)arch/arm/boot/dts/omap4-panda-common.dtsi +12
-0@@ -107,6 +107,16 @@ */ clock-frequency = <19200000>; }; + + wilink_wl_en: fixedregulator at 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 */ >; }; +
arch/arm/boot/dts/omap4-panda-common.dtsi line 259
Quoted 10 lines
arch/arm/boot/dts/omap4-panda-common.dtsi +10
-0+ 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 */
Hi,
Since the base for omap4_pmx_core is 0x4a100040, you need to offset 0x40 from pad address :-)
and can you please use INPUT_EN / PIN_INPUT_PULLUP / MUX_MODEx macros (from dt-bindings/pinctrl/omap.h)
PATCH v2 2/4 arm: dts: omap4-panda-common: add WiLink6 device tree nodes
In reply to Luciano CoelhoAdd 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.
--- arch/arm/boot/dts/omap4-panda-common.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/arm/boot/dts/omap4-panda-common.dtsi +15 -0
@@ -5,6 +5,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include <dt-bindings/interrupt-controller/irq.h> #include "elpida_ecb240abacn.dtsi" / {
@@ -117,6 +118,20 @@ startup-delay-us = <70000>; enable-active-high; }; + + wlan { + compatible = "ti,wilink6"; + interrupt-parent = <&gpio2>; + interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* gpio line 53 */ + clocks = <&refclock>; + clock-names = "refclock"; + + refclock: refclock { + compatible = "ti,wilink-clock"; + #clock-cells = <0>; + clock-frequency = <38400000>; + }; + }; }; &omap4_pmx_wkup {
Signature · 1 line
1.8.3.2
PATCH v2 3/4 ARM: dts: omap4-sdp: add MMC5 (WiLink WLAN) configuration
In reply to Luciano CoelhoAdd regulator, pin muxing and MMC5 configuration to be used by the on-board WiLink6 module.
--- arch/arm/boot/dts/omap4-sdp.dts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
arch/arm/boot/dts/omap4-sdp.dts +29 -0
@@ -140,6 +140,16 @@ "DMic", "Digital Mic", "Digital Mic", "Digital Mic1 Bias"; }; + + wilink_wl_en: fixedregulator at 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 {
Signature · 1 line
1.8.3.2
PATCH v2 4/4 arm: dts: omap4-sdp: add WiLink7 device tree node
In reply to Luciano CoelhoAdd 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.
--- arch/arm/boot/dts/omap4-sdp.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
arch/arm/boot/dts/omap4-sdp.dts +21 -0
@@ -7,6 +7,7 @@ */ /dts-v1/; +#include <dt-bindings/interrupt-controller/irq.h> #include "omap443x.dtsi" #include "elpida_ecb240abacn.dtsi"
@@ -150,6 +151,26 @@ startup-delay-us = <70000>; enable-active-high; }; + + wlan { + compatible = "ti,wilink7"; + interrupt-parent = <&gpio2>; + interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* gpio line 53 */ + 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 {
Signature · 1 line
1.8.3.2