AnsweredAssumed Answered

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

Question asked by SANGILI KUMAR on Jan 15, 2018
Latest reply on Jan 16, 2018 by SANGILI KUMAR

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

Outcomes