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/WL1831MOD: Error: wlcore: WARNING unsupported chip id: 0x400

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

Tool/software: Linux

Hi

I am using 1831MOD on my custom board which has kernel 4.4.16 ported on it. The Wireless is accessible on SDIO interface. I could successfully generate all modules for the 1831MOD. But when I am loading them onto the board I get the warning " wlcore: WARNING unsupported chip id: 0x400" and the probe of the wlcore returns from here. 

1) while porting, I saw that in the wlcore/main.c it expects wlcore_platform_data which has if_operations. I am unable to understand the expectation from its read and write function calls. Since I have left them empty. I think I am getting the below warning. Should they be left blank and if not then what is the expected functions for it.

2)When I modprobe the drivers I get this warning.

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

wlcore: wl18xx HW: UNKNOWN, PG 2.0 (ROM 0x8)

wlcore: WARNING unsupported chip id: 0x400

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

Kindly help !!

  • Hi,

    Your query has been assigned to a relevant expert. We will get back to you shortly.

    Best regards,
    Vihang
  • hi , can you pls let us know the firmware version/s . Also , can you reduce SDIO frequency and see if it helps . did you use the in-tree kernel drivers ?
    Saurabh
  • Hi Saurabh

    I have downloaded the build scripts and all from the git://git.ti.com/wilink8-wlan/build-utilites.git and further have used the update R8.7 command to build the modules.

    My query is the structure "wlcore_platform_data" expects if_data_operations from the platform? If yes then what is expected from the functions?

    ~ Neha 

  • Hi Saurabh,

    Could you share the "wl12xx_platform_data" patches? My kernel version is 4.4.16 and I think i need those to successfully run the code.

    Thanks
    Neha
  • Neha ,
    Platform data is defined in the device tree .dts file . i don't see any struct wlcore_platform_data .

    Saurabh
  • Hi Saurabh,

    The structure is being used in the drivers/net/wireless/ti/ ...

    I had not taken care of the wl1251_set_platform_data in the board file . Hence it was crashing.

    Now I could proceed further.
    But I am unable to see the wlan0 interface getting created. Even though the probe of the modules does not give any error.

    Steps I followed:
    1) modprobe wlcore_sdio
    2) modprobe wlcore
    3) modprobe wl18xx

    I don't see any errors but after a certain time I get the kernel message that a task is blocked for more than 120 seconds.
    -------
    [ 1323.517447] INFO: task kworker/0:1:28 blocked for more than 120 seconds.
    [ 1323.524161] Not tainted 4.4.16-svn180 #76-svn-r
    [ 1323.529251] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [ 1323.537088] kworker/0:1 D 80593e34 0 28 2 0x00000000
    [ 1323.543532] Workqueue: events request_firmware_work_func
    [ 1323.548914] [<80593e34>] (__schedule) from [<80594328>] (schedule+0x4c/0xac)
    [ 1323.555982] [<80594328>] (schedule) from [<80596b30>] (schedule_timeout+0x138/0x184)
    [ 1323.563771] [<80596b30>] (schedule_timeout) from [<80594bf4>] (wait_for_common+0xb4/0x13c)
    [ 1323.572074] [<80594bf4>] (wait_for_common) from [<803da7b0>] (mmc_wait_for_req_done+0x90/0x130)
    [ 1323.580819] [<803da7b0>] (mmc_wait_for_req_done) from [<803e4d88>] (mmc_io_rw_extended+0x300/0x34c)
    [ 1323.589906] [<803e4d88>] (mmc_io_rw_extended) from [<803e6068>] (sdio_io_rw_ext_helper+0x134/0x1a0)
    [ 1323.598995] [<803e6068>] (sdio_io_rw_ext_helper) from [<803e6220>] (sdio_memcpy_toio+0x24/0x2c)
    [ 1323.607735] [<803e6220>] (sdio_memcpy_toio) from [<7f000244>] (wl12xx_sdio_raw_write+0x88/0x144 [wlcore_sdio])
    [ 1323.617876] [<7f000244>] (wl12xx_sdio_raw_write [wlcore_sdio]) from [<7f0b6618>] (wlcore_set_partition+0xd0/0x454 [wlcore])
    [ 1323.629131] [<7f0b6618>] (wlcore_set_partition [wlcore]) from [<7f0aa24c>] (wl1271_tx_frames_pending+0xf0/0x1ac [wlcore])
    [ 1323.640206] [<7f0aa24c>] (wl1271_tx_frames_pending [wlcore]) from [<7f0b111c>] (wlcore_nvs_cb+0x148/0xaa8 [wlcore])
    [ 1323.650730] [<7f0b111c>] (wlcore_nvs_cb [wlcore]) from [<80316d5c>] (request_firmware_work_func+0x30/0x58)
    [ 1323.660441] [<80316d5c>] (request_firmware_work_func) from [<80039860>] (process_one_work+0x124/0x334)
    [ 1323.669787] [<80039860>] (process_one_work) from [<80039abc>] (worker_thread+0x4c/0x47c)
    [ 1323.677925] [<80039abc>] (worker_thread) from [<8003ebf8>] (kthread+0xe0/0xf8)
    [ 1323.685170] [<8003ebf8>] (kthread) from [<8000f6b8>] (ret_from_fork+0x14/0x3c)
    -----------

    Further probing the command lines of the SDIO_CMD, I could see that all the commands getting responded by the TI module other than IO_RW_EXTENDED command. The moment this command is sent by the host to the device, device does not respond and hence host hangs.

    Could you help me please in solving this issue?

    Thanks
    Neha Makhija
  • Neha,
    Platform specific data should be defined in dts file ( in kernels that support device tree ) . Try lowering sdio operating frequency (ex: 5MHz) and re-test

    Saurabh
  • Hi Saurabh

    We have tried the tests with low SDIO operating frequency as well but all was in vain.

    Let me explain my system here again -
    Our custom board has SoC through which the Wilink 1831 is connected via dedicated SDIO interface. ( which mean the SDIO signals (DATA) are not muxed. IRQ and EN lines are connected via I/O expander). Also we have level shifter between I/O expander and the 1831 module so that the 3.3V can be dropped down to 1.8V.
    We are using kernel 4.4.16 and the TI drivers are taken from the mainline. (we are not using backport/build utilities to generate the 5 needed drivers). Since we are using the mainline kernel we don't have compat.ko. Also we are not using DTS method instead old kernel way to pass platform data/probe the drivers.

    On board when we are loading the TI modules, no error message is seen. Hence we assume that the drivers are getting loaded successfully. But the command "ifconfig wlan0 up" return error saying the "ifconfig: SIOCGIFFLAGS: No such device"

    We observed further and saw that the below workqueue message is being generated by the kernel at regular intervals of time.
    --------
    [ 1323.517536] INFO: task kworker/2:1:31 blocked for more than 120 seconds.
    [ 1323.524249] Not tainted 4.4.16-svn180 #170-svn-r
    [ 1323.529430] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [ 1323.537271] kworker/2:1 D 80595084 0 31 2 0x00000000
    [ 1323.543713] Workqueue: events request_firmware_work_func
    [ 1323.549095] [<80595084>] (__schedule) from [<80595578>] (schedule+0x4c/0xac)
    [ 1323.556162] [<80595578>] (schedule) from [<80597d80>] (schedule_timeout+0x138/0x184)
    [ 1323.563950] [<80597d80>] (schedule_timeout) from [<80595e44>] (wait_for_common+0xb4/0x13c)
    [ 1323.572257] [<80595e44>] (wait_for_common) from [<803db894>] (mmc_wait_for_req_done+0x94/0x134)
    [ 1323.581002] [<803db894>] (mmc_wait_for_req_done) from [<803e6008>] (mmc_io_rw_extended+0x398/0x3b0)
    [ 1323.590090] [<803e6008>] (mmc_io_rw_extended) from [<803e7324>] (sdio_io_rw_ext_helper+0x1a4/0x1dc)
    [ 1323.599179] [<803e7324>] (sdio_io_rw_ext_helper) from [<803e74a8>] (sdio_memcpy_toio+0x24/0x2c)
    [ 1323.607920] [<803e74a8>] (sdio_memcpy_toio) from [<7f000318>] (wl12xx_sdio_raw_write+0x138/0x158 [wlcore_sdio])
    [ 1323.618158] [<7f000318>] (wl12xx_sdio_raw_write [wlcore_sdio]) from [<7f0b7688>] (wlcore_set_partition+0xd0/0x454 [wlcore])
    [ 1323.629410] [<7f0b7688>] (wlcore_set_partition [wlcore]) from [<7f0ab260>] (wl1271_tx_frames_pending+0x104/0x1c4 [wlcore])
    [ 1323.640576] [<7f0ab260>] (wl1271_tx_frames_pending [wlcore]) from [<7f0b218c>] (wlcore_nvs_cb+0x148/0xaa8 [wlcore])
    [ 1323.651098] [<7f0b218c>] (wlcore_nvs_cb [wlcore]) from [<80316ddc>] (request_firmware_work_func+0x30/0x58)
    [ 1323.660812] [<80316ddc>] (request_firmware_work_func) from [<80039894>] (process_one_work+0x124/0x334)
    [ 1323.670160] [<80039894>] (process_one_work) from [<80039af0>] (worker_thread+0x4c/0x47c)
    [ 1323.678298] [<80039af0>] (worker_thread) from [<8003ec2c>] (kthread+0xe0/0xf8)
    [ 1323.685542] [<8003ec2c>] (kthread) from [<8000f6b8>] (ret_from_fork+0x14/0x3c)
    ------------

    Further debugging helped us narrowed down the problem to the "BOOT_PART partition" being sent by the wlcore (during probe) using wl12xx_set_partition command. When this command is sent using mmc_io_rw_extended function call, it enters into wait_for_completion state and remains there for forever. However we do get the linux command prompt. WLAN_EN and BT_EN lines on the board are HIGH at this point of time and the irq line is LOW.

    Could you suggest how to proceed further on this?

    Also is there a way to know the state of the wl1831 module?

    Regards
    Neha.
  • Hi Saurabh


    Any suggestions??

    I am unable to get the timing diagram for command 53. Can you share the same?? Also since the problem starts in the wl12xx_power_on function, could you let me know the sequence expected by 1831 for CLK Power, WIFI_EN, Adjusting clock and bus width.

    My primary suspicion is the sequence of the above 3 commands before issuing the IO_RW_EXTENDED. Could you elaborate more on this ? or share any document which explains in detail?

    Thanks
    Neha
  • 7446.am335x-bone-e14-wl1837.dtsiNeha ,

    - please consult section 5.22 for timing characteristics  / power sequence :

    -  when you bring up wlan0 , firmware gets loaded on wl18xxmod.  make sure dts file has correct settings for wlan_en ( controlled by linux voltage regulator framework ) , sdio etc. i have attached device tree file with wl18xxmod settings for reference .

    Saurabh