AnsweredAssumed Answered

ATWILC3000 SDIO driver on i.MX6ul not being probed?

Question asked by Patrick Schneider on Aug 3, 2018
Latest reply on Aug 6, 2018 by Patrick Schneider

Hey guys,

I have a problem which is bugging me for the whole week now and I'm trying to sweeten my weekend with some productive comments here on the forum, so any help is appreciated!

In short I am trying (as many tried before) to get an ATWILC3000 WiFi/BLE module from Microchip/Atmel to work with my i.MX6ul board with Kernel version linux-imx 4.1.15 and Yocto as building environment.

I followed the Linux porting guide from Microchip to integrate the ATWILC3000 sdio driver into my kernel, which is probably working, because the kernel module "wilc_sdio.ko" is successfully created and deployed.

So now my problem is when I am about to modprobe it NOTHING happens, literally NOTHING at all. Lsmod shows the module loaded but apart from that no messages whatsoever.

As far as I am understanding kernel driver development this probably means that linux is not recognizing the kernel module as "needed" for anything in the device tree, thus not even the probe function in the driver is called and nothing happens.

So why is that?

Here some more informations on the topic.

1. Boot output for dmesg | grep mmc

[ 1.849718] sdhci-esdhc-imx 2194000.usdhc: No vmmc regulator found
[ 1.858126] sdhci-esdhc-imx 2194000.usdhc: No vqmmc regulator found
[ 1.913336] mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
I would also expect something similar to what is happening on mmc0 (which has a normal card connected)

[ 2.044423] mmc0: new high speed SDHC card at address e624

But no "card" is detected on mmc1, perhaps this is also the root problem; but what exactly can one see here? What exactly means that the controller is found, but not a card? Is my wiring ok then, because the controller is able to communicate? Or could it still be a hardware problem?


2. Loading the module

Thats all that happens, not much to work with:

root@evalboard:~# modprobe wilc_sdio
root@evalboard:~# lsmod
Module Size Used by
wilc_sdio 200566 0


3. Device tree

To be honest I am not sure if my devicetree changes are correct as I never used the usdhc interface for something different as a sdcard. Firstly do I need vmmc and vqmmc regulators and how would I configure them?

regulators {


   reg_wlan_en: regulator@7 {
      compatible = "regulator-fixed";
      reg = <7>;
      regulator-name = "wlan_en";
      regulator-min-microvolt = <3300000>;
      regulator-max-microvolt = <3300000>;

      /* this is the enable pin for the wifi module,

         I tried using it for vmmc and vqmmc or setting it

         as GPIO and doing it myself before loading the kernel driver */
      gpio = <&gpio5 9 GPIO_ACTIVE_HIGH>;
      startup-delay-us = <70000>; 
      status = "okay";


&usdhc2 {
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_usdhc2_wlan &pinctrl_wlan>;
   /*vmmc-supply = <&reg_wlan_en>;
   vqmmc-supply = <&reg_wlan_en>;*/
   bus-width = <4>;
   status = "okay";

   #address-cells = <1>;
   #size-cells = <0>;


   /* i copied the @2 from another wifi example, what exactly does it mean? */
      compatible = "atmel,wilc_sdio";
      gpio_reset = <&gpio4 25 GPIO_ACTIVE_HIGH>;
      gpio_chip_en = <&gpio5 9 GPIO_ACTIVE_HIGH>;
      gpio_irq = <&gpio1 21 GPIO_ACTIVE_LOW>;

      interrupt-parent = <&gpio1>;
      interrupts = <21 IRQ_TYPE_EDGE_RISING>;
      status = "okay";
   slot@2 {
      reg = <2>;
      bus-width = <4>;