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.

SDIO write command for wl1273 fails at wl12xx_set_power_on function

Other Parts Discussed in Thread: WL1271

Hi,  I'm trying to work the custom board of wl1273 and facing the issue, which is that SDIO write command fails at  wl12xx_set_power_on function.

The environment is

 - Host cpu board : am335x evm board

 - AM SDK : ti-sdk-am335x-evm-05.05.00.00

 - WLAN driver : ti-compat-wireless-wl12xx-2012-05-17-r5-18.tar.gz

 - WLAN board: using WL1273 module through MMC1 SDIO slot on am335x daughterboard 

The source file I only modified is board-am335xevm.c to work WLAN board through MMC1 SDIO.

I built the linux kernel and observed it works when SD card was inserted in MMC1 slot.

However I observed above issue while booting the kernel in case of  WLAN board inserted in MMC1 slot.

 

More detail

wlan source code on compat-wireless for linux

  wl12xx/main.c: wl12xx_set_power_on function

   wl1271_set_partition(wl, &wl12xx_part_table[PART_DOWN]);

   wl1271_set_partition()

   {

    ...

     /* write partition info to the chipset */

     wl1271_raw_write32(wl, HW_PART0_START_ADDR, p->mem.start);

     wl1271_raw_write32(wl, HW_PART0_SIZE_ADDR, p->mem.size);  <--- The error(-83) occurred this point.

     wl1271_raw_write32(wl, HW_PART1_START_ADDR, p->reg.start);

     wl1271_raw_write32(wl, HW_PART1_SIZE_ADDR, p->reg.size);

     wl1271_raw_write32(wl, HW_PART2_START_ADDR, p->mem2.start);

     wl1271_raw_write32(wl, HW_PART2_SIZE_ADDR, p->mem2.size);

     wl1271_raw_write32(wl, HW_PART3_START_ADDR, p->mem3.start);

     ...

   }

 

   wl12xx_sdio_raw_write function is called by wl1271_raw_write32.

  The error EILSEQ(-84) occurs in this function.

  However, the error does not occur in other write command.

  The followings are the value of arguments for wl1271_raw_write32 function.

   - HW_PART0_SIZE_ADDR = 0x1FFC0

   - p->mem.size = 0x000177c0

 

Can I have any suggestion?

 

Best regards,

Motoki Murooka 

  • Hi,

    Above issue has resolved.

    It was caused by hardware bug.

    But unfortunately I have faced another issue, which is that nvs file cannot be generated.

    I entered the below command.

    root@am335x-evm > rmmod wl12xx_sdio

    root@am335x-evm > calibrator plt autocalibrate wlan0 /lib/modules/3.2.0/updates/drivers/net/wireless/wl12xx/wl12xx_sdio.ko /usr/share/ti/wifi-utils/ini_files/127x/eSol_Tini_file_UW_20111028.ini /lib/firmware/ti-connectivity/wl1271-nvs.bin 00.00.00.00.00.00

    The result was below.

    ...

    [  680.937133]  r6:0001e0d0 r5:0001e078 r4:401c5248

    [  680.941955] ---[ end trace 5982eadbe60ad144 ]---

    [  680.946777] wl12xx: WARNING CONFIGURE command NOK

    [  680.951690] wl12xx: WARNING failed to set acx_event_mbox_mask: -5

    [  680.958038] wl12xx: EVENT mask setting failed

    [  680.962585] wl12xx: (MUROOKA) wl1271_boot - return(-5)

    [  680.962585]

    [  680.969635] MUROOKA: wl12xx_set_power OFF

    [  680.974822] wl12xx: ERROR firmware boot in PLT mode failed despite 3 retries Fail to set PLT power mode on

    [  681.003906] MUROOKA: wl12xx_set_power ON

    [  681.141143] MUROOKA: wl12xx_set_power OFF Calibration not complete. Removing half-baked nvs .

    root@am335x-evm >

     

    Could anyone tell me a suggestion?

    Best regards,

    Motoki Murooka

  • Hi Murooka,

    Can you please confirm that you have enabled CONFIG_NL80211_TESTMODE=y  in the kernel config?

    If not, please enable it and rebuild the uImage and use it. We need to enable this for calibration to work.

    Regards,

    Pandu.

  • Thanks for your reply.

    Yes, I configured to enable "CONFIG_NL80211_TESTMODE=y" in kernel configuration.

    At first I used am335x_evm_defconfig, after that I used menuconfig and loaded .config file generated by  am335x_evm_defconfig.

    Finally I enabled "CONFIG_NL80211_TESTMODE=y" in the configuration menu.

     

    Other information on this, it is configured a station and I confirmed that it works to connect to AP using a nvs file included in SDK root file system. 

    However, it hung up after that.

    I think wrong nvs file causes it.

    But I'm not sure.

    If any other information is needed, I can explain.

    Please suggest me.

     

    Best regards,

    Motoki Murooka

  • Hi Murooka,

    If you had used default nvs file, it should have scanned atleast few AP's whose signal is good.

    Have you performed the calibration?

    Can you please share the ini file you used for calibration?

    Are you able to scan AP's in station mode? If so, are you able to connect and ping to it?

    You can use iw tool, to do the basic scan and intiate a connection.

    For using iw please have a look at: http://processors.wiki.ti.com/index.php/OMAP_Wireless_Connectivity_NLCP_WLAN_IW_commands.

    If it works for you in Station role, you can confirm all the components are fine and should be pretty straight  to use it as a SoftAP.

    Regards,

    Pandu.

  • Sometimes it succeeds to scan AP beside it. But sometimes it hangs up before scanning.

    It is not always same phenomenon.

     

    > Have you performed the calibration?

    Yes, I tried to perform the calibration.

    However, it never succeed.

    All I did and the result  is above noted.

     

    How can I find out the cause?

    Can you suggest me something to have to do?

     

    Regards,

    Motoki.

  • Hi,

    Please let me clarify about CONFIG_NL80211_TESTMODE again.

    I checked my kernel configuration with menuconfig and editing .config file both.

    I found "CONFIG_NL80211_TESTMODE=y" in .config file when I edited .config file regardless I unchecked "cfg80211 - wireless configuration API" item.

    In that case, how will it work regarding CONFIG_NL80211_TESTMODE?

    Is it valid for CONFIG_NL80211_TESTMODE?

    Or is it invalid unless "cfg80211 - wireless configuration API" checked?

     

    And one more question.

    If I checked  "cfg80211 - wireless configuration API" and "nl80211 testmode command", I think it means "CONFIG_NL80211_TESTMODE=y", I got the below error during kernel booting then wlan0 did not appear even if I used am335x evm com6 wlan board.

    --------

    [    4.063415] cfg80211: disagrees about version of symbol wireless_send_event

    [    4.070800] cfg80211: Unknown symbol wireless_send_event (err -22)

    [    4.102447] cfg80211: disagrees about version of symbol wireless_send_event

    [    4.109802] cfg80211: Unknown symbol wireless_send_event (err -22)

    [    4.290832] alignment: ignoring faults is unsafe on this CPU.  Defaulting to fixup mode.

    --------

    In the other hand, if I unchecked  "cfg80211 - wireless configuration API", I do not get any error even if "CONFIG_NL80211_TESTMODE=y" exists in .config file.

    Please let me know what operation is correct in order to work the calibration.

    Best regards,

    Motoki