ARM: dts: add wl12xx/wl18xx bindings
authorEliad Peller <eliad@wizery.com>
Wed, 18 Mar 2015 16:38:29 +0000 (18:38 +0200)
committerTony Lindgren <tony@atomide.com>
Tue, 24 Mar 2015 16:48:14 +0000 (09:48 -0700)
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>
arch/arm/boot/dts/am335x-evmsk.dts
arch/arm/boot/dts/omap3-cm-t3517.dts
arch/arm/boot/dts/omap3-cm-t3730.dts
arch/arm/boot/dts/omap3-evm-common.dtsi
arch/arm/boot/dts/omap3-igep0020-rev-f.dts
arch/arm/boot/dts/omap3-igep0030-rev-g.dts
arch/arm/boot/dts/omap3-zoom3.dts
arch/arm/boot/dts/omap4-panda-common.dtsi
arch/arm/boot/dts/omap4-sdp.dts
arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi
arch/arm/mach-omap2/pdata-quirks.c

index df5fee6b6b4bcf7ac58d33fc1d25b58cb07890a8..87fc7a35e80261cad03261fd9cf8b047606fc286 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "am33xx.dtsi"
 #include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 
 / {
        model = "TI AM335x EVM-SK";
        cap-power-off-card;
        pinctrl-names = "default";
        pinctrl-0 = <&mmc2_pins>;
+
+       #address-cells = <1>;
+       #size-cells = <0>;
+       wlcore: wlcore@2 {
+               compatible = "ti,wl1271";
+               reg = <2>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <31 IRQ_TYPE_LEVEL_HIGH>; /* gpio 31 */
+               ref-clock-frequency = <38400000>;
+       };
 };
 
 &mcasp1 {
index 0ab748cf7749f18d90ad225a5d0aabac564fc53f..f5b5a1d96cd740920ab215f2a7b3fc2fdaa9136e 100644 (file)
        non-removable;
        bus-width = <4>;
        cap-power-off-card;
+
+       #address-cells = <1>;
+       #size-cells = <0>;
+       wlcore: wlcore@2 {
+               compatible = "ti,wl1271";
+               reg = <2>;
+               interrupt-parent = <&gpio5>;
+               interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; /* gpio 145 */
+               ref-clock-frequency = <38400000>;
+       };
 };
 
 &dss {
index 46eadb21b5ef5e97882e581f6e29f33bda2cd209..2294f5b0aa102d9195aa93b33a9e298ac91cba26 100644 (file)
        non-removable;
        bus-width = <4>;
        cap-power-off-card;
+
+       #address-cells = <1>;
+       #size-cells = <0>;
+       wlcore: wlcore@2 {
+               compatible = "ti,wl1271";
+               reg = <2>;
+               interrupt-parent = <&gpio5>;
+               interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; /* gpio 136 */
+               ref-clock-frequency = <38400000>;
+       };
 };
 
 &dss {
index 127f3e7c10c4fcade6d95a201ffeccf4b66d9297..346552b94d9f7705a80642dc8ce86ea6bad800d6 100644 (file)
        non-removable;
        bus-width = <4>;
        cap-power-off-card;
+
+       #address-cells = <1>;
+       #size-cells = <0>;
+       wlcore: wlcore@2 {
+               compatible = "ti,wl1271";
+               reg = <2>;
+               interrupt-parent = <&gpio5>;
+               interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* gpio 149 */
+               ref-clock-frequency = <38400000>;
+       };
 };
 
 &twl_gpio {
index cc8bd0cd8cf83d47deaa18ea29cbe3a08675e19b..72f7cdc091fba03ca51b223ec4f49cc810be88f4 100644 (file)
        vmmc-supply = <&lbep5clwmc_wlen>;
        bus-width = <4>;
        non-removable;
+
+       #address-cells = <1>;
+       #size-cells = <0>;
+       wlcore: wlcore@2 {
+               compatible = "ti,wl1835";
+               reg = <2>;
+               interrupt-parent = <&gpio6>;
+               interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; /* gpio 177 */
+       };
 };
index 9326b282c94ab92aadc681cf362cddf8a575e98f..b899e341874a3dc84e9e898748fea314be0b84e4 100644 (file)
        vmmc-supply = <&lbep5clwmc_wlen>;
        bus-width = <4>;
        non-removable;
