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.

Linux/WL1837MOD: How does the kernel understand that it is the wi-fi module but not a SD card?

Part Number: WL1837MOD
Other Parts Discussed in Thread: WL1837

Tool/software: Linux

Hello

We have the board that has wl1837 connected to esdhc0 of vybrid vf6xx via the 1.8 V - 3.3 V transformer.
My image is based on timesys linux kernel 3.13.
We do not use bluetooth therefore device tree is absent for bluetooth.
When booting up, the kernel does not set WLAN_ENABLE to the high level and
gives me "sdhci-esdhc-imx: probe of 400b1000.esdhc failed with error -22".
In my opinion the kernel does not understand that it is the wi-fi  module.

How does the kernel understand that it is the wi-fi  module but not a SD card?
What is wrong, device tree or .config file?

I put this in my device tree:

in vf610_wifi.dtsi:

            esdhc0: esdhc@400b1000 {
                compatible = "fsl,imx53-esdhc";
                reg = <0x400b1000 0x1000>;
                interrupts = <27 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clks VF610_CLK_IPG_BUS>,
                    <&clks VF610_CLK_PLATFORM_BUS>,
                    <&clks VF610_CLK_ESDHC0>;
                clock-names = "ipg", "ahb", "per";
                status = "disabled";
            };

My vf610_wifi.dtsi file is based on vf610.dtsi and vfxxx.dtsi for TWR-VF65GS10.
I take this from vfxxx.dtsi.



in vf610-wifi_min.dts:

(My vf610-wifi_min.dts file is based on vf610-twr.dts for TWR-VF65GS10,
but there is not device tree for wi-fi in vf610-twr.dts)

        wlan_en_reg: fixedregulator@2 {

           compatible = "regulator-fixed";
           regulator-name = "wlan-en-regulator";
           regulator-min-microvolt = <3300000>;  /*my processor doesn't support 1.8V.*/
           regulator-max-microvolt = <3300000>; /*my processor doesn't support 1.8V.*/
           gpio = <&gpio1 25 0>;  /* WLAN_ENABLE, PORT0[25], PTB3*/
           startup-delay-us = <70000>;
           enable-active-high;

        };

&esdhc0 {
    status = "okay";
    vmmc-supply = <&wlan_en_reg>;
    bus-width = <4>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_esdhc0 &pinctrl_wlan_pins>;
    ti,non-removable;
    ti,needs-special-hs-handling;  //I am not sure that it is necessary!!!
    cap-power-off-card;
    keep-power-in-suspend;
    #address-cells = <1>;
    #size-cells = <0>;
    wlcore: wlcore@0 {
        compatible = "ti,wl1837";
        reg = <2>;
        interrupt-parent = <&gpio1>;  // WLAN_IRQ, PORT1[31], PTD31
        interrupts = <31 IRQ_TYPE_EDGE_RISING>;
    };
};

        pinctrl_wlan_pins: wlan_pins {
            fsl,pins = <
                VF610_PAD_PTB3__GPIO_25  0x2182 /* WLAN_ENABLE*/
                VF610_PAD_PTD31__GPIO_63 0x22ed /* WLAN_IRQ*/
            >;
        };

        pinctrl_esdhc0: esdhc0grp {
            fsl,pins = <
                VF610_PAD_PTC0__ESDHC0_CLK      0x31ef
                VF610_PAD_PTC1__ESDHC0_CMD      0x31ef
                VF610_PAD_PTC2__ESDHC0_DAT0     0x31ef
                VF610_PAD_PTC3__ESDHC0_DAT1     0x31ef
                VF610_PAD_PTC4__ESDHC0_DAT2     0x31ef
                VF610_PAD_PTC5__ESDHC0_DAT3     0x31ef
            >;
        };


vf610_wifi.dtsi and vf610-wifi_min.dts files are attached.
Settings for wi-fi and wl1837 drivers and firmware are in .config file, which is attached.

Earlier I did not write a device tree.

