ARCH/ARM/MACH-OMAP2/DEVICE.C ############ Platform Data Setup ################ #if IS_ENABLED(CONFIG_BRCMFMAC) #define BRCM_WL_HOST_WAKE_GPIO GPIO_TO_PIN(3, 18) static void brcmfmac_power_on(void) { } static void brcmfmac_power_off(void) { } static void brcmfmac_reset(void) { } static struct brcmfmac_sdio_platform_data brcmfmac_sdio_pdata = { .power_on = brcmfmac_power_on, .power_off = brcmfmac_power_off, .reset = brcmfmac_reset }; static struct platform_device brcmfmac_device = { .name = BRCMFMAC_SDIO_PDATA_NAME, .id = PLATFORM_DEVID_NONE, .dev.platform_data = &brcmfmac_sdio_pdata }; void __init wlan_init_brcm_of(void) { if (!of_have_populated_dt()) return; printk("BroadCom WLAN Platform Registration\n"); brcmfmac_sdio_pdata.oob_irq_supported = true; brcmfmac_sdio_pdata.oob_irq_nr = gpio_to_irq(BRCM_WL_HOST_WAKE_GPIO); brcmfmac_sdio_pdata.oob_irq_flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL; platform_device_register(&brcmfmac_device); } #else static inline void wlan_init_brcm_of(void) { } #endif static int __init omap2_init_devices(void) { /* Enable dummy states for those platforms without pinctrl support */ if (!of_have_populated_dt()) pinctrl_provide_dummies(); /* * please keep these calls, and their implementations above, * in alphabetical order so they're easier to sort through. */ omap_init_audio(); omap_init_camera(); omap_init_hdmi_audio(); /* If dtb is there, the devices will be created dynamically */ if (!of_have_populated_dt()) { omap_init_mbox(); omap_init_mcspi(); omap_init_sham(); omap_init_aes(); omap_init_rng(); } else { /* These can be removed when bindings are done */ omap_init_wl12xx_of(); wlan_init_brcm_of(); } omap_init_sti(); return 0; } ########### DTS SETUP ###################################### vmmcsd_fixed: fixedregulator@0 { compatible = "regulator-fixed"; regulator-name = "vmmcsd_fixed"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; am33xx_pinmux: pinmux@44e10800 { pinctrl-names = "default"; pinctrl-0 = <&clkout2_pin &mmc2_pins &mmc2_brcmf_pins>; mmc2_pins: pinmux_mmc2_pins { pinctrl-single,pins = < 0x88 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2-cmd */ 0x8C (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2-clk */ 0x118 (PIN_INPUT_PULLUP | MUX_MODE5) /* mmc2-dat0 */ 0x11C (PIN_INPUT_PULLUP | MUX_MODE5) /* mmc2-dat1 */ 0x120 (PIN_INPUT_PULLUP | MUX_MODE5) /* mmc2-dat2 */ 0x108 (PIN_INPUT_PULLUP | MUX_MODE5) /* mmc2-dat3 */ >; }; mmc2_brcmf_pins: pinmux_mmc2_brcmf_pins { pinctrl-single,pins = < 0x19C (PIN_OUTPUT | MUX_MODE7) /* brcmf-power */ 0x1A0 (PIN_INPUT | MUX_MODE7) /* oob-irq */ >; }; }; ocp { wlan_reg: voltage-regulator { compatible = "regulator-fixed"; regulator-name = "WL_REG_ON"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; gpio = <&gpio3 17 0>; enable-active-high; }; wlan { compatible = "brcm,bcm4334"; wlan-supply = <&wlan_reg>; clocks = <&clk_32768_ck>; clock-names = "32khz"; }; }; &mmc3 { dmas = <&edma 12 &edma 13>; dma-names = "tx", "rx"; status = "okay"; vmmc-supply = <&vmmcsd_fixed>; bus-width = <4>; ti,non-removable; ti,needs-special-hs-handling; cap-power-off-card; keep-power-in-suspend; }; &edma { ti,edma-xbar-event-map = <1 12 2 13>; };