WL1831MOD: WL1831MODGI

Part Number: WL1831MOD
Other Parts Discussed in Thread: WL1271, WL1835

Tool/software:

Hi Team,

I am trying to integrate WL18MODGI on imx95 with kernel 6.6. 

After integrating the driver and lsmod loads it fine. But when I try to bring the wlan0 inteface it fails with the following error:

[ 73.450720] wlcore: loaded
f
[ 74.715040] wlcore: ERROR Your WiFi FW version (8.9.1.0.2) is invalid.
[ 74.715040] Please use at least FW 8.9.*.*.58.
[ 74.715040] You can get the latest firmwares at:
[ 74.715040] git://git.ti.com/wilink8-wlan/wl18xx_fw.git
[ 74.735789] wlcore: ERROR error getting static data
[ 75.309432] wlcore: ERROR Your WiFi FW version (8.9.1.0.2) is invalid.
[ 75.309432] Please use at least FW 8.9.*.*.58.
[ 75.309432] You can get the latest firmwares at:
[ 75.309432] git://git.ti.com/wilink8-wlan/wl18xx_fw.git
[ 75.330182] wlcore: ERROR error getting static data
[ 75.900199] wlcore: ERROR Your WiFi FW version (8.9.1.0.2) is invalid.
[ 75.900199] Please use at least FW 8.9.*.*.58.
[ 75.900199] You can get the latest firmwares at:
[ 75.900199] git://git.ti.com/wilink8-wlan/wl18xx_fw.git
[ 75.920943] wlcore: ERROR error getting static data

[ 75.925867] wlcore: ERROR firmware boot failed despite 3 retries
[ 75.931923] wl18xx_driver wl18xx.2.auto: Runtime PM usage count underflow!
SIOCSIFFLAGS: Invalid argument

Could you please let me if there is any updated FW version required for WL18xx module when worked upon imx95. 

Please reply at the earliest.

Thanks,

