Hi Chris,
Here are the steps required to get the Wilink 8 WiFi/Bluetooth/BLE radio to work with the Renesas RZA1 Dev Kit:
- Purchase the radio and the SD card adapter kit:
- Use the TI build-utilities to backport the R8.7 release for the Wilink8 drivers:
- git clone git://git.ti.com/wilink8-wlan/build-utilites.git
- use latest release 8.7
- Modify drivers to support Renesas RZA1:
- In the "wl1271_probe" function of the wlcore/sdio.c file, comment out the "wlcore_probe_of" function call and hard code the IRQ used:
//ret = wlcore_probe_of(&func->dev, &irq, &pdev_data);
//if (ret)
// goto out_free_glue;
/// CUSTOM
irq = 38;
- In the wlcore/sdio.c file, modify the "wl12xx_sdio_set_power" function to use the gpio the toggle power:
/// CUSTOMIZATION
static int wl12xx_sdio_set_power(struct device *child, bool enable)
{
struct wl12xx_sdio_glue *glue = dev_get_drvdata(child->parent);
printk("WL18XX: wl12xx_sdio_set_power() Called\n");
if (enable) {
printk(KERN_ERR "##########################################\n");
printk(KERN_ERR "WL18XX: wl18xx: Setting Power ON\n");
printk(KERN_ERR "##########################################\n");
gpio_request(98, "sysfs"); // Request the GPIO
gpio_direction_output(98, true); // Set the gpio to be in output mode and on
gpio_export(98, false); // Causes gpio49 to appear in /sys/class/gpio
// the bool argument prevents the direction from being changed
mdelay(70);
printk("WL18XX: wl12xx_sdio_set_power() Power On\n");
return wl12xx_sdio_power_on(glue);
}
else {
printk(KERN_ERR "##########################################\n");
printk(KERN_ERR "WL18XX: wl18xx: Setting Power OFF\n");
printk(KERN_ERR "##########################################\n");
gpio_request(98, "sysfs"); // Request the GPIO
gpio_direction_output(98, false); // Set the gpio to be in output mode and on
gpio_export(98, false); // Causes gpio49 to appear in /sys/class/gpio
// the bool argument prevents the direction from being changed
printk("WL18XX: wl12xx_sdio_set_power() Power Off\n");
return wl12xx_sdio_power_off(glue);
}
}
- In the wlcore/main.c file, in the "wlcore_irq" function, add the following to the beginning of the function:
void __iomem *irc1 = IOMEM(0xfcfef804);
u16 value;
value = __raw_readw(irc1);
value = 0x0000;
__raw_writew(value, irc1);
- Modify the Linux board file "board-rskrza1.c" to make the chosen gpio behave like a proper interrupt:
- r7s72100_pfc_pin_assign(P4_14, ALT8, DIIO_PBDC_DIS); /* IRQ6 */
That's it! Hopefully this helps someone.