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.

wl1271 driver query

Other Parts Discussed in Thread: AM3505, WL1271

Hello TI,

We are working on AM3505 based custom board for our customer.
We are using wl1271 Wilink chipset  for wireless connectivity.

We are using linux-2.6.37-psp04.02.00.07 kernel in our system, but inbuilt kernel driver of wl1271 is not working properly. So that we decided to use compat wireless drivers for wl1271 chipset.

Please suggest latest and stable compat wireless driver version which is compatible with linux-2.6.37-psp04.02.00.07 kernel for wl1271? also let us know how we can get it?

Thanks,
Devang

  • Hi Devang,

    Please see: https://github.com/TI-ECS/build-utilites/blob/master/wl12xx_build.sh (gen_tag: "ol_R5.SP7.01"). This was verified on 3.0.8 kernel. Should work with 2.6.37 without too much problem.

    Regards,
    Gigi Joseph.

  • Hi Joseph,


    We downloaded the package and build it with our linux kernel 2.6.37 and follow the wl127x porting guide as per below link:
    http://processors.wiki.ti.com/index.php/WL127x_Porting_Guide

    But now we are facing the issue with up/down sequence.
    if we set power function of  MMC platform like

    pdata->slots[0].set_power = wl12xx_set_power;  then the mmc interface doesn't initialize in kernel.

    And if we doesn't assign this set power function to pdata->slots[0].set_power  then it's working fine one time but after down the interface we could not able to up the interface.

    Please suggest how can we resolve this issue.

    Thanks,
    Devang

  • Hi Devang,

    How about the option of using a fixed voltage regulator? What is the error you are getting when you try to define a set_power method?

    Regards,
    Gigi Joseph.

  • Hi Joseph,

    We don't have a idea on fixed voltage regulator. so that we tried with without voltage regulater.

    We didn't get any error but while inserting wl12xx_sdio we get output as below:

    [   75.568481] Compat-wireless backport release: ol_R5.SP4.01
    [   75.574554] Backport based on wl12xx.git ol_R5.SP7.01
    [   91.140167] device class 'ieee80211': registering
    [   91.141998] Registering platform device 'regulatory.0'. Parent at platform
    [   91.142028] device: 'regulatory.0': device_add
    [   91.142150] bus: 'platform': add device regulatory.0
    [   91.142822] PM: Adding info for platform:regulatory.0
    [   91.144378] cfg80211: Calling CRDA to update world regulatory domain
    [  122.781005] wl12xx: driver version: ol_R5.SP7.01
    [  122.786041] wl12xx: compilation time: Fri Nov  7 18:00:28 2014
    [  122.792266] bus: 'platform': add driver wl12xx_driver
    [  127.251159] bus: 'sdio': add driver wl1271_sdio

    Also we couldn't get below prints while boot the kernel:

    mmc1: card claims to support voltages below the defined range. These will be ignored.
    mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
    mmc1: new SDIO card at address 0001

    Thanks,
    Devang

  • Hi Joseph,

    Can you please help us to implement fixed voltage regulator for controling WLAN_EN gpio in Am3505? We are using GPIO 136 as WLAN_EN.

    It will be great if you can help us to resolve above issue why MMC inteface is not initializing after register the wl12xx_set_power function?

    If we aren't register the power function then MMC can initialize successfully.

    Thanks,
    Devang

  • Hi Devang,

    Q. Can you please help us to implement fixed voltage regulator for controling WLAN_EN gpio in Am3505? We are using GPIO 136 as WLAN_EN.

    A.
    It is explained in: http://processors.wiki.ti.com/index.php/WL127x_Porting_Guide#Power_Control_.E2.80.93_using_a_fixed_voltage_regulator

    Q. It will be great if you can help us to resolve above issue why MMC inteface is not initializing after register the wl12xx_set_power function?

    If we aren't register the power function then MMC can initialize successfully.

    A. Without the register power control function, if you can init MMC, this means somebody is setting the WLAN_EN high. How does this happen? With the set_power function, do you see the code flow entering the set_power method?


    Regards,
    Gigi Joseph.

  • Hi Joseph,

    Thanks for your support, now we are able to up down the WLAN interface.

    But we are facing issue with calibration. While calibration we are getting below error:
    [   62.386016] wl1271_sdio: probe of mmc1:0001:2 failed with error -110
    Fail to set PLT power mode on
    Calibration not complete. Removing half-baked nvs

    Please suggest.

    Thanks,
    Devang

  • Hi Devang,

    error -110 indicates a timeout on the SDIO bus - the chip might not be powered on. Please confirm if you are seeing the error code during boot up? How about the calibration after wlan0 up & down.

    Regards,
    Gigi Joseph.

  • Hi Joseph,

    No, we are seeing this error if we insmod wl12xx_sdio.ko and rmmod wl12xx_sdio and then after we calibrate.

    If we calibrate before insmod and rmmod wl12xx_sdio then we can calibrate it successfully.

    Thanks,
    Devang

  • Hi Devang,

    Can you share the complete boot logs for a successful case, and an unsuccessful case?

    Regards,
    Gigi Joseph.

  • Hi Joseph,

    Please find attached working and not working logs as you required.

    Arago Project http://arago-project.org am3517-evm ttyO2
    
    Arago 2009.11 am3517-evm ttyO2
    
    am3517-evm login: root
    root@am3517-evm:~#
    root@am3517-evm:~#
    root@am3517-evm:~# insmod /lib/modules/2.6.37liveu_010/
    root@am3517-evm:~# insmod /lib/modules/2.6.37liveu_010/updates/compat/compat.ko
    [   78.941467] Compat-wireless backport release: ol_R5.SP4.01
    [   78.947509] Backport based on wl12xx.git ol_R5.SP7.01
    root@am3517-evm:~#
    root@am3517-evm:~# insmod /lib/modules/2.6.37liveu_010/updates/net/wireless/cfg80211.ko
    [   85.692871] cfg80211: Calling CRDA to update world regulatory domain
    root@am3517-evm:~#
    root@am3517-evm:~# insmod /lib/modules/2.6.37liveu_010/updates/net/mac80211/mac80211.ko
    root@am3517-evm:~#
    root@am3517-evm:~#
    root@am3517-evm:~#
    root@am3517-evm:~# insmod /lib/modules/2.6.37liveu_010/updates/drivers/net/wireless/wl12xx/wl12xx.ko
    [  105.580017] wl12xx: driver version: ol_R5.SP7.01
    [  105.585083] wl12xx: compilation time: Tue Nov 11 23:33:12 2014
    root@am3517-evm:~#
    root@am3517-evm:~#
    root@am3517-evm:~#
    root@am3517-evm:~# calibrator plt autocalibrate wlan0 /lib/modules/2.6.37liveu_0
    10/updates/drivers/net/wireless/wl12xx/wl12xx_sdio.ko /home/wifi_testing/pre-com
    piled_bin/ini/TQS_S_2.6.ini /lib/firmware/ti-connectivity/wl1271-nvs.bin 00:00:0
    0:00:00:00
    [  249.715698] Powering on wl12xxPowering off wl12xx
    [  250.176574] wl12xx: loaded
    [  250.203094] wl12xx: power up
    [  250.235900] Powering on wl12xx
    [  251.211669] wl12xx: firmware booted in PLT mode (PLT 6.3.5.0.98)Using nvs version 2.1
    Calibrate /lib/firmware/ti-connectivity/wl1271-nvs.bin
    Writing calibration data to /lib/firmware/ti-connectivity/wl1271-nvs.bin
    Writing mac address 00:00:00:00:00:00 to file /lib/firmware/ti-connectivity/wl1271-nvs.bin
    [  251.440032] wl12xx: power down
    [  251.447082] Powering off wl12xx
    Calibration done. FEM1 has 1 bands. AutoFEM is off. Resulting nvs is /lib/firmware/ti-connectivity/wl1271-nvs.bin
    root@am3517-evm:~#
    root@am3517-evm:~#
    root@am3517-evm:~#
    root@am3517-evm:~# insmod /lib/modules/2.6.37liveu_010/updates/drivers/net/wireless/wl12xx/wl12xx_sdio.ko
    [  389.042266] wl1271_sdio: probe of mmc1:0001:2 failed with error -110
    root@am3517-evm:~#
    root@am3517-evm:~#
    root@am3517-evm:~#

    Arago Project http://arago-project.org am3517-evm ttyO2
    
    Arago 2009.11 am3517-evm ttyO2
    
    am3517-evm login: root
    root@am3517-evm:~#
    root@am3517-evm:~#
    root@am3517-evm:/# insmod /lib/modules/2.6.37liveu_010/updates/compat/compat.ko
    [  328.916687] Compat-wireless backport release: ol_R5.SP4.01
    [  328.923034] Backport based on wl12xx.git ol_R5.SP7.01
    root@am3517-evm:/#
    root@am3517-evm:/# insmod /lib/modules/2.6.37liveu_010/updates/net/wireless/cfg8
    0211.ko
    [  340.260314] cfg80211: Calling CRDA to update world regulatory domain
    root@am3517-evm:/#
    root@am3517-evm:/# insmod /lib/modules/2.6.37liveu_010/updates/net/mac80211/mac8
    0211.ko
    root@am3517-evm:/#
    root@am3517-evm:/# insmod /lib/modules/2.6.37liveu_010/updates/drivers/net/wirel
    ess/wl12xx/wl12xx.ko
    [  366.563140] wl12xx: driver version: ol_R5.SP7.01
    [  366.568145] wl12xx: compilation time: Tue Nov 11 23:33:12 2014
    root@am3517-evm:/#
    root@am3517-evm:/#
    root@am3517-evm:/#
    root@am3517-evm:/# insmod /lib/modules/2.6.37liveu_010/updates/drivers/net/wirel
    ess/wl12xx/wl12xx_sdio.ko
    [  375.005187] Powering on wl12xxPowering off wl12xx
    [  375.442352] wl12xx: loaded
    root@am3517-evm:/#
    root@am3517-evm:/# [  376.446990] udev: renamed network interface wlan0 to wlan2
    root@am3517-evm:/# rmmod wl12xx_sdio
    root@am3517-evm:/#
    root@am3517-evm:/#
    root@am3517-evm:/# rm lib/firmware/ti-connectivity/wl1271-nvs.bin
    root@am3517-evm:/#
    root@am3517-evm:/#
    root@am3517-evm:/# calibrator plt autocalibrate wlan0 /lib/modules/2.6.37liveu_0
    10/updates/drivers/net/wireless/wl12xx/wl12xx_sdio.ko /home/wifi_testing/pre-com
    piled_bin/ini/TQS_S_2.6.ini /lib/firmware/ti-connectivity/wl1271-nvs.bin 00:00:0
    0:00:00:00
    [  407.288238] wl1271_sdio: probe of mmc1:0001:2 failed with error -110
    Fail to set PLT power mode on
    Calibration not complete. Removing half-baked nvs

    Actually we are facing this issue because of  insmod wl12xx_sdio and rmmod wl12xx_sdio is only working one time. after if we are trying to insmod the wl12xx_sdio .ko then it's not working.

    Can you please suggest what is the issue?

    Thanks,
    Devang.

  • Hi Joseph,

    Please let me know if you have any query.

    Thanks,
    Devang

  • Hi joseph,

    Thanks for your support. we are able to resolve the issue. now we can do insmod and rmmod  wl12xx_sdio successfully in our kernel.

    Thnaks & regards,
    Devang

  • Hi Devang,

    Thanks for the update.
    Can you let me know what the issue was, so I can close this thread?

    Regards,
    Gigi Joseph.

  • Hi Joseph,

    The issue is  kernel 2.6.37 has the bug in SDIO bus driver, it will return error when wl12xx_sdio module call the probe of SDIO bus.

    Thanks,
    Devang.

  • Hi Joseph,


    We have some query regarding wl12xx driver you suggested("ol_R5.SP7.01").

    1. Is this support with multi-role support? if yes then how can we enable multi-role support of wl12xx from driver?
    2. Is this support Bluetooth as well? if yes how can we compile bluetooth modules for wl12xx?

    Please suggest.

    Thanks,
    Devang.

  • Hi Devang,

    1. Yes, multirole is supported on R5.SP7 release. Please see the multirole demo guide at: http://processors.wiki.ti.com/index.php/OMAP_Wireless_Connectivity_NLCP_Multi_Role_Configuration

    2. Bluetooth needs to be built independently. Please see the bluetooth build script at: https://github.com/TI-ECS/build-utilites/blob/master/wl12xx_build_bt.sh

    Regards,
    Gigi Joseph.

  • Hi Joseph,

    Could you please suggest latest driver version for bluetooth for wl12xx chipset?

    Thanks,
    Devang

  • Hi Devang,

    It is part of the kernel mainline - CONFIG_TI_STCONFIG_BT_WILINK

    Regards,
    Gigi Joseph.