Hi Kobi,
Thanks for your response. I am fairly certain I have the GPIO configuration correct. My pin mux settings are as follows:
static struct pinmux_config wl12xx_jaguarshark_pin_mux[] = {
{"gpmc_ad12.gpio1_12", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // WLAN ENABLE
{"gpmc_ad13.gpio1_13", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, // WLAN IRQ
{"gpmc_ben1.gpio1_28", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // BT ENABLE
{NULL, 0},
};
There is a difference in that, for some reason, I do not set up the BT Enable line with a pull-up, but my design does not use bluetooth, so this should be irrelevant.
I have double checked by looking at the gpio status in the kernel/debug folder and the pins are all configured as per the above.
The code for initialising the wl12xx interface is as follows, and always succeeds, but I do not get the interrupt listed under /proc/interrupts. It's still unclear why it is not working. Is there some debug path you could point me towards? Where exactly is the part of the code in which the interrupt gets registered with the kernel (and where it might be failing...).
#define JAGUARSHARK_WLAN_PMENA_GPIO GPIO_TO_PIN(1, 12)
#define JAGUARSHARK_WLAN_IRQ_GPIO GPIO_TO_PIN(1, 13)
struct wl12xx_platform_data am335xevm_wlan_data = {
.irq = OMAP_GPIO_IRQ(JAGUARSHARK_WLAN_IRQ_GPIO),
.board_ref_clock = WL12XX_REFCLOCK_38_XTAL, /* 38.4Mhz */
.bt_enable_gpio = GPIO_TO_PIN(1, 28),
.wlan_enable_gpio = GPIO_TO_PIN(1, 12),
};
static void wl12xx_init(int evm_id, int profile)
{
struct device *dev;
struct omap_mmc_platform_data *pdata;
int ret;
setup_pin_mux(wl12xx_jaguarshark_pin_mux);
ret = gpio_request_one(am335xevm_wlan_data.wlan_enable_gpio, GPIOF_OUT_INIT_LOW, "wlan_en");
if (ret) {
pr_err("Error requesting wlan enable gpio: %d\n", ret);
goto out;
}
ret = gpio_request_one(JAGUARSHARK_WLAN_IRQ_GPIO, GPIOF_IN, "wl12xx_irq");
if (ret) {
pr_err("Error requesting wlan enable gpio: %d\n", ret);
goto out;
}
am335xevm_wlan_data.wlan_enable_gpio = GPIO_TO_PIN(1, 12);
am335xevm_wlan_data.bt_enable_gpio = GPIO_TO_PIN(1, 28);
am335xevm_wlan_data.irq = gpio_to_irq(JAGUARSHARK_WLAN_IRQ_GPIO);
am335xevm_wlan_data.platform_quirks = WL12XX_PLATFORM_QUIRK_EDGE_IRQ;
if (wl12xx_set_platform_data(&am335xevm_wlan_data))
pr_err("error setting wl12xx data\n");
dev = am335x_mmc[1].dev;
if (!dev) {
pr_err("wl12xx mmc device initialization failed\n");
goto out;
}
pdata = dev->platform_data;
if (!pdata) {
pr_err("Platform data of wl12xx device not set\n");
goto out;
}
pdata->slots[0].set_power = wl12xx_set_power;
pr_info("wl12xx Configuration Successful\n");
out:
return;
}
I have attached my board file here: (Please visit the site to view this file)
Any help would be much appreciated. At this stage we are looking at having to make a new board revision to make our design exactly match the 'know working' development kit design, requiring the addition of voltage translation chips etc - we are trying to run the sdio all within 1.8V, but all reference designs appear to use 3.3V, and then translate the voltages down to the wl12xx chip.
Any help would be greatly appreciated.
Regards,
Andrew.