+
+       #address-cells = <1>;
+       #size-cells = <0>;
+       wlcore: wlcore@2 {
+               compatible = "ti,wl1835";
+               reg = <2>;
+               interrupt-parent = <&gpio5>;
+               interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; /* gpio 136 */
+       };
 };
index 6644f516a42bd9de5f5fb52a707051ad502e18a8..131448d86e67bdd4bff337529d01a35e232c6326 100644 (file)
        cap-power-off-card;
        pinctrl-names = "default";
        pinctrl-0 = <&mmc3_pins &mmc3_2_pins>;
+
+       #address-cells = <1>;
+       #size-cells = <0>;
+       wlcore: wlcore@2 {
+               compatible = "ti,wl1271";
+               reg = <2>;
+               interrupt-parent = <&gpio6>;
+               interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; /* gpio 162 */
+               ref-clock-frequency = <26000000>;
+       };
 };
 
 &uart1 {
index 150513506c19f9764f63cd5828b79d4b7b1417f5..1228de5a05edd04ebc7a7747fcb93c31bae6296b 100644 (file)
        non-removable;
        bus-width = <4>;
        cap-power-off-card;
+
+       #address-cells = <1>;
+       #size-cells = <0>;
+       wlcore: wlcore@2 {
+               compatible = "ti,wl1271";
+               reg = <2>;
+               interrupt-parent = <&gpio2>;
+               interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* gpio 53 */
+               ref-clock-frequency = <38400000>;
+       };
 };
 
 &emif1 {
index 3e1da43068f68e67f7578d5eda64c12ea33501ca..8c36f51f5780011de30ad5cbd6ff1d416e761b0f 100644 (file)
        non-removable;
        bus-width = <4>;
        cap-power-off-card;
+
+       #address-cells = <1>;
+       #size-cells = <0>;
+       wlcore: wlcore@2 {
+               compatible = "ti,wl1281";
+               reg = <2>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* gpio 53 */
+               ref-clock-frequency = <26000000>;
+               tcxo-clock-frequency = <26000000>;
+       };
 };
 
 &emif1 {
index cc66af4192366fda0a1110a1770b3722b7579b2f..9bceeb7e1f0315d91d7aa8fe77bed9fdf5652064 100644 (file)
        bus-width = <4>;
        cap-power-off-card;
        status = "okay";
+
+       #address-cells = <1>;
+       #size-cells = <0>;
+       wlcore: wlcore@2 {
+               compatible = "ti,wl1271";
+               reg = <2>;
+               interrupt-parent = <&gpio2>;
+               interrupts = <9 IRQ_TYPE_LEVEL_HIGH>; /* gpio 41 */
+               ref-clock-frequency = <38400000>;
+       };
 };
index cebdf8d0dc08ef9309a3370c7895d3753f4018bc..af11511dda50bd239dbba1aa6710d15c022e2e77 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/kernel.h>
 #include <linux/of_platform.h>
 #include <linux/ti_wilink_st.h>
-#include <linux/wl12xx.h>
 
 #include <linux/platform_data/pinctrl-single.h>
 #include <linux/platform_data/iommu-omap.h>
