aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2015-03-18 12:38:29 -0400
committerTony Lindgren <tony@atomide.com>2015-03-24 12:48:14 -0400
commit99f84cae43df242f0d69ffcfee3a4d69f9b71b44 (patch)
tree6937add05ce7e7a5a316516facc6a88190cb1f14
parent5ea5c518ccaba0de97efb71c3bccbcdee681c2e6 (diff)
ARM: dts: add wl12xx/wl18xx bindings
Replace all the pdata-quirks for setting wl12xx/wl18xx platform data with proper DT definitions. Signed-off-by: Eliad Peller <eliad@wizery.com> Acked-by: Javier Martinez Canillas <javier@dowhile0.org> Acked-by: Enric Balletbo i Serra <eballetbo@gmail.com> Tested-by: Nikita Kiryanov <nikita@compulab.co.il> Tested-by: Tony Lindgren <tony@atomide.com> Acked-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/boot/dts/am335x-evmsk.dts11
-rw-r--r--arch/arm/boot/dts/omap3-cm-t3517.dts10
-rw-r--r--arch/arm/boot/dts/omap3-cm-t3730.dts10
-rw-r--r--arch/arm/boot/dts/omap3-evm-common.dtsi10
-rw-r--r--arch/arm/boot/dts/omap3-igep0020-rev-f.dts9
-rw-r--r--arch/arm/boot/dts/omap3-igep0030-rev-g.dts9
-rw-r--r--arch/arm/boot/dts/omap3-zoom3.dts10
-rw-r--r--arch/arm/boot/dts/omap4-panda-common.dtsi10
-rw-r--r--arch/arm/boot/dts/omap4-sdp.dts11
-rw-r--r--arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi10
-rw-r--r--arch/arm/mach-omap2/pdata-quirks.c74
11 files changed, 100 insertions, 74 deletions
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
index df5fee6b6b4b..87fc7a35e802 100644
--- a/arch/arm/boot/dts/am335x-evmsk.dts
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
@@ -15,6 +15,7 @@
15 15
16#include "am33xx.dtsi" 16#include "am33xx.dtsi"
17#include <dt-bindings/pwm/pwm.h> 17#include <dt-bindings/pwm/pwm.h>
18#include <dt-bindings/interrupt-controller/irq.h>
18 19
19/ { 20/ {
20 model = "TI AM335x EVM-SK"; 21 model = "TI AM335x EVM-SK";
@@ -647,6 +648,16 @@
647 cap-power-off-card; 648 cap-power-off-card;
648 pinctrl-names = "default"; 649 pinctrl-names = "default";
649 pinctrl-0 = <&mmc2_pins>; 650 pinctrl-0 = <&mmc2_pins>;
651
652 #address-cells = <1>;
653 #size-cells = <0>;
654 wlcore: wlcore@2 {
655 compatible = "ti,wl1271";
656 reg = <2>;
657 interrupt-parent = <&gpio1>;
658 interrupts = <31 IRQ_TYPE_LEVEL_HIGH>; /* gpio 31 */
659 ref-clock-frequency = <38400000>;
660 };
650}; 661};
651 662
652&mcasp1 { 663&mcasp1 {
diff --git a/arch/arm/boot/dts/omap3-cm-t3517.dts b/arch/arm/boot/dts/omap3-cm-t3517.dts
index 0ab748cf7749..f5b5a1d96cd7 100644
--- a/arch/arm/boot/dts/omap3-cm-t3517.dts
+++ b/arch/arm/boot/dts/omap3-cm-t3517.dts
@@ -133,6 +133,16 @@
133 non-removable; 133 non-removable;
134 bus-width = <4>; 134 bus-width = <4>;
135 cap-power-off-card; 135 cap-power-off-card;
136
137 #address-cells = <1>;
138 #size-cells = <0>;
139 wlcore: wlcore@2 {
140 compatible = "ti,wl1271";
141 reg = <2>;
142 interrupt-parent = <&gpio5>;
143 interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; /* gpio 145 */
144 ref-clock-frequency = <38400000>;
145 };
136}; 146};
137 147
138&dss { 148&dss {
diff --git a/arch/arm/boot/dts/omap3-cm-t3730.dts b/arch/arm/boot/dts/omap3-cm-t3730.dts
index 46eadb21b5ef..2294f5b0aa10 100644
--- a/arch/arm/boot/dts/omap3-cm-t3730.dts
+++ b/arch/arm/boot/dts/omap3-cm-t3730.dts
@@ -73,6 +73,16 @@
73 non-removable; 73 non-removable;
74 bus-width = <4>; 74 bus-width = <4>;
75 cap-power-off-card; 75 cap-power-off-card;
76
77 #address-cells = <1>;
78 #size-cells = <0>;
79 wlcore: wlcore@2 {
80 compatible = "ti,wl1271";
81 reg = <2>;
82 interrupt-parent = <&gpio5>;
83 interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; /* gpio 136 */
84 ref-clock-frequency = <38400000>;
85 };
76}; 86};
77 87
78&dss { 88&dss {
diff --git a/arch/arm/boot/dts/omap3-evm-common.dtsi b/arch/arm/boot/dts/omap3-evm-common.dtsi
index 127f3e7c10c4..346552b94d9f 100644
--- a/arch/arm/boot/dts/omap3-evm-common.dtsi
+++ b/arch/arm/boot/dts/omap3-evm-common.dtsi
@@ -106,6 +106,16 @@
106 non-removable; 106 non-removable;
107 bus-width = <4>; 107 bus-width = <4>;
108 cap-power-off-card; 108 cap-power-off-card;
109
110 #address-cells = <1>;
111 #size-cells = <0>;
112 wlcore: wlcore@2 {
113 compatible = "ti,wl1271";
114 reg = <2>;
115 interrupt-parent = <&gpio5>;
116 interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* gpio 149 */
117 ref-clock-frequency = <38400000>;
118 };
109}; 119};
110 120
111&twl_gpio { 121&twl_gpio {
diff --git a/arch/arm/boot/dts/omap3-igep0020-rev-f.dts b/arch/arm/boot/dts/omap3-igep0020-rev-f.dts
index cc8bd0cd8cf8..72f7cdc091fb 100644
--- a/arch/arm/boot/dts/omap3-igep0020-rev-f.dts
+++ b/arch/arm/boot/dts/omap3-igep0020-rev-f.dts
@@ -42,4 +42,13 @@
42 vmmc-supply = <&lbep5clwmc_wlen>; 42 vmmc-supply = <&lbep5clwmc_wlen>;
43 bus-width = <4>; 43 bus-width = <4>;
44 non-removable; 44 non-removable;
45
46 #address-cells = <1>;
47 #size-cells = <0>;
48 wlcore: wlcore@2 {
49 compatible = "ti,wl1835";
50 reg = <2>;
51 interrupt-parent = <&gpio6>;
52 interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; /* gpio 177 */
53 };
45}; 54};
diff --git a/arch/arm/boot/dts/omap3-igep0030-rev-g.dts b/arch/arm/boot/dts/omap3-igep0030-rev-g.dts
index 9326b282c94a..b899e341874a 100644
--- a/arch/arm/boot/dts/omap3-igep0030-rev-g.dts
+++ b/arch/arm/boot/dts/omap3-igep0030-rev-g.dts
@@ -64,4 +64,13 @@
64 vmmc-supply = <&lbep5clwmc_wlen>; 64 vmmc-supply = <&lbep5clwmc_wlen>;
65 bus-width = <4>; 65 bus-width = <4>;
66 non-removable; 66 non-removable;
67
68 #address-cells = <1>;
69 #size-cells = <0>;
70 wlcore: wlcore@2 {
71 compatible = "ti,wl1835";
72 reg = <2>;
73 interrupt-parent = <&gpio5>;
74 interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; /* gpio 136 */
75 };
67}; 76};
diff --git a/arch/arm/boot/dts/omap3-zoom3.dts b/arch/arm/boot/dts/omap3-zoom3.dts
index 6644f516a42b..131448d86e67 100644
--- a/arch/arm/boot/dts/omap3-zoom3.dts
+++ b/arch/arm/boot/dts/omap3-zoom3.dts
@@ -195,6 +195,16 @@
195 cap-power-off-card; 195 cap-power-off-card;
196 pinctrl-names = "default"; 196 pinctrl-names = "default";
197 pinctrl-0 = <&mmc3_pins &mmc3_2_pins>; 197 pinctrl-0 = <&mmc3_pins &mmc3_2_pins>;
198
199 #address-cells = <1>;
200 #size-cells = <0>;
201 wlcore: wlcore@2 {
202 compatible = "ti,wl1271";
203 reg = <2>;
204 interrupt-parent = <&gpio6>;
205 interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; /* gpio 162 */
206 ref-clock-frequency = <26000000>;
207 };
198}; 208};
199 209
200&uart1 { 210&uart1 {
diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index 150513506c19..1228de5a05ed 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -450,6 +450,16 @@
450 non-removable; 450 non-removable;
451 bus-width = <4>; 451 bus-width = <4>;
452 cap-power-off-card; 452 cap-power-off-card;
453
454 #address-cells = <1>;
455 #size-cells = <0>;
456 wlcore: wlcore@2 {
457 compatible = "ti,wl1271";
458 reg = <2>;
459 interrupt-parent = <&gpio2>;
460 interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* gpio 53 */
461 ref-clock-frequency = <38400000>;
462 };
453}; 463};
454 464
455&emif1 { 465&emif1 {
diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
index 3e1da43068f6..8c36f51f5780 100644
--- a/arch/arm/boot/dts/omap4-sdp.dts
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -487,6 +487,17 @@
487 non-removable; 487 non-removable;
488 bus-width = <4>; 488 bus-width = <4>;
489 cap-power-off-card; 489 cap-power-off-card;
490
491 #address-cells = <1>;
492 #size-cells = <0>;
493 wlcore: wlcore@2 {
494 compatible = "ti,wl1281";
495 reg = <2>;
496 interrupt-parent = <&gpio1>;
497 interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* gpio 53 */
498 ref-clock-frequency = <26000000>;
499 tcxo-clock-frequency = <26000000>;
500 };
490}; 501};
491 502
492&emif1 { 503&emif1 {
diff --git a/arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi b/arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi
index cc66af419236..9bceeb7e1f03 100644
--- a/arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi
+++ b/arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi
@@ -65,4 +65,14 @@
65 bus-width = <4>; 65 bus-width = <4>;
66 cap-power-off-card; 66 cap-power-off-card;
67 status = "okay"; 67 status = "okay";
68
69 #address-cells = <1>;
70 #size-cells = <0>;
71 wlcore: wlcore@2 {
72 compatible = "ti,wl1271";
73 reg = <2>;
74 interrupt-parent = <&gpio2>;
75 interrupts = <9 IRQ_TYPE_LEVEL_HIGH>; /* gpio 41 */
76 ref-clock-frequency = <38400000>;
77 };
68}; 78};
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index cebdf8d0dc08..af11511dda50 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -14,7 +14,6 @@
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/of_platform.h> 15#include <linux/of_platform.h>
16#include <linux/ti_wilink_st.h> 16#include <linux/ti_wilink_st.h>
17#include <linux/wl12xx.h>
18 17
19#include <linux/platform_data/pinctrl-single.h> 18#include <linux/platform_data/pinctrl-single.h>
20#include <linux/platform_data/iommu-omap.h> 19#include <linux/platform_data/iommu-omap.h>
@@ -35,35 +34,6 @@ struct pdata_init {
35struct of_dev_auxdata omap_auxdata_lookup[]; 34struct of_dev_auxdata omap_auxdata_lookup[];
36static struct twl4030_gpio_platform_data twl_gpio_auxdata; 35static struct twl4030_gpio_platform_data twl_gpio_auxdata;
37 36
38#if IS_ENABLED(CONFIG_WL12XX)
39
40static struct wl12xx_platform_data wl12xx __initdata;
41
42static void __init __used legacy_init_wl12xx(u32 ref_clock_freq,
43 u32 tcxo_clock_freq,
44 int gpio)
45{
46 int res;
47
48 wl12xx.ref_clock_freq = ref_clock_freq;
49 wl12xx.tcxo_clock_freq = tcxo_clock_freq;
50 wl12xx.irq = gpio_to_irq(gpio);
51 wl12xx.irq_trigger = IRQ_TYPE_LEVEL_HIGH;
52
53 res = wl12xx_set_platform_data(&wl12xx);
54 if (res) {
55 pr_err("error setting wl12xx data: %d\n", res);
56 return;
57 }
58}
59#else
60static inline void legacy_init_wl12xx(u32 ref_clock_freq,
61 u32 tcxo_clock_freq,
62 int gpio)
63{
64}
65#endif
66
67#ifdef CONFIG_MACH_NOKIA_N8X0 37#ifdef CONFIG_MACH_NOKIA_N8X0
68static void __init omap2420_n8x0_legacy_init(void) 38static void __init omap2420_n8x0_legacy_init(void)
69{ 39{
@@ -130,7 +100,6 @@ static void __init omap3_sbc_t3730_twl_init(void)
130static void __init omap3_sbc_t3730_legacy_init(void) 100static void __init omap3_sbc_t3730_legacy_init(void)
131{ 101{
132 omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub"); 102 omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
133 legacy_init_wl12xx(38400000, 0, 136);
134} 103}
135 104
136static void __init omap3_sbc_t3530_legacy_init(void) 105static void __init omap3_sbc_t3530_legacy_init(void)
@@ -160,14 +129,12 @@ static struct platform_device btwilink_device = {
160 129
161static void __init omap3_igep0020_rev_f_legacy_init(void) 130static void __init omap3_igep0020_rev_f_legacy_init(void)
162{ 131{
163 legacy_init_wl12xx(0, 0, 177);
164 platform_device_register(&wl18xx_device); 132 platform_device_register(&wl18xx_device);
165 platform_device_register(&btwilink_device); 133 platform_device_register(&btwilink_device);
166} 134}
167 135
168static void __init omap3_igep0030_rev_g_legacy_init(void) 136static void __init omap3_igep0030_rev_g_legacy_init(void)
169{ 137{
170 legacy_init_wl12xx(0, 0, 136);
171 platform_device_register(&wl18xx_device); 138 platform_device_register(&wl18xx_device);
172 platform_device_register(&btwilink_device); 139 platform_device_register(&btwilink_device);
173} 140}
@@ -175,12 +142,6 @@ static void __init omap3_igep0030_rev_g_legacy_init(void)
175static void __init omap3_evm_legacy_init(void) 142static void __init omap3_evm_legacy_init(void)
176{ 143{
177 hsmmc2_internal_input_clk(); 144 hsmmc2_internal_input_clk();
178 legacy_init_wl12xx(38400000, 0, 149);
179}
180
181static void __init omap3_zoom_legacy_init(void)
182{
183 legacy_init_wl12xx(26000000, 0, 162);
184} 145}
185 146
186static void am35xx_enable_emac_int(void) 147static void am35xx_enable_emac_int(void)
@@ -247,7 +208,6 @@ static void __init omap3_sbc_t3517_legacy_init(void)
247 am35xx_emac_reset(); 208 am35xx_emac_reset();
248 hsmmc2_internal_input_clk(); 209 hsmmc2_internal_input_clk();
249 omap3_sbc_t3517_wifi_init(); 210 omap3_sbc_t3517_wifi_init();
250 legacy_init_wl12xx(38400000, 0, 145);
251} 211}
252 212
253static void __init am3517_evm_legacy_init(void) 213static void __init am3517_evm_legacy_init(void)
@@ -289,23 +249,6 @@ static void __init omap3_tao3530_legacy_init(void)
289} 249}
290#endif /* CONFIG_ARCH_OMAP3 */ 250#endif /* CONFIG_ARCH_OMAP3 */
291 251
292#ifdef CONFIG_ARCH_OMAP4
293static void __init omap4_sdp_legacy_init(void)
294{
295 legacy_init_wl12xx(26000000, 26000000, 53);
296}
297
298static void __init omap4_panda_legacy_init(void)
299{
300 legacy_init_wl12xx(38400000, 0, 53);
301}
302
303static void __init var_som_om44_legacy_init(void)
304{
305 legacy_init_wl12xx(38400000, 0, 41);
306}
307#endif
308
309#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) 252#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
310static struct iommu_platform_data omap4_iommu_pdata = { 253static struct iommu_platform_data omap4_iommu_pdata = {
311 .reset_name = "mmu_cache", 254 .reset_name = "mmu_cache",
@@ -314,13 +257,6 @@ static struct iommu_platform_data omap4_iommu_pdata = {
314}; 257};
315#endif 258#endif
316 259
317#ifdef CONFIG_SOC_AM33XX
318static void __init am335x_evmsk_legacy_init(void)
319{
320 legacy_init_wl12xx(38400000, 0, 31);
321}
322#endif
323
324#ifdef CONFIG_SOC_OMAP5 260#ifdef CONFIG_SOC_OMAP5
325static void __init omap5_uevm_legacy_init(void) 261static void __init omap5_uevm_legacy_init(void)
326{ 262{
@@ -421,19 +357,9 @@ static struct pdata_init pdata_quirks[] __initdata = {
421 { "isee,omap3-igep0020-rev-f", omap3_igep0020_rev_f_legacy_init, }, 357 { "isee,omap3-igep0020-rev-f", omap3_igep0020_rev_f_legacy_init, },
422 { "isee,omap3-igep0030-rev-g", omap3_igep0030_rev_g_legacy_init, }, 358 { "isee,omap3-igep0030-rev-g", omap3_igep0030_rev_g_legacy_init, },
423 { "ti,omap3-evm-37xx", omap3_evm_legacy_init, }, 359 { "ti,omap3-evm-37xx", omap3_evm_legacy_init, },
424 { "ti,omap3-zoom3", omap3_zoom_legacy_init, },
425 { "ti,am3517-evm", am3517_evm_legacy_init, }, 360 { "ti,am3517-evm", am3517_evm_legacy_init, },
426 { "technexion,omap3-tao3530", omap3_tao3530_legacy_init, }, 361 { "technexion,omap3-tao3530", omap3_tao3530_legacy_init, },
427#endif 362#endif
428#ifdef CONFIG_ARCH_OMAP4
429 { "ti,omap4-sdp", omap4_sdp_legacy_init, },
430 { "ti,omap4-panda", omap4_panda_legacy_init, },
431 { "variscite,var-dvk-om44", var_som_om44_legacy_init, },
432 { "variscite,var-stk-om44", var_som_om44_legacy_init, },
433#endif
434#ifdef CONFIG_SOC_AM33XX
435 { "ti,am335x-evmsk", am335x_evmsk_legacy_init, },
436#endif
437#ifdef CONFIG_SOC_OMAP5 363#ifdef CONFIG_SOC_OMAP5
438 { "ti,omap5-uevm", omap5_uevm_legacy_init, }, 364 { "ti,omap5-uevm", omap5_uevm_legacy_init, },
439#endif 365#endif