This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WL1837 in AM335x

Other Parts Discussed in Thread: WL1837

Hi,

After reviewing AM335x platform integration guide, the wl1837 WiFi chip still cannot detect by am335x. Is there anything wrong in my configuration?

processors.wiki.ti.com/.../WL18xx_AMxxx_Platform_Integration_Guide

BSP: linux-3.2.0-psp04.06.00.11

#ifdef CONFIG_WL12XX_PLATFORM_DATA
        omap_mux_init_gpio(wl1837_WLAN_ENABLE_GPIO, OMAP_PIN_INPUT_PULLUP); /* power on WiFi */
        /* WL12xx WLAN Init */
        if (wl12xx_set_platform_data(&wl1837_wlan_data))
                pr_err("error setting wl18xx data\n");
        platform_device_register(&wl1837_wlan_regulator);
#endif

struct wl12xx_platform_data wl1837_wlan_data __initdata = {
        .irq = OMAP_GPIO_IRQ(wl1837_WLAN_IRQ_GPIO),
        .board_ref_clock = WL12XX_REFCLOCK_26, /* 26 MHz */
};

static struct platform_device wl1837_wlan_regulator = {
        .name           = "reg-fixed-voltage",
        .id             = 1,
        .dev = {
                .platform_data  = &wl1837_vwlan,
        },
};

static struct fixed_voltage_config wl1837_vwlan = {
        .supply_name            = "vwl1837",
        .microvolts             = 1800000, /* 1.80V */
        .gpio                   = wl1837_WLAN_ENABLE_GPIO,
        .startup_delay          = 70000, /* 70ms */
        .enable_high            = 1,
        .enabled_at_boot        = 0,
        .init_data              = &wl1837_vmmc2,
};

static struct regulator_init_data wl1837_vmmc2 = {
        .constraints = {
                .valid_ops_mask = REGULATOR_CHANGE_STATUS,
        },
        .num_consumer_supplies  = ARRAY_SIZE(wl1837_vmmc2_supply),
        .consumer_supplies      = &wl1837_vmmc2_supply,
};

static struct regulator_consumer_supply wl1837_vmmc2_supply[] = {
        REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
};

--PIN MUX--

static struct pinmux_config mmc1_wifi_pin_mux[] = {
        {"gpmc_ad0", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, /* MMC1_DAT0 */
        {"gpmc_ad1", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, /* MMC1_DAT1 */
        {"gpmc_ad2", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, /* MMC1_DAT2 */
        {"gpmc_ad3", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, /* MMC1_DAT3 */
        {"gpmc_csn1", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP}, /* MMC1_CLK */
        {"gpmc_csn2", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP}, /* MMC1_CMD */
        {"gpmc_wait0.gpio0_30", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, /* WLAN_EN */
        {"xdma_event_intr0.gpio0_19", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, /* WLAN_IRQ */
        {NULL, 0},
};
-- mmc init --

static struct omap2_hsmmc_info am335x_mmc[] __initdata = {

...

#ifdef CONFIG_WL12XX_PLATFORM_DATA
        {
                .name           = "wl1837",
                .mmc            = 2,
                .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
                .nonremovable   = true,
                .gpio_cd        =-EINVAL,
                .gpio_wp        = -EINVAL,
                .ocr_mask       = MMC_VDD_32_33 | MMC_VDD_33_34, /* 3V3 */
        },
#endif

...