TI Wilink 8 (WL18XX) in i.MX7D Android 7.1.2 kernel 4.9.17

cancel
Showing results for 
Search instead for 
Did you mean: 

TI Wilink 8 (WL18XX) in i.MX7D Android 7.1.2 kernel 4.9.17

1,582 Views
sangili
Contributor I

Hi,

I'm using iMX7D sabresd board with NXP's Android 7.1.2.

I'm integrating Wilink8 module with this board i've connected Wilink8 module with processor via SD2 interface by depopulating BCM wifi resisters.

Build the Wilink8 kernel in-tree modules using following kernel configs,

CONFIG_CFG80211=m
CONFIG_CFG80211_DEFAULT_PS=y
CONFIG_CFG80211_DEBUGFS=y
CONFIG_MAC80211=m
CONFIG_MAC80211_DEBUGFS=y
CONFIG_MAC80211_MESSAGE_TRACING=y
CONFIG_NL80211_TESTMODE=y
CONFIG_WLAN=y
CONFIG_WL_TI=y
CONFIG_WL12XX=m
CONFIG_WL18XX=m
CONFIG_WLCORE=m
CONFIG_WLCORE_SDIO=m

CONFIG_BT_WILINK=y
CONFIG_BT_HCIUART_LL=y

CONFIG_OF=y
CONFIG_PROC_DEVICETREE=y

CONFIG_CRYPTO_CCM=y
CONFIG_CRYPTO_GCM=y
CONFIG_CRYPTO_SEQIV=y    

CONFIG_TI_ST=y 
CONFIG_ST_HCI=y

and following driver got created in corresponding directory,

mac80211.ko
cfg80211.ko
wlcore.ko
wl12xx.ko
wl18xx.ko
wlcore_sdio.ko

i'm loading the driver from android init.tc as,

  # wi-fi
    mkdir /data/misc/wifi/sockets 0770 wifi wifi
    mkdir /data/misc/dhcp 0770 dhcp dhcp
    insmod /system/lib/modules/cfg80211.ko
    insmod /system/lib/modules/mac80211.ko
    insmod /system/lib/modules/wlcore.ko
    insmod /system/lib/modules/wl12xx.ko
    insmod /system/lib/modules/wl18xx.ko board_type=hdk
    insmod /system/lib/modules/wlcore_sdio.ko

DTS changes:
       wlan_en_reg: fixedregulator@2 {
               compatible = "regulator-fixed";
               regulator-name = "wlan-en-regulator";
               regulator-min-microvolt = <1800000>;
               regulator-max-microvolt = <1800000>;
               /* WLAN_EN GPIO for this board - Bank6, pin12 */
               gpio = <&gpio6 12 0>;

                /* WLAN card specific delay */
               startup-delay-us = <70000>;
               enable-active-high;
        };

&usdhc2 {
        pinctrl-names = "default", "state_100mhz", "state_200mhz";
        pinctrl-0 = <&pinctrl_usdhc2>;
        pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
        pinctrl-2 = <&pinctrl_usdhc2_200mhz>;

        enable-sdio-wakeup;
        keep-power-in-suspend;
        non-removable;
        cd-post;
        pm-ignore-notify;
        wifi-host;
        vmmc-supply = <&wlan_en_reg>;
        cap-power-off-card;
        bus-width = <4>;
        status = "okay";

        #address-cells = <1>;
        #size-cells = <0>;
        wlcore: wlcore@0 {
                compatible = "ti,wl1835";
                reg = <2>;
                interrupt-parent = <&gpio6>;
                interrupts = <22 IRQ_TYPE_EDGE_RISING>;
                platform-quirks = <1>;
        };
};

pinctrl_usdhc2: usdhc2grp {
                        fsl,pins = <
                                MX7D_PAD_SD2_CMD__SD2_CMD               0x59
                                MX7D_PAD_SD2_CLK__SD2_CLK               0x19
                                MX7D_PAD_SD2_DATA0__SD2_DATA0           0x59
                                MX7D_PAD_SD2_DATA1__SD2_DATA1           0x59
                                MX7D_PAD_SD2_DATA2__SD2_DATA2           0x59
                                MX7D_PAD_SD2_DATA3__SD2_DATA3           0x59
                                MX7D_PAD_SAI1_RX_DATA__GPIO6_IO12       0x19    /* WL_EN */
                /*              MX7D_PAD_SAI1_TX_BCLK__GPIO6_IO13       0x59*/
                                MX7D_PAD_SAI2_TX_DATA__GPIO6_IO22       0x19    /* WL_IRQ */

                        >;
};

When i boot the device and see the boot logs i couldn't see any logs related to wlcore driver.

i added log (__func__ ) in all the init and probe functions in all the driver. When next boot i got "wl1271_init()" log only from wlcore/sdio.c and no others log from any driver.


After wl1271_init() no logs from any any functions and i'm suspecting that sdio_probe not happened or chip not detected but no logs about those errors.

i could you see the "wlan-en-regulator" in /sys/class/regulator/regulator.8 and state is "enabled".

i could see the GPIO for WL_EN as

gpiochip5: GPIOs 160-191, parent: platform/30250000.gpio, 30250000.gpio:
 gpio-172 (                    |wlan-en-regulator   ) out hi    


no wlan0 entry in ifconfig -a

What are the other points I've to check, or did i missed anything?

Thanks,

Sangili

Labels (3)
0 Kudos
2 Replies

327 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Sangili

for kernel 4.9 one can look at ti suggestions

Linux/WL18XXCOM82SDMMC: Build the driver for Kernel 4.9 - WiLink™ WiFi + Bluetooth Forum - WiLink™ W... 

use description about how to enable WL Transceiver via device tree in the Linux documentation file -

/Linux/Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt

and ti WL18xx integration guide

WL18xx Platform Integration Guide - Texas Instruments Wiki 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

327 Views
sangili
Contributor I

Hi Igor,

Thanks for your reply.

Mentioned TI E2E thread was created by me and using that only i build the drivers.

Could you please verify the following queries,

1. Please verify above mentioned dts changes for SD2 which is already connected with BCM Wireless module. 

2. Is default usdhc2 SDIO clock is compatible with Wilink8? as per this link(WL18xx WLAN Hardware Design Guide - Texas Instruments Wiki ) SDIO max clock is 52MHz. 

3. If not compatible means how to configure it in dts rather than configure in "echo xxxxxx > /sys/kernel/debug/mmcx/clock"

4. When the driver loads i couldn't see the clock in SD_CLK line in scope. How to ensure that imx7d is scanning the connected device in sdio interface.

Thanks

Sangili

0 Kudos