Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 1583

RE: RZA1 RSK Adding Device Tree Node for MMC0

$
0
0

Hi Chris,

Here are the steps required to get the Wilink 8 WiFi/Bluetooth/BLE radio to work with the Renesas RZA1 Dev Kit:

//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.


Viewing all articles
Browse latest Browse all 1583

Trending Articles