Satya.

  • Hi Satya,

    In order to use the latest FW on kernel 6.6 you will need some patches to update the wlcore driver as well. Can you try using the patches within the attached tarball and then build your kernel and test again?

     k61patches.tar.gz

  • Hi Team,

    Thanks for the patch shared.

    I could integrate those patches into the build, i have loaded the image on the SOM and here are the observations:

    localhost:~$ dmesg | grep wlcore
    [ 73.414093] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
    [ 73.423565] wlcore: loaded


    localhost:~$ sudo ifconfig wlan0 up
    [ 225.066410] wlcore: PHY firmware version: Rev 8.2.0.0.246
    [ 225.154231] wlcore: firmware booted (Rev 8.9.1.0.2)


    localhost:~$ sudo iwlist wlan0 scan
    [ 249.761590] warning: `iwlist' uses wireless extensions which will stop working for Wi-Fi 7 hardware; use nl80211
    [ 250.287269] wlcore: WARNING ELP wakeup timeout!
    [ 250.291916] wlcore: WARNING cmd set_template failed: -5
    [ 250.297198] wlcore: ERROR 2.4GHz PROBE request template failed
    [ 250.303062] wlcore: down
    [ 250.311351] ieee80211 phy0: Hardware restart was requested
    [ 250.751864] wlcore: PHY firmware version: Rev 8.2.0.0.246
    [ 250.839047] wlcore: firmware booted (Rev 8.9.1.0.2)
    wlan0 No scan results

    localhost:~$ sudo iwlist wlan0 scan
    wlan0 Failed to read scan data : Resource temporarily unavailable

    localhost:~$ sudo iwlist wlan0 scan
    wlan0 Interface doesn't support scanning : Device or resource busy

    localhost:~$ [ 292.079267] wlcore: Scan completed due to error.
    [ 292.084124] ------------[ cut here ]------------
    [ 292.088764] WARNING: CPU: 1 PID: 57 at /drivers/net/wireless/ti/wlcore/main.c:860 wl12xx_queue_recovery_work.part.0+0x78/0x80 [wlcore]
    [ 292.100945] Modules linked in: xt_tcpudp xt_conntrack iptable_filter iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_tables x_tables wl18xx wlcore crct10dif_ce snd_soc_imx_sgtl5000 polyval_ce polyval_generic snd_soc_fsl_asoc_card mxc_jpeg_encdec tpm_tis_i2c snd_soc_imx_audmux v4l2_jpeg tpm_tis_core wlcore_sdio snd_soc_fsl_sai rtc_rv8803 snd_soc_fsl_utils snd_soc_sgtl5000 flexcan can_dev imx_pcm_dma pwm_fan overlay
    [ 292.139239] CPU: 1 PID: 57 Comm: kworker/u12:3 Not tainted 6.6.36-ga3639229521c #1
    [ 292.146808] Hardware name: NXP i.MX95 19X19 board (DT)
    [ 292.151941] Workqueue: phy0 wl1271_scan_complete_work [wlcore]
    [ 292.157879] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [ 292.164842] pc : wl12xx_queue_recovery_work.part.0+0x78/0x80 [wlcore]
    [ 292.171389] lr : wl12xx_queue_recovery_work+0x20/0x2c [wlcore]
    [ 292.177306] sp : ffff8000829abd50
    [ 292.180616] x29: ffff8000829abd50 x28: 0000000000000000 x27: 0000000000000000
    [ 292.187786] x26: ffff000080014028 x25: ffff000080604100 x24: ffff000081b4d815
    [ 292.194933] x23: ffff000084faa4f8 x22: ffff000096d4e058 x21: ffff000084faa0a0
    [ 292.202083] x20: ffff000085391010 x19: ffff000084faa040 x18: 0000000000000006
    [ 292.209251] x17: 0000000000000000 x16: 0000000000000000 x15: ffff8000829ab7a0
    [ 292.216372] x14: 000000000000000c x13: 0000000000000225 x12: 0000000000000002
    [ 292.223496] x11: 0000000000000000 x10: 0000000000000a60 x9 : ffff8000829abb00
    [ 292.230629] x8 : ffff000080680ac0 x7 : ffff0001f739bf80 x6 : 0000000000000000
    [ 292.237753] x5 : ffff0001f7393d48 x4 : 0000000000000000 x3 : 0000000000000000
    [ 292.244877] x2 : 0000000000000000 x1 : ffff000084faa040 x0 : 0000000000000001
    [ 292.252022] Call trace:
    [ 292.254475] wl12xx_queue_recovery_work.part.0+0x78/0x80 [wlcore]
    [ 292.260581] wl12xx_queue_recovery_work+0x20/0x2c [wlcore]
    [ 292.266076] wl1271_scan_complete_work+0x134/0x1a0 [wlcore]
    [ 292.271657] process_one_work+0x138/0x248
    [ 292.275670] worker_thread+0x320/0x438
    [ 292.279414] kthread+0x110/0x114
    [ 292.282637] ret_from_fork+0x10/0x20
    [ 292.286230] ---[ end trace 0000000000000000 ]---
    [ 292.290906] wlcore: Hardware recovery in progress. FW ver: Rev 8.9.1.0.2
    [ 292.303576] wlcore: pc: 0x0, hint_sts: 0x00000004 count: 1
    [ 292.309250] wlcore: down
    [ 292.311882] ieee80211 phy0: Hardware restart was requested
    [ 292.755969] wlcore: PHY firmware version: Rev 8.2.0.0.246
    [ 292.843079] wlcore: firmware booted (Rev 8.9.1.0.2)

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

    I see the interface is detected and also the Firmware is loaded correctly with out any error.

    But this time ended up with the scan command. Please let me know the fix for this ASAP.

    Main issue: 

    wlcore: ERROR 2.4GHz PROBE request template failed
    wlcore: down

  • Hi Satya,

    Instead of using "iwlist", do you have "iw"? Do you get the same error with "iw wlan0 scan"?

    Also, is this a debian or Yocto/buildroot system?

  • Hi, 

    When used iw wlan0 scan; ended up with the same error.

    By the way this is Yocto system built for kernel 6.6.

    In parallel, could you please let me know the Firmware version that is latest to 8.9.0.0.246, as it is from R8 release. Any release that could be suggested from R9 release.

    I request you to please consider this as a Critical Highest Priority item and help us fix this ASAP. 

  • Hi Sabeeh, 

    This is a Gentle reminder!!!

    Could you please provide an update on the issue? As mentioned earlier, we are looking forward to a fix as soon as possible.

    Thanks,

    Satya.

  • Hi Satya,

    I have just tried myself. I applied the same patches I attached in the tarball above to my linux kernel 6.6 and was able to boot successfully and scan as well. See logs here:

    root@am335x-evm:~# iw wlan0 scan | grep SSID
            SSID: sabeeh_2G
            SSID: sabeeh_5G
    root@am335x-evm:~# dmesg | grep wlc
    [   28.823178] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
    [   28.856564] wlcore: loaded
    [   36.147088] wlcore: PHY firmware version: Rev 8.2.0.0.246
    [   36.327107] wlcore: firmware booted (Rev 8.9.1.0.2)

    This is the firmware version I am using, which is the latest: 

    https://git.ti.com/cgit/wilink8-wlan/wl18xx_fw/commit/wl18xx-fw-4.bin?id=685097375c6530c98ce052fcd160001abaa1b256 

    Do you happen to be using the FIPS version of the FW?

  • Hi Sabeeh,

    We are also using the same Firmware, which is the latest. 

    Hope you are also using SDIO based WiFi connections; could you also plz share the dts changes as well.

    Thanks,

    Satya. 

  • Hi Satya,

    There are no changes to the devicetree in order to change the firmware on WL18x. You could share your devicetree for me to review in any case.

    Were you able to use the older firmware/kernel fine before requiring to update the wl18xx firmware?

  • Hi Sabeeh,

    1. We have connected the Wifi module over the USB lane and the data is received on the SDIO lines, so this what the dts changes looks like:

    diff --git a/arch/arm64/boot/dts/freescale/imx95-aom5521-a1.dts b/arch/arm64/boot/dts/freescale/imx95-aom5521-a1.dts
    index 9cadec097dca..79dcb8cafc93 100644
    --- a/arch/arm64/boot/dts/freescale/imx95-aom5521-a1.dts
    +++ b/arch/arm64/boot/dts/freescale/imx95-aom5521-a1.dts
    @@ -138,7 +138,7 @@ reg_3p3v: regulator-3p3v {
        regulator-name = "+V3.3_SW";
      };

    -  reg_usdhc2_vmmc: regulator-usdhc2 {
    +  /*reg_usdhc2_vmmc: regulator-usdhc2 {
        compatible = "regulator-fixed";
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_reg_usdhc2_vmmc>;
    @@ -148,6 +148,20 @@ reg_usdhc2_vmmc: regulator-usdhc2 {
        gpio = <&gpio3 7 GPIO_ACTIVE_HIGH>;
        off-on-delay-us = <12000>;
        enable-active-high;
    +  };*/
    +
    +        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 – Bank2, pin4 */
    +    gpio = <&gpio3 23 0>;
    +
    +    /* WLAN card specific delay */
    +    startup-delay-us = <70000>;
    +    enable-active-high;
      };

      reg_pcie0: regulator-pcie {
    @@ -690,7 +704,7 @@ &usdhc1 {
      status = "okay";
    };

    -&usdhc2 {
    +/*&usdhc2 {
      pinctrl-names = "default", "state_100mhz", "state_200mhz", "sleep";
      pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
      pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
    @@ -701,6 +715,31 @@ &usdhc2 {
      vmmc-supply = <&reg_usdhc2_vmmc>;
      bus-width = <4>;
      status = "okay";
    +};*/
    +
    +&usdhc2 {
    +  pinctrl-names = "default", "state_100mhz", "state_200mhz", "sleep";
    +  pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
    +  pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
    +  pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
    +  pinctrl-3 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
    +  //cd-gpios = <&gpio3 00 GPIO_ACTIVE_LOW>;
    +  //fsl,cd-gpio-wakeup-disable;
    +  vmmc-supply = <&wlan_en_reg>;
    +  bus-width = <4>;
    +  no-1-8-v;
    +  keep-power-in-suspend;
    +  enable-sdio-wakeup;
    +  cap-power-off-card;
    +  status = "okay";
    +  #address-cells = <1>;
    +  #size-cells = <0>;
    +  wlcore: wlcore@0 {
    +    compatible = "ti,wl1835";
    +    reg = <2>;
    +    interrupt-parent = <&gpio3>;
    +    interrupts = <7 IRQ_TYPE_EDGE_RISING>;
    +  };
    };

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

    2. There was no issue with the older kernel (6.1), we were able to load the driver and also scan the SSID. This issue is only observed with kernel 6.6.

    Thanks,

    Satya

  • Hi Satya,

    Understood. I believe this is an issue with how SDIO is being used with the 6.6 kernel on your imx9 host. Just as an attempt, can you try removing pinctrl 1,2, and 3, but leave pinctrl-0. And also modify pinctrl-names to the following:

    pinctrl-names = "default"; 

  • Hi Sabeeh,

    I have tried the above mentioned work around, but ended up with the same error and it is still blocked.

    Could you please help us with the issue- why is it failing to scan the SSID's.

    Thanks,

    Satya.

  • Hi Sabeeh, 

    I would like to inform you that a call was held with Luke from your organization regarding the WL1835 driver integration, along with another discussion related to a different Wi-Fi driver. Additionally, Luke requested us to share some logs using the gLogger tool from a Windows PC.

    Could you please let me know how to install the gLogger tool on Windows 11, and also what commands or details are required to collect the necessary logs? This will help us provide the appropriate information for better debugging.

    Thanks,

    Satya.

  • Hi Sabeeh,

    I could install the gLogger tool succesfully and also connected with the UART settings and could see connection information as shown in the snapshot attached.

    But, the main issue is that we could not take the Debug pin (WL_UART_DBG) out from the existing Board. So looks like the exercise cannot me pulled any more than this.

    Could you please suggest any other way to ge the necessary logs.