@@ -35,35 +34,6 @@ struct pdata_init {
 struct of_dev_auxdata omap_auxdata_lookup[];
 static struct twl4030_gpio_platform_data twl_gpio_auxdata;
 
-#if IS_ENABLED(CONFIG_WL12XX)
-
-static struct wl12xx_platform_data wl12xx __initdata;
-
-static void __init __used legacy_init_wl12xx(u32 ref_clock_freq,
-                                            u32 tcxo_clock_freq,
-                                            int gpio)
-{
-       int res;
-
-       wl12xx.ref_clock_freq = ref_clock_freq;
-       wl12xx.tcxo_clock_freq = tcxo_clock_freq;
-       wl12xx.irq = gpio_to_irq(gpio);
-       wl12xx.irq_trigger = IRQ_TYPE_LEVEL_HIGH;
-
-       res = wl12xx_set_platform_data(&wl12xx);
-       if (res) {
-               pr_err("error setting wl12xx data: %d\n", res);
-               return;
-       }
-}
-#else
-static inline void legacy_init_wl12xx(u32 ref_clock_freq,
-                                     u32 tcxo_clock_freq,
-                                     int gpio)
-{
-}
-#endif
-
 #ifdef CONFIG_MACH_NOKIA_N8X0
 static void __init omap2420_n8x0_legacy_init(void)
 {
@@ -130,7 +100,6 @@ static void __init omap3_sbc_t3730_twl_init(void)
 static void __init omap3_sbc_t3730_legacy_init(void)
 {
        omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
-       legacy_init_wl12xx(38400000, 0, 136);
 }
 
 static void __init omap3_sbc_t3530_legacy_init(void)
@@ -160,14 +129,12 @@ static struct platform_device btwilink_device = {
 
 static void __init omap3_igep0020_rev_f_legacy_init(void)
 {
-       legacy_init_wl12xx(0, 0, 177);
        platform_device_register(&wl18xx_device);
        platform_device_register(&btwilink_device);
 }
 
 static void __init omap3_igep0030_rev_g_legacy_init(void)
 {
-       legacy_init_wl12xx(0, 0, 136);
        platform_device_register(&wl18xx_device);
        platform_device_register(&btwilink_device);
 }
@@ -175,12 +142,6 @@ static void __init omap3_igep0030_rev_g_legacy_init(void)
 static void __init omap3_evm_legacy_init(void)
 {
        hsmmc2_internal_input_clk();
-       legacy_init_wl12xx(38400000, 0, 149);
-}
-
-static void __init omap3_zoom_legacy_init(void)
-{
-       legacy_init_wl12xx(26000000, 0, 162);
 }
 
 static void am35xx_enable_emac_int(void)
@@ -247,7 +208,6 @@ static void __init omap3_sbc_t3517_legacy_init(void)
        am35xx_emac_reset();
        hsmmc2_internal_input_clk();
        omap3_sbc_t3517_wifi_init();
-       legacy_init_wl12xx(38400000, 0, 145);
 }
 
 static void __init am3517_evm_legacy_init(void)
@@ -289,23 +249,6 @@ static void __init omap3_tao3530_legacy_init(void)
 }
 #endif /* CONFIG_ARCH_OMAP3 */
 
-#ifdef CONFIG_ARCH_OMAP4
-static void __init omap4_sdp_legacy_init(void)
-{
-       legacy_init_wl12xx(26000000, 26000000, 53);
-}
-
-static void __init omap4_panda_legacy_init(void)
-{
-       legacy_init_wl12xx(38400000, 0, 53);
-}
-
-static void __init var_som_om44_legacy_init(void)
-{
-       legacy_init_wl12xx(38400000, 0, 41);
-}
-#endif
-
 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
 static struct iommu_platform_data omap4_iommu_pdata = {
        .reset_name = "mmu_cache",
@@ -314,13 +257,6 @@ static struct iommu_platform_data omap4_iommu_pdata = {
 };
 #endif
 
-#ifdef CONFIG_SOC_AM33XX
-static void __init am335x_evmsk_legacy_init(void)
-{
-       legacy_init_wl12xx(38400000, 0, 31);
-}
-#endif
-
 #ifdef CONFIG_SOC_OMAP5
 static void __init omap5_uevm_legacy_init(void)
 {
@@ -421,19 +357,9 @@ static struct pdata_init pdata_quirks[] __initdata = {
        { "isee,omap3-igep0020-rev-f", omap3_igep0020_rev_f_legacy_init, },
        { "isee,omap3-igep0030-rev-g", omap3_igep0030_rev_g_legacy_init, },
        { "ti,omap3-evm-37xx", omap3_evm_legacy_init, },
-       { "ti,omap3-zoom3", omap3_zoom_legacy_init, },
        { "ti,am3517-evm", am3517_evm_legacy_init, },
        { "technexion,omap3-tao3530", omap3_tao3530_legacy_init, },
 #endif
-#ifdef CONFIG_ARCH_OMAP4
-       { "ti,omap4-sdp", omap4_sdp_legacy_init, },
-       { "ti,omap4-panda", omap4_panda_legacy_init, },
-       { "variscite,var-dvk-om44", var_som_om44_legacy_init, },
-       { "variscite,var-stk-om44", var_som_om44_legacy_init, },
-#endif
-#ifdef CONFIG_SOC_AM33XX
-       { "ti,am335x-evmsk", am335x_evmsk_legacy_init, },
-#endif
 #ifdef CONFIG_SOC_OMAP5
        { "ti,omap5-uevm", omap5_uevm_legacy_init, },
 #endif