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.

wlan bring up on a custom i.mx6ul based board equipped with TI WL1807MODGIMOCR

Hi everyone,

we are trying to bring up the wlan on a custom i.mx6ul based board equipped with TI Wilink module WL1807MODGIMOCR.

we are using the SDK version 8.6_SP1 for wl18xx driver and firmware.

currently the state is that we are able to bring the wlan up when we boot the board using the usb ethernet dongle but when the board is booted with either usb mass storage or micro sd card the it fails we received the message "ERROR firmware boot failed despite 3 retries"

Following are the device tree nodes.

/ {
        regulators {
                compatible = "simple-bus";
                #address-cells = <1>;
                #size-cells = <0>;

                wlan_en: fixedregulator@100 {
                        compatible = "regulator-fixed";
                        regulator-name = "wlan_en";
                        regulator-min-microvolt = <3300000>;
                        regulator-max-microvolt = <3300000>;
                        gpio = <&gpio1 8 GPIO_ACTIVE_LOW>;
                        startup-delay-us = <70000>;
                };
        };
};
&iomuxc {
        lccd-wl-ti {
                pinctrl_usdhc2: usdhc2grp {
                        fsl,pins = <
                                MX6UL_PAD_CSI_VSYNC__USDHC2_CLK         0x17059         /* wifi_clk */
                                MX6UL_PAD_CSI_HSYNC__USDHC2_CMD         0x17059         /* wifi_cmd */
                                MX6UL_PAD_CSI_DATA00__USDHC2_DATA0      0x17059         /* wifi_data0 */
                                MX6UL_PAD_CSI_DATA01__USDHC2_DATA1      0x17059         /* wifi_data1 */
                                MX6UL_PAD_CSI_DATA02__USDHC2_DATA2      0x17059         /* wifi_data2 */
                                MX6UL_PAD_CSI_DATA03__USDHC2_DATA3      0x17059         /* wifi_data3 */
                        >;
                };
                pinctrl_wifi: wifigrp {
                        fsl,pins = <
                                MX6UL_PAD_GPIO1_IO08__GPIO1_IO08        0x17059         /* gpio8 */
                                MX6UL_PAD_NAND_DATA03__GPIO4_IO05       0x17059         /* wifi_irq */
                        >;
                };
        };
};
&usdhc2 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_usdhc2 &pinctrl_wifi>;
        keep-power-in-suspend;
        enable-sdio-wakeup;
        bus-width = <4>;
        no-1-8-v;
        wifi-host;
        non-removable;
        vmmc-supply = <&wlan_en>;
        status = "okay";

        max-frequency = <40000000>;

        #address-cells = <1>;
        #size-cells = <0>;
        wlcore: wlcore@0 {
                compatible = "ti,wl1807", "ti,wlcore";
                reg = <2>;

                interrupt-parent = <&gpio4>;
                interrupts = <5 IRQ_TYPE_EDGE_RISING>;
        };
};


Following are the boot logs with both successful and unsuccessful wlan init.

------------------------------------------

boot log with wlan init ok

------------------------------------------
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: no vqmmc regulator found
mmc0: no vmmc regulator found
mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
sdhci-esdhc-imx 2194000.usdhc: assigned as wifi host
mmc1: no vqmmc regulator found
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SDHC card at address aaaa
mmcblk0: mmc0:aaaa SU08G 7.40 GiB
 mmcblk0: p1 p2
usb 1-1: new high-speed USB device number 2 using ci_hdrc
mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
caam 2140000.caam: Instantiated RNG4 SH0
sdhci-esdhc-imx 2194000.usdhc: card claims to support voltages below defined range
mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
caam 2140000.caam: Instantiated RNG4 SH1
mmc1: new high speed SDIO card at address 0001
caam 2140000.caam: device ID = 0x0a160300 (Era 8)
caam 2140000.caam: job rings = 3, qi = 0
caam algorithms registered in /proc/crypto
caam_jr 2141000.jr0: registering rng-caam
.
.
Loading modules backported from Linux version R8.6_SP1-0-g4d167bf
Backport generated by backports.git R8.6_SP1-0-g4677dc3
[  OK  ] Listening on sshd.socket.
[  OK  ] Started Restore Sound Card State.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting Login Service...
[  OK  ] Started Kernel Logging Service.
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started Getty on tty1.
[  OK  ] Started System Logging Service.
         Starting Network Manager...
         Starting Avahi mDNS/DNS-SD Stack...
