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.

wl1271_sdio: probe of mmc2:0001:1 failed with error -16

Other Parts Discussed in Thread: WL1835, AM3352, WL1271

I'm trying to wake up a BB Green Wireless clone with an AM3352 and a WL1835. I'm using an "iot" image with "Linux beaglebone 4.4.15-ti-r37 #1 SMP Tue Jul 19 17:04:02 UTC 2016 armv7l GNU/Linux" and debian version 8.5. The image works on the BBGW board, but I'm having problems fully enabling the Wifi part of the WL1835 on my board. Bluetooth works, but WiFi doesn't fully boot. Here is what is in dmesg for mmc2:

[    2.220093] mmc2: queuing unknown CIS tuple 0x91 (3 bytes)
[    2.220942] mmc2: new high speed SDIO card at address 0001
[    3.757932] EXT4-fs (mmcblk1p1): mounted filesystem with ordered data mode. Opts: (null)
[    4.624267] EXT4-fs (mmcblk1p1): re-mounted. Opts: errors=remount-ro
[    9.390359] wl1271_sdio: probe of mmc2:0001:1 failed with error -16
[    9.390423] wl1271_sdio: probe of mmc2:0001:2 failed with error -16

It looks like it doesn't recognize the mcc correctly:

root@beaglebone:/sys/kernel/debug/mmc2# cat ios
clock:          400000 Hz
vdd:            7 (1.65 - 1.95 V)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     2 (on)
bus width:      0 (1 bits)
timing spec:    0 (legacy)
signal voltage: 0 (1.80 V)
driver type:    0 (driver type B)

Any recommendations on how to debug this or what could be wrong? Thanks.

  • hi , please refer to e2e.ti.com/.../541669 . check if 4.4.9-ti-r25 makes any difference or check out diffs b/w kernel versions .

    Saurabh
  • There are similar issues seen also with the Seeed BBGW board itself.
    In case you have cloned it you may see similar issues. First issue is the the BT_EN and WLAN_EN pins have not used a level shifter. They should be fed to wl18xx as 1.8V. Currently they are at 3.3V which is wrong.
    Not sure this is directly related to the sdio errors you see but it definitely needs fixing.

    Please check section 4.2 of the following app note on a correct method for achieving this:
    www.ti.com/.../swra448a.pdf

    In addition, can you probe the voltage levels on the sdio bus lines, after the level shifter and make sure they are all 1.8V?

    Best Regards,
    Eyal
  • Hi Eyal, yes, I did discover that the BT_EN and WLAN_EN pins were feeding a higher voltage into the wl18xx, resulting in a VIO of around 2.2V. The wl18xx has a max rating for VIO of 2.1V. I did check the BBGW and it is running the wl18xx at over 2.1V as well. I did adjust the voltage divider and now the wl18xx is running at 1.8V. That did not help with the problem I'm experiencing.

    I checked the boot sequence with the help of a logic analyzer. It seems that the wl18xx does boot and it does respond to communication on the CMD line at 400 kHz. I think the whole thing falls apart when the mmc driver switches to 50 MHz.


    Thanks

    --Beat

  • Hi Beat,

    I did try lowering the sfio frequency on the bbgw using max-frequency in the mmc node in the .dts file to as low as 5Mhz and it did not help. Same as for you it probed ok and then crashed. I believe next step is probing the sdio bus and verify signal integrity.

    Br,

    Eyal

  • I believe we have found the root cause for the BBGW wifi related issues.
    Bottom line is that BT_AUD_OUT from wl1835 has to be pulled low when WL_EN is activated.
    in case it isn't, wilink8 ends up in one of the test modes that introduces various issues (elp wakeup timeouts etc.)
    On the BBGW this pin is routed through the level shifter (U21) that introduces a pullup on the line and wilink8 ends up in a bad state.
    To work around this, I have used a gpio hog to force this pin low.
    An alternative may be adding an external pulldown on U21 pin 4 but this would require an ECO.

    Please see section 10.4 in the following document:
    www.ti.com/.../swru437.pdf

    You can see that AUD_OUT_BT has to be 0 when BT or WLAN enable bit is set to high.

    In addition, please make sure to use startup-delay-us=<70000> as below:

    	wlan_en_reg: fixedregulator@2 {
    		compatible = "regulator-fixed";
    		regulator-name = "wlan-en-regulator";
    		regulator-min-microvolt = <1800000>;
    		regulator-max-microvolt = <1800000>;
    		startup-delay-us= <70000>;
    
    		/* WL_EN */
    		gpio = <&gpio3 9 0>;
    		enable-active-high;
    	};
    
    BR,
    Eyal