thanks
TI_wl1837.tar.gz

  • Hi everybody

    1. Can the wlan_en setting fail because of old wlcore and wl1837 drivers?

    Maybe I need to update drivers?

    2. We do not use bluetooth therefore device tree is absent for bluetooth.

    Can this be the reason that driver and firmware will not be loaded to wl1837 module?

    thanks.

  • Hi, 

    I suggest you backport the latest drivers and other wireless binaries to your kernel version using build utilities : http://processors.wiki.ti.com/index.php/WL18xx_System_Build_Scripts 

    ' compatible = "ti,wl1837";' is used to find the correct compatible driver. As far as I remember , in older drivers we used 'wlcore' instead of 'wl1837'. You can try changing this and see if it fixes the issue. Better option is to update the drivers using backports. 

    Saurabh

  • Hi Saurabh

    I will make so. I will write if will be problems.

    thanks.

  • Hi everybody

    My steps to build the WL18xx software:

    1
    I set all tools from "Setting up the Host Environment" (WL18xx WiFi Build Process, link processors.wiki.ti.com/.../WL18xx_WiFi_Build_Process, exseption is only lib32bz2-1.0.
    The "sudo apt-get install lib32bz2-1.0" command does not find such packet.

    2.
    I set all build kernel options from "Creating configuration file (.config) for Linux kernel" (WL18xx Platform Integration Guide, link processors.wiki.ti.com/.../WL18xx_Platform_Integration_Guide).
    I am using native kernel support for cfg80211/mac80211 and I set CONFIG_CFG80211=m, CONFIG_MAC80211=m.
    To set "CONFIG_WIRELESS_EXT=y" I set "CONFIG_HOSTAP=y".
    This option causes the following options to be set as well:
    CONFIG_WEXT_CORE=y
    CONFIG_WEXT_PROC=y
    CONFIG_WEXT_SPY=y
    CONFIG_WEXT_PRIV=y

    CONFIG_LIB80211=y
    CONFIG_LIB80211_CRYPT_WEP=y
    CONFIG_LIB80211_CRYPT_CCMP=y
    CONFIG_LIB80211_CRYPT_TKIP=y

    3.
    lyudmila@lyudmila-linuxmint ~ $ pwd
    /home/lyudmila
    lyudmila@lyudmila-linuxmint ~ $ cd wl8-build
    lyudmila@lyudmila-linuxmint ~/wl8-build $ git clone git://git.ti.com/wilink8-wlan/build-utilites.git

    4.
    lyudmila@lyudmila-linuxmint ~/wl8-build $ cd build-utilites/
    lyudmila@lyudmila-linuxmint ~/wl8-build/build-utilites $cp setup-env.sample setup-env
    Editing the setup-env file:
    TOOLCHAIN_PATH=/home/lyudmila/timesysMinPoint/twr_vf600/toolchain/bin
    ROOTFS=/home/lyudmila/wl8-build/fs
    KERNEL_PATH=/home/lyudmila/timesysMinPoint/twr_vf600/kernel-source/linux-3.13
    KERNEL_VARIANT=3.13.9-ts-armv7l
    CROSS_COMPILE=armv7l-timesys-linux-gnueabi- (from timesys SDK)
    setup-env file attached.

    5.
    lyudmila@lyudmila-linuxmint ~/wl8-build/build-utilites $ ./build_wl18xx.sh init
    wl18_init.log file attached.

    6.
    $ ./build_wl18xx.sh patch_kernel
     Changing ROOTFS path to /home/lyudmila/wl8-build/fs
     Using user defined kernel
    Makefile was found. Kernel version was set to 3.13.9.
       *****  only patching kernel  without performing an actual build! *****  
    using kernel: /home/lyudmila/timesysMinPoint/twr_vf600/kernel-source/linux-3.13
    ******  *******
    Wifi Package Build Successful

    7.
    Build my kernel:
    $ cd /home/lyudmila/timesysMinPoint/twr_vf600/kernel-source/linux-3.13
    $ export PATH=/home/lyudmila/timesysMinPoint/twr_vf600/toolchain/ccache:/home/lyudmila/timesysMinPoint/twr_vf600/toolchain/bin:$PATH
    $ make ARCH=arm CROSS_COMPILE=armv7l-timesys-linux-gnueabi- uImage -j12
    $ make ARCH=arm CROSS_COMPILE=armv7l-timesys-linux-gnueabi- modules
    $ mkdir rfs
    $ make ARCH=arm CROSS_COMPILE=armv7l-timesys-linux-gnueabi- INSTALL_MOD_PATH=/home/lyudmila/timesysMinPoint/twr_vf600/kernel-source/linux-3.13/rfs  modules_install

    8.
    yudmila@lyudmila-linuxmint ~/wl8-build/build-utilites $ ./build_wl18xx.sh update R8.7_SP3
    (from "Step 4: Build & Update" link processors.wiki.ti.com/.../WL18xx_System_Build_Scripts)
    wl18_update.log file attached.

    This step comes to the end with the "Makefile:98: *** Cannot find development files for any supported version of libnl. Stop." message.
    There is not the fs_skeleton.tbz2 file in "<build-utilities>/outputs/" folder.


    What's wrong?

    Maybe in lib32bz2-1.0.  The "sudo apt-get install lib32bz2-1.0" command does not find such packet.

    Additional information:

    "$ ./build_wl18xx.sh init" execution came to the end not absolutely correctly:  ???

    Setting toolchain
    --2019-07-09 12:44:00--  http://releases.linaro.org/15.05/components/toolchain/binaries/arm-linux-gnueabihf/gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf.tar.xz
    Распознаётся releases.linaro.org (releases.linaro.org)... 52.215.200.125
    Подключение к releases.linaro.org (releases.linaro.org)|52.215.200.125|:80... соединение установлено.
    HTTP-запрос отправлен. Ожидание ответа... 404 Not Found
    2019-07-09 12:44:01 ОШИБКА 404: Not Found.


    bzip2: Compressed file ends unexpectedly;
        perhaps it is corrupted?  *Possible* reason follows.
    bzip2: Inappropriate ioctl for device
        Input file = (stdin), output file = (stdout)

    It is possible that the compressed file(s) have become corrupted.
    You can use the -tvv option to test integrity of such files.

    You can use the `bzip2recover' program to attempt to recover
    data from undamaged sections of corrupted files.

    tar: Child returned status 2
    tar: Error is not recoverable: exiting now
    mv: не удалось выполнить stat для '/home/lyudmila/wl8-build/build-utilites/toolchain/*': Нет такого файла или каталога
    Makefile was found. Kernel version was set to 3.13.9.
    Wifi Package Build Successful
    lyudmila@lyudmila-linuxmint ~/wl8-build/build-utilites $

    thanks

    wl8-build-logs.tar.gz

    thanks

  • Additional information:

    The executing of "$ ./build_wl18xx.sh init" came to the end not absolutely correctly:

    ???

    Setting toolchain
    --2019-07-09 12:44:00--  releases.linaro.org/.../gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf.tar.xz
    Распознаётся releases.linaro.org (releases.linaro.org)... 52.215.200.125
    Подключение к releases.linaro.org (releases.linaro.org)|52.215.200.125|:80... соединение установлено.
    HTTP-запрос отправлен. Ожидание ответа... 404 Not Found
    2019-07-09 12:44:01 ОШИБКА 404: Not Found.


    bzip2: Compressed file ends unexpectedly;
        perhaps it is corrupted?  *Possible* reason follows.
    bzip2: Inappropriate ioctl for device
        Input file = (stdin), output file = (stdout)

    It is possible that the compressed file(s) have become corrupted.
    You can use the -tvv option to test integrity of such files.

    You can use the `bzip2recover' program to attempt to recover
    data from undamaged sections of corrupted files.

    tar: Child returned status 2
    tar: Error is not recoverable: exiting now
    mv: не удалось выполнить stat для '/home/lyudmila/wl8-build/build-utilites/toolchain/*': Нет такого файла или каталога
    Makefile was found. Kernel version was set to 3.13.9.
    Wifi Package Build Successful

    thanks