Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Eliad Peller and committed by
Tony Lindgren
99f84cae 5ea5c518

+100 -74
+11
arch/arm/boot/dts/am335x-evmsk.dts
··· 15 15 16 16 #include "am33xx.dtsi" 17 17 #include <dt-bindings/pwm/pwm.h> 18 + #include <dt-bindings/interrupt-controller/irq.h> 18 19 19 20 / { 20 21 model = "TI AM335x EVM-SK"; ··· 648 647 cap-power-off-card; 649 648 pinctrl-names = "default"; 650 649 pinctrl-0 = <&mmc2_pins>; 650 + 651 + #address-cells = <1>; 652 + #size-cells = <0>; 653 + wlcore: wlcore@2 { 654 + compatible = "ti,wl1271"; 655 + reg = <2>; 656 + interrupt-parent = <&gpio1>; 657 + interrupts = <31 IRQ_TYPE_LEVEL_HIGH>; /* gpio 31 */ 658 + ref-clock-frequency = <38400000>; 659 + }; 651 660 }; 652 661 653 662 &mcasp1 {
+10
arch/arm/boot/dts/omap3-cm-t3517.dts
··· 133 133 non-removable; 134 134 bus-width = <4>; 135 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 148 &dss {
+10
arch/arm/boot/dts/omap3-cm-t3730.dts
··· 73 73 non-removable; 74 74 bus-width = <4>; 75 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 88 &dss {
+10
arch/arm/boot/dts/omap3-evm-common.dtsi
··· 106 106 non-removable; 107 107 bus-width = <4>; 108 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 121 &twl_gpio {
+9
arch/arm/boot/dts/omap3-igep0020-rev-f.dts
··· 42 42 vmmc-supply = <&lbep5clwmc_wlen>; 43 43 bus-width = <4>; 44 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 };
+9
arch/arm/boot/dts/omap3-igep0030-rev-g.dts
··· 64 64 vmmc-supply = <&lbep5clwmc_wlen>; 65 65 bus-width = <4>; 66 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 };
+10
arch/arm/boot/dts/omap3-zoom3.dts
··· 195 195 cap-power-off-card; 196 196 pinctrl-names = "default"; 197 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 210 &uart1 {
+10
arch/arm/boot/dts/omap4-panda-common.dtsi
··· 450 450 non-removable; 451 451 bus-width = <4>; 452 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 465 &emif1 {
+11
arch/arm/boot/dts/omap4-sdp.dts
··· 487 487 non-removable; 488 488 bus-width = <4>; 489 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 503 &emif1 {
+10
arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi
··· 65 65 bus-width = <4>; 66 66 cap-power-off-card; 67 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 };
-74
arch/arm/mach-omap2/pdata-quirks.c
··· 14 14 #include <linux/kernel.h> 15 15 #include <linux/of_platform.h> 16 16 #include <linux/ti_wilink_st.h> 17 - #include <linux/wl12xx.h> 18 17 19 18 #include <linux/platform_data/pinctrl-single.h> 20 19 #include <linux/platform_data/iommu-omap.h> ··· 33 34 34 35 struct of_dev_auxdata omap_auxdata_lookup[]; 35 36 static struct twl4030_gpio_platform_data twl_gpio_auxdata; 36 - 37 - #if IS_ENABLED(CONFIG_WL12XX) 38 - 39 - static struct wl12xx_platform_data wl12xx __initdata; 40 - 41 - static void __init __used legacy_init_wl12xx(u32 ref_clock_freq, 42 - u32 tcxo_clock_freq, 43 - int gpio) 44 - { 45 - int res; 46 - 47 - wl12xx.ref_clock_freq = ref_clock_freq; 48 - wl12xx.tcxo_clock_freq = tcxo_clock_freq; 49 - wl12xx.irq = gpio_to_irq(gpio); 50 - wl12xx.irq_trigger = IRQ_TYPE_LEVEL_HIGH; 51 - 52 - res = wl12xx_set_platform_data(&wl12xx); 53 - if (res) { 54 - pr_err("error setting wl12xx data: %d\n", res); 55 - return; 56 - } 57 - } 58 - #else 59 - static inline void legacy_init_wl12xx(u32 ref_clock_freq, 60 - u32 tcxo_clock_freq, 61 - int gpio) 62 - { 63 - } 64 - #endif 65 37 66 38 #ifdef CONFIG_MACH_NOKIA_N8X0 67 39 static void __init omap2420_n8x0_legacy_init(void) ··· 100 130 static void __init omap3_sbc_t3730_legacy_init(void) 101 131 { 102 132 omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub"); 103 - legacy_init_wl12xx(38400000, 0, 136); 104 133 } 105 134 106 135 static void __init omap3_sbc_t3530_legacy_init(void) ··· 129 160 130 161 static void __init omap3_igep0020_rev_f_legacy_init(void) 131 162 { 132 - legacy_init_wl12xx(0, 0, 177); 133 163 platform_device_register(&wl18xx_device); 134 164 platform_device_register(&btwilink_device); 135 165 } 136 166 137 167 static void __init omap3_igep0030_rev_g_legacy_init(void) 138 168 { 139 - legacy_init_wl12xx(0, 0, 136); 140 169 platform_device_register(&wl18xx_device); 141 170 platform_device_register(&btwilink_device); 142 171 } ··· 142 175 static void __init omap3_evm_legacy_init(void) 143 176 { 144 177 hsmmc2_internal_input_clk(); 145 - legacy_init_wl12xx(38400000, 0, 149); 146 - } 147 - 148 - static void __init omap3_zoom_legacy_init(void) 149 - { 150 - legacy_init_wl12xx(26000000, 0, 162); 151 178 } 152 179 153 180 static void am35xx_enable_emac_int(void) ··· 208 247 am35xx_emac_reset(); 209 248 hsmmc2_internal_input_clk(); 210 249 omap3_sbc_t3517_wifi_init(); 211 - legacy_init_wl12xx(38400000, 0, 145); 212 250 } 213 251 214 252 static void __init am3517_evm_legacy_init(void) ··· 249 289 } 250 290 #endif /* CONFIG_ARCH_OMAP3 */ 251 291 252 - #ifdef CONFIG_ARCH_OMAP4 253 - static void __init omap4_sdp_legacy_init(void) 254 - { 255 - legacy_init_wl12xx(26000000, 26000000, 53); 256 - } 257 - 258 - static void __init omap4_panda_legacy_init(void) 259 - { 260 - legacy_init_wl12xx(38400000, 0, 53); 261 - } 262 - 263 - static void __init var_som_om44_legacy_init(void) 264 - { 265 - legacy_init_wl12xx(38400000, 0, 41); 266 - } 267 - #endif 268 - 269 292 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) 270 293 static struct iommu_platform_data omap4_iommu_pdata = { 271 294 .reset_name = "mmu_cache", 272 295 .assert_reset = omap_device_assert_hardreset, 273 296 .deassert_reset = omap_device_deassert_hardreset, 274 297 }; 275 - #endif 276 - 277 - #ifdef CONFIG_SOC_AM33XX 278 - static void __init am335x_evmsk_legacy_init(void) 279 - { 280 - legacy_init_wl12xx(38400000, 0, 31); 281 - } 282 298 #endif 283 299 284 300 #ifdef CONFIG_SOC_OMAP5 ··· 357 421 { "isee,omap3-igep0020-rev-f", omap3_igep0020_rev_f_legacy_init, }, 358 422 { "isee,omap3-igep0030-rev-g", omap3_igep0030_rev_g_legacy_init, }, 359 423 { "ti,omap3-evm-37xx", omap3_evm_legacy_init, }, 360 - { "ti,omap3-zoom3", omap3_zoom_legacy_init, }, 361 424 { "ti,am3517-evm", am3517_evm_legacy_init, }, 362 425 { "technexion,omap3-tao3530", omap3_tao3530_legacy_init, }, 363 - #endif 364 - #ifdef CONFIG_ARCH_OMAP4 365 - { "ti,omap4-sdp", omap4_sdp_legacy_init, }, 366 - { "ti,omap4-panda", omap4_panda_legacy_init, }, 367 - { "variscite,var-dvk-om44", var_som_om44_legacy_init, }, 368 - { "variscite,var-stk-om44", var_som_om44_legacy_init, }, 369 - #endif 370 - #ifdef CONFIG_SOC_AM33XX 371 - { "ti,am335x-evmsk", am335x_evmsk_legacy_init, }, 372 426 #endif 373 427 #ifdef CONFIG_SOC_OMAP5 374 428 { "ti,omap5-uevm", omap5_uevm_legacy_init, },