[  OK  ] Started Serial Getty on ttymxc2.
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
cfg80211: Calling CRDA to update world regulatory domain
FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
wl18xx_driver wl18xx.0.auto: Direct firmware load failed with error -2
wl18xx_driver wl18xx.0.auto: Falling back to user helper
wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
wlcore: loaded
wlcore: driver version:
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
[  OK  ] Started Login Service.
[  OK  ] Created slice system-systemd\x2drfkill.slice.
         Starting Load/Save RF Kill Switch Status of rfkill0...
[  OK  ] Started Network Manager.
[  OK  ] Reached target Network.
         Starting Network Time Service...
         Starting DNS forwarder and DHCP server...
[  OK  ] Started Load/Save RF Kill Switch Status of rfkill0.
cfg80211: Calling CRDA to update world regulatory domain
[  OK  ] Started DNS forwarder and DHCP server.

lccd ttymxc2

Mentor Embedded Linux 2015.12 lccd ttymxc2

lccd login: wlcore: PHY firmware version: Rev 8.2.0.0.233
wlcore: firmware booted (Rev 8.9.0.1.55)
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
flexcan 2090000.can can0: bit-timing not yet defined
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: Calling CRDA to update world regulatory domain

lccd ttymxc2

Mentor Embedded Linux 2015.12 lccd ttymxc2

lccd login: root
cfg80211: Calling CRDA to update world regulatory domain
root@lccd:~#
root@lccd:~#
root@lccd:~#
root@lccd:~# cfg80211: Calling CRDA to update world regulatory domain

root@lccd:~#
root@lccd:~# cfg80211: Calling CRDA to update world regulatory domain
cfg80211: Calling CRDA to update world regulatory domain

root@lccd:~#
root@lccd:~# icfg80211: Calling CRDA to update world regulatory domain
fconfig wlancfg80211: Calling CRDA to update world regulatory domain
0
wlan0     Link encap:Ethernet  HWaddr 74:da:ea:85:4e:ed 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@lccd:~#
root@lccd:~#

--------------------------------------

boot log with wlan init failure

--------------------------------------


sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: no vqmmc regulator found
mmc0: no vmmc regulator found
mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
sdhci-esdhc-imx 2194000.usdhc: assigned as wifi host
mmc1: no vqmmc regulator found
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SDHC card at address aaaa
mmcblk0: mmc0:aaaa SU08G 7.40 GiB
 mmcblk0: p1 p2
usb 1-1: new high-speed USB device number 2 using ci_hdrc
mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
caam 2140000.caam: Instantiated RNG4 SH0
sdhci-esdhc-imx 2194000.usdhc: card claims to support voltages below defined range
mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
caam 2140000.caam: Instantiated RNG4 SH1
mmc1: new high speed SDIO card at address 0001
caam 2140000.caam: device ID = 0x0a160300 (Era 8)
caam 2140000.caam: job rings = 3, qi = 0
caam algorithms registered in /proc/crypto
.
.
.
Loading modules backported from Linux version R8.6_SP1-0-g4d167bf
[  OK  ] Started Getty on tty1.
Backport generated by backports.git R8.6_SP1-0-g4677dc3
[  OK  ] Started Kernel Logging Service.
         Starting Avahi mDNS/DNS-SD Stack...
[  OK  ] Started Login Service.
[  OK  ] Found device /dev/ttymxc2.
[  OK  ] Started Serial Getty on ttymxc2.
[  OK  ] Started Network Manager.
[  OK  ] Reached target Network.
         Starting DNS forwarder and DHCP server...
         Starting Network Time Service...
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
[  OK  ] Started DNS forwarder and DHCP server.
[  OK  ] Started Network Time Service.
cfg80211: Calling CRDA to update world regulatory domain
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
wl18xx_driver wl18xx.0.auto: Direct firmware load failed with error -2
wl18xx_driver wl18xx.0.auto: Falling back to user helper
asix 1-1:1.0 eth0: link down
flexcan 2090000.can can0: bit-timing not yet defined
wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
wlcore: loaded
wlcore: driver version:

lccd ttymxc2

Mentor Embedded Linux 2015.12 lccd ttymxc2

lccd login: wlcore: ERROR firmware boot failed despite 3 retries
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
asix 1-1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: Calling CRDA to update world regulatory domain

lccd ttymxc2

Mentor Embedded Linux 2015.12 lccd ttymxc2

lccd login: root
root@lccd:~# cfg80211: Calling CRDA to update world regulatory domain

root@lccd:~#
root@lccd:~# cfg80211: Calling CRDA to update world regulatory domain
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: Calling CRDA to update world regulatory domain

  • hi ,
    - as per logs , wilink is detected by system on boot
    - firmware load fails - this could be irq or sdio issue
    - update build utils to tag R8.7
    -consult patches under patches/kernel_patches/imx..
    don't change patch except wlan-en and irq values

    Saurabh
  • Hi Saurabh,


    Thank you for the tips I am working on these,

    Yes I agree that the initial sdio communication works and wlcore_sdio and wl18xx modules gets loaded after that but later on it fails on some point around wl12xx_init_fw().

    Any recommended pad control settings for wlan-en and irq pads ? any pull up/down considerations ?

  • hi ,
    please consult the dts as stated above. these pins are configured as pull down
    Saurabh
  • Hello Saurabh,

    Thanks for all the tips but it turned out to be an highly unexpected reason behind this issue.

    Actually investigating further I came to know that in fact the sdio communication does not went bad instead the firmware binary is successfully transferred to wifi module but it failed to boot with that firmware binary.

    ifconfig wlan0 up
    wlcore: mac80211 start
    wlcore: mac80211 add interface type 2 mac de:ad:be:ef:00:00
    wlcore: allocating hw queue base: 0
    wlcore: mem_start 00700000 mem_size 0000030C
    wlcore: reg_start 00802000 reg_size 00014578
    wlcore: mem2_start 00B00404 mem2_size 00001000
    ........
    wlcore: reg_start 00802000 reg_size 00014578
    wlcore: mem2_start 00B00404 mem2_size 00001000
    wlcore: mem3_start 00C00000 mem3_size 00000400
    wlcore: chip id after firmware boot: 0x6030111
    wlcore: ERROR timeout waiting for the hardware to complete initialization
    ...

    Then I move back the usb ethernet boot and check the log in that case after firmware load it gets booted successfully.

    So my attention turned towards the firmware binaries that are present on the NFS server and on the sd card/usb flash drive.
    After getting the checksum my suspicion about it proved true. The checksum was different.

    md5sum - on build system
    7e59b96595688dfdff5e57cf3bc59a74 tmp/work/all-mel-linux/wl18xx-firmware/R8.6_SP1+gitAUTOINC+13e24dccdb-r7/git/wl18xx-fw-4.bin

    md5sum - NFS/USB ethernet dongle
    7e59b96595688dfdff5e57cf3bc59a74 /lib/firmware/ti-connectivity/wl18xx-fw-4.bin

    md5sum - USB flash drive
    18ff8e82517feba9733a01da728b5457 /lib/firmware/ti-connectivity/wl18xx-fw-4.bin

    And the reason behind that is the [raw copy] / dd of .wic image with flag conv=sparse, that apparently does reduce the time to copy the image but it turns out that it is not caring for data integrity !!!

    Now after preparing the sd card and usb flash drive by NOT using the flag "conv=sparse", I am able to test the TI wifi successfully booting from sd card and usb flash drive.