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: ERROR sdio read failed (-110)

Other Parts Discussed in Thread: WL1271, DM385, TSC2004

Hi,

I am using WL1271 with DM385 in custom board.

For calibration on WL1271 i am using following link

http://processors.wiki.ti.com/index.php/WL12xx_NLCP_Calibration_Proccess#Performing_the_First_Calibration

when i execute 

calibrator plt calibrate

I get following error messages

wl1271: power up
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-22)
wl1271: ERROR sdio read failed (-110)
wl1271: WARNING unsupported chip id: 0x1
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-22)
wl1271: ERROR sdio read failed (-110)
wl1271: WARNING unsupported chip id: 0x1
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-110)
wl1271: ERROR sdio write failed (-22)
wl1271: ERROR sdio read failed (-110)
wl1271: WARNING unsupported chip id: 0x1
wl1271: ERROR firmware boot in PLT mode failed despite 3 retries
Fail to set PLT power mode on
command failed: No such device (-19)

following is boot logs
-------------------------------------------------------------------------------------------------------------------------------------------------------

Machine: dm385ipnc
vram size = 4194304 at 0x0
ti81xx_reserve: ### Reserved DDR region @84f00000
reserved size = 4194304 at 0x0
FB: Reserving 4194304 bytes SDRAM for VRAM
Memory policy: ECC disabled, Data cache writeback
OMAP chip is DM385 1.0
SRAM: Mapped pa 0x402f1000 to va 0xfe400000 size: 0xf000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 19040
Kernel command line: console=ttyO0,115200n8 noinitrd mem=80M rootwait vram=4M notifyk.vpssm3_sva=0xBFD00000 root=/dev/mmcblk0p2 rw eth=00:0C:0C:02:30:FB ip=192.168.0.1 cmemk.phys_start=0x85000000 cmemk.phys_end=0x89000000 cmemk.allowOverlap=1 earlyprintk;boot
cpsw: kernel boot params Ethernet address: 00:0C:0C:02:30:FB
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 74MB 1MB = 75MB total
Memory: 70648k/70648k available, 11272k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xc5800000 - 0xf8000000   ( 808 MB)
    lowmem  : 0xc0000000 - 0xc5000000   (  80 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .init : 0xc0008000 - 0xc003f000   ( 220 kB)
      .text : 0xc003f000 - 0xc04c1000   (4616 kB)
      .data : 0xc04c2000 - 0xc0502a00   ( 259 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:375
IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
Total of 128 interrupts on 1 active controller
GPMC revision 6.0
Trying to install interrupt handler for IRQ368
Trying to install interrupt handler for IRQ369
Trying to install interrupt handler for IRQ370
Trying to install interrupt handler for IRQ371
Trying to install interrupt handler for IRQ372
Trying to install interrupt handler for IRQ373
Trying to install interrupt handler for IRQ374
Trying to install type control for IRQ375
Trying to set irq flags for IRQ375
OMAP clockevent source: GPTIMER1 at 20000000 Hz
Console: colour dummy device 80x30
Calibrating delay loop... 599.65 BogoMIPS (lpj=2998272)
pid_max: default: 32768 minimum: 301
Security Framework initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
devtmpfs: initialized
TI81XX: Map 0x84f00000 to 0xfe500000 for dram barrier
TI81XX: Map 0x40300000 to 0xfe600000 for sram barrier
omap_voltage_early_init: voltage driver support not added
regulator: core version 0.5
regulator: dummy:
NET: Registered protocol family 16
omap_voltage_domain_lookup: Voltage driver init not yet happened.Faulting!
omap_voltage_add_dev: VDD specified does not exist!
OMAP GPIO hardware version 0.1
OMAP GPIO hardware version 0.1
OMAP GPIO hardware version 0.1
OMAP GPIO hardware version 0.1
omap_mux_init: Add partition: #1: core, flags: 4
_omap_mux_get_by_name: Multiple signal paths (2) for gpio3_0
Cannot clk_get ck_32
Debugfs: Only enabling/disabling deep sleep and wakeup timer is supported now
registered ti81xx_vpss device
registered ti81xx_vidout device
registered ti81xx on-chip HDMI device
registered ti81xx_fb device
PWM0 init success.
PWM1 init success.
bio: create slab <bio-0> at 0
SCSI subsystem initialized
omap_i2c omap_i2c.1: bus 1 rev4.0 at 100 kHz
Advanced Linux Sound Architecture Driver Version 1.0.23.
Switching to clocksource gp timer
musb-hdrc: version 6.0, peripheral, debug=0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
PMU: registered new PMU device of type 0
omap-iommu omap-iommu.0: ducati registered
omap-iommu omap-iommu.1: sys registered
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 137
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
CMEMK module: built on Jul 15 2014 at 14:12:38
  Reference Linux version 2.6.37
  File IPNC_RDK/Source/ti_tools/linuxutils_3_23_00_01/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
allocated heap buffer 0xc7000000 of size 0x4000000
cmemk initialized
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
omap_uart.0: ttyO0 at MMIO 0x48020000 (irq = 72) is a OMAP UART0
console [ttyO0] enabled
omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
brd: module loaded
loop: module loaded
omap2-nand driver initializing
ONFI param page 0 valid
ONFI flash detected
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron NAND 512MiB 3,3V 8-bit)
omap2-nand: detected x8 NAND flash
Creating 8 MTD partitions on "omap2-nand.0":
0x000000000000-0x000000020000 : "U-Boot-min"
0x000000020000-0x000000260000 : "U-Boot"
0x000000260000-0x000000280000 : "U-Boot Env"
0x000000280000-0x0000006c0000 : "Kernel"
0x0000006c0000-0x000006fc0000 : "File System"
0x000006fc0000-0x000007bc0000 : "Data"
0x000007bc0000-0x00000b0c0000 : "File System2"
0x00000b0c0000-0x000020000000 : "Reserved"
davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
davinci_mdio davinci_mdio.0: no live phy, scanning all
davinci_mdio: probe of davinci_mdio.0 failed with error -5
mice: PS/2 mouse device common for all mice
omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
i2c /dev entries driver
Linux video capture interface: v2.00
bq27x00-battery 1-0055: support ver. 1.1.0 enabled
lm75 1-0048: hwmon0: sensor 'tmp75'
lm75 1-0049: hwmon1: sensor 'tmp75'
OMAP Watchdog Timer Rev 0x00: initial timeout 60 sec
cpuidle: using governor ladder
cpuidle: using governor menu
mmc 1 res_start = 481d8100
mmc 2 res_start = 47810100
notify_shm_drv: no DSP present (MULTIPROC_INVALIDID)
notify_init : notify drivercreated  for  remote proc id 1 at physical Address 0xbfd00000
asoc: tlv320aic3x-hifi <-> davinci-mcasp.0 mapping ok
ALSA device list:
  #0: TI81XX EVM
nf_conntrack version 0.5.0 (1103 buckets, 4412 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 17
Bridge firewalling registered
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
omap_voltage_late_init: Voltage driver support not added
Power Management for TI81XX.
Detected MACID=0:c:c:2:30:fb
omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
bq27x00-battery 1-0055: error reading current
bq27x00-battery 1-0055: error reading relative State-of-Charge
bq27x00-battery 1-0055: error reading temperature
bq27x00-battery 1-0055: error reading register 16
power_supply bq27200-0: driver failed to report `time_to_empty_now' property
mmc0: new SDHC card at address e624
mmcblk0: mmc0:e624 SU04G 3.69 GiB
 mmcblk0: p1 p2
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
PHY 0:00 not found
PHY 0:01 not found
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
     device=eth0, addr=192.168.0.1, mask=255.255.255.0, gw=255.255.255.255,
     host=192.168.0.1, domain=, nis-domain=(none),
     bootserver=255.255.255.255, rootserver=255.255.255.255, rootpath=
EXT3-fs: barriers not enabled
kjournald starting.  Commit interval 5 seconds
EXT3-fs (mmcblk0p2): warning: maximal mount count reached, running e2fsck is recommended
EXT3-fs (mmcblk0p2): using internal journal
EXT3-fs (mmcblk0p2): mounted filesystem with writeback data mode
VFS: Mounted root (ext3 filesystem) on device 179:2.
devtmpfs: mounted
Freeing init memory: 220K
INIT: version 2.86 booting
Please wait: booting...
Starting udev
bq27x00-battery 1-0055: error reading flags
power_supply bq27200-0: driver failed to report `status' property
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: World regulatory domain updated:
    (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
wl1271: loaded
wl1271: initialized
Remounting root file system...
Caching udev devnodes
root: mount: mounting /dev/root on / failed: No such file or directory
Configuring network interfaces... done.
Setting up IP spoofing protection: rp_filter.
rm: cannot remove '/tmp': Device or resource busy
Fri Nov  9 12:48:00 GMT-8 2012
 inside finish.sh
UBI: attaching mtd5 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: max. sequence number:       257
UBI: attached mtd5 to ubi0
UBI: MTD device name:            "Data"
UBI: MTD device size:            12 MiB
UBI: number of good PEBs:        96
UBI: number of bad PEBs:         0
UBI: number of corrupted PEBs:   0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 96
UBI: number of PEBs reserved for bad PEB handling: 2
UBI: max/mean erase counter: 6/3
UBI: image sequence number:  1880419828
UBI: background thread "ubi_bgt0d" started, PID 320
UBI device number 0, total 96 LEBs (12189696 bytes, 11.6 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 0, name "ubifs_volume"
UBIFS: file system size:   10285056 bytes (10044 KiB, 9 MiB, 81 LEBs)
UBIFS: journal size:       1015809 bytes (992 KiB, 0 MiB, 6 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  485787 bytes (474 KiB)
UBI: attaching mtd7 to ubi1
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: max. sequence number:       112
UBI: attached mtd7 to ubi1
UBI: MTD device name:            "Reserved"
UBI: MTD device size:            335 MiB
UBI: number of good PEBs:        2682
UBI: number of bad PEBs:         0
UBI: number of corrupted PEBs:   0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 2682
UBI: number of PEBs reserved for bad PEB handling: 26
UBI: max/mean erase counter: 2/1
UBI: image sequence number:  779966503
UBI: background thread "ubi_bgt1d" started, PID 332
UBI device number 1, total 2682 LEBs (340549632 bytes, 324.8 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 1, volume 0, name "ubifs_volume"
UBIFS: file system size:   335089664 bytes (327236 KiB, 319 MiB, 2639 LEBs)
UBIFS: journal size:       16760832 bytes (16368 KiB, 15 MiB, 132 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  4952683 bytes (4836 KiB)
INIT: Entering runlevel: 5
Starting telnet daemon.
Starting syslogd/klogd: done

  • Hi,

    Do you see this error only during calibration, or you see it even when turning on WLAN? Can you share the lsmod details?

    Also, please check the below link and confirm if you have all the required changes in your board file
    http://processors.wiki.ti.com/index.php/WL127x_Porting_Guide

    Regards,
    Gigi Joseph.

  • Hi Gigi,


    I also face this error when i execute bellow command

    ifconfig wlan0 hw ether 00:80:48:BA:d1:30 up


    bellow is output of lsmod command

    root@dm814x-evm:~# lsmod
    Module                  Size  Used by
    wl1271_sdio             2748  0
    wl1271                 88156  1 wl1271_sdio
    mac80211              147225  2 wl1271_sdio,wl1271
    cfg80211              123001  2 wl1271,mac80211

    I already refereed mentioned link, and have changes in board file according it.

  • Hi,

    Can you please also confirm if you are using the latest wl12xx driver/firmwares? 
    The latest release is "ol_R5.SP7.01"

    Regards,
    Gigi Joseph.

  • Hi Gigi,

    I am not able to find wl12xx driver/firmwares version but I am using firmware come along with IPNC_RDK.3.8

  • Hi,

    You can identify the driver/firmware release by following the below instructions
    http://processors.wiki.ti.com/index.php/WL12xx_NLCP_Driver_Debug

    Please ensure that you are using the latest release...

    Regards,
    Gigi Joseph.

  • Hi Gigi,

    I have build wl12xx driver with reference to following link

    http://processors.wiki.ti.com/index.php/WL12xx_NLCP_Build_Instructions

    After successful compilation when i boot my board with new wl12xx driver/firmware i get following boot logs

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

    Compat-wireless backport release: ol_R5.SP7.01
    Backport based on wl12xx.git ol_R5.SP4.01-2-g1aa2c8e
    cfg80211: Calling CRDA to update world regulatory domain
    wl12xx: driver version: ol_R5.SP4.01-2-g1aa2c8e
    wl12xx: compilation time: Wed Jul 23 19:57:50 2014
    cfg80211: World regulatory domain updated:
    cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    ------------[ cut here ]------------
    WARNING: at /wl12xx_firmware/new/wl1271_new/compat-wireless/drivers/net/wireless/wl12xx/sdio.c:126 wl12xx_sdio_raw_write+0xb8/0xe0 [wl12xx_sdio]()
    Modules linked in: wl12xx(+) mac80211 cfg80211 compat wl12xx_sdio
    Backtrace:
    [<c004cf70>] (dump_backtrace+0x0/0x110) from [<c038ffb4>] (dump_stack+0x18/0x1c)
     r6:bf000674 r5:0000007e r4:00000000 r3:60000013
    [<c038ff9c>] (dump_stack+0x0/0x1c) from [<c00718e4>] (warn_slowpath_common+0x54/0x6c)
    [<c0071890>] (warn_slowpath_common+0x0/0x6c) from [<c0071920>] (warn_slowpath_null+0x24/0x2c)
     r8:00000004 r7:c3c69140 r6:c3cebc08 r5:0001ffc4 r4:c46eb800
    r3:00000009
    [<c00718fc>] (warn_slowpath_null+0x0/0x2c) from [<bf000248>] (wl12xx_sdio_raw_write+0xb8/0xe0 [wl12xx_sdio])
    [<bf000190>] (wl12xx_sdio_raw_write+0x0/0xe0 [wl12xx_sdio]) from [<bf0afe10>] (wl1271_set_partition+0xe8/0x3f4 [wl12xx])
    [<bf0afd28>] (wl1271_set_partition+0x0/0x3f4 [wl12xx]) from [<bf0a71a8>] (wl12xx_set_power_on+0x7c/0x14c [wl12xx])
     r7:c3c29e00 r6:00000001 r5:00000000 r4:c3c79660
    [<bf0a712c>] (wl12xx_set_power_on+0x0/0x14c [wl12xx]) from [<bf0c0f8c>] (wl12xx_probe+0xa30/0x1218 [wl12xx])
     r5:c3c79de4 r4:c3c79660
    [<bf0c055c>] (wl12xx_probe+0x0/0x1218 [wl12xx]) from [<c021862c>] (platform_drv_probe+0x1c/0x20)
    [<c0218610>] (platform_drv_probe+0x0/0x20) from [<c021769c>] (driver_probe_device+0xd0/0x18c)
    [<c02175cc>] (driver_probe_device+0x0/0x18c) from [<c02177c0>] (__driver_attach+0x68/0x8c)
     r7:00000000 r6:bf0cbea0 r5:c3cebc3c r4:c3cebc08
    [<c0217758>] (__driver_attach+0x0/0x8c) from [<c0216834>] (bus_for_each_dev+0x58/0x88)
     r6:c0217758 r5:c3d3fe10 r4:bf0cbea0 r3:c441ecb4
    [<c02167dc>] (bus_for_each_dev+0x0/0x88) from [<c0217334>] (driver_attach+0x20/0x28)
     r7:00000000 r6:c04f0bc8 r5:c3ead500 r4:bf0cbea0
    [<c0217314>] (driver_attach+0x0/0x28) from [<c0216f38>] (bus_add_driver+0xb4/0x230)
    [<c0216e84>] (bus_add_driver+0x0/0x230) from [<c0217a1c>] (driver_register+0xb0/0x134)
    [<c021796c>] (driver_register+0x0/0x134) from [<c0218ae8>] (platform_driver_register+0x4c/0x60)
    [<c0218a9c>] (platform_driver_register+0x0/0x60) from [<bf0d502c>] (wl12xx_init+0x2c/0x44 [wl12xx])
    [<bf0d5000>] (wl12xx_init+0x0/0x44 [wl12xx]) from [<c003f4f8>] (do_one_initcall+0xbc/0x190)
    [<c003f43c>] (do_one_initcall+0x0/0x190) from [<c009c3d8>] (sys_init_module+0x1668/0x1830)
     r8:00000001 r7:c3c7ee80 r6:00000001 r5:00000000 r4:bf0cc040
    [<c009ad70>] (sys_init_module+0x0/0x1830) from [<c00493c0>] (ret_fast_syscall+0x0/0x30)
    ---[ end trace 43c172a91188eeaa ]---
    wl1271_sdio mmc1:0001:2: sdio write failed (-110)
    wl12xx: ERROR couldn't get hw info
    wl12xx_driver: probe of wl12xx failed with error -110
    ------------------------------------------------------------------------------------------------------------------------------------------------------------

    Message shows driver version ol_R5.SP4.01

  • Hi,

    ol_R5.SP4.01 is not the latest, but it should work.
    Can you check if the connection and all is fine? Can you share your board file?

    Regards,
    Gigi Joseph.

  • Hi Gigi,

    My board file contains following code for wl1271 configuration.

    static struct omap2_hsmmc_info mmc[] = {
            {
                .mmc        = 2,
                .caps       = MMC_CAP_4_BIT_DATA | MMC_CAP_NEEDS_POLL,
                .gpio_cd    = -EINVAL, /* Dedicated pins for CD and WP */
                .gpio_wp    = -EINVAL,
                .ocr_mask   = MMC_VDD_33_34,
            },
            {
    #define GPIO_WLAN_EN    ((1 * 32) + 30)
    #define GPIO_WLAN_IRQ    ((1 * 32) + 25)
                .mmc        = 3,
                .name       = "wl1271",
                .caps       = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
                .gpio_cd    = -EINVAL,
                .gpio_wp    = -EINVAL,
                //.ocr_mask     = MMC_VDD_165_195,
                .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
                //.pm_caps = MMC_PM_KEEP_POWER,
                .nonremovable   = true,
            },
            {}
    };

    static struct wl12xx_platform_data wlan_data __initdata = {
        .irq = OMAP_GPIO_IRQ(GPIO_WLAN_IRQ),
        /* COM6 (127x) uses FREF */
        .board_ref_clock = WL12XX_REFCLOCK_38,
        .platform_quirks = WL12XX_PLATFORM_QUIRK_EDGE_IRQ,
    };

    static int wl12xx_set_power(struct device *dev, int slot, int power_on,
                    int vdd)
    {
        static bool power_state;

        pr_debug("Powering %s wl12xx", power_on ? "on" : "off");

        if (power_on == power_state)
            return 0;
        power_state = power_on;

        if (power_on) {
            /* Power up sequence required for wl127x devices */
            gpio_set_value(GPIO_WLAN_EN, 1);
            usleep_range(15000, 15000);
            gpio_set_value(GPIO_WLAN_EN, 0);
            usleep_range(1000, 1000);
            gpio_set_value(GPIO_WLAN_EN, 1);
            msleep(70);
        } else {
            gpio_set_value(GPIO_WLAN_EN, 0);
        }

        return 0;
    }

    static void __init ti814x_wl12xx_wlan_init(void)
    {

        struct device *dev;
        struct omap_mmc_platform_data *pdata;
        int ret;


        omap_mux_init_signal("mmc2_clk",  TI814X_INPUT_EN | TI814X_PULL_UP);
        omap_mux_init_signal("mmc2_cmd",  TI814X_INPUT_EN | TI814X_PULL_UP);
        omap_mux_init_signal("mmc2_dat0", TI814X_INPUT_EN | TI814X_PULL_UP);
        omap_mux_init_signal("mmc2_dat1", TI814X_INPUT_EN | TI814X_PULL_UP);
        omap_mux_init_signal("mmc2_dat2", TI814X_INPUT_EN | TI814X_PULL_UP);
        omap_mux_init_signal("mmc2_dat3", TI814X_INPUT_EN | TI814X_PULL_UP);
        omap_writel(0x00050040, 0x48140920);    /*PINCNTL73  - MMC2_SDCD*/


            /* Set up the WLAN_EN and WLAN_IRQ muxes */
            //gpio1_15_mux1 is good for application daughter board
            omap_mux_init_signal("gpio1_30", TI814X_INPUT_EN | TI814X_PIN_OUTPUT_PULL_UP);
            //omap_mux_init_signal("gpio1_30", TI814X_PULL_DIS);

        /* Pass the wl12xx platform data information to the wl12xx driver */
        if (wl12xx_set_platform_data(&wlan_data)) {
            pr_err("Error setting wl12xx data\n");
            return;
        }


        /*
         * The WLAN_EN gpio has to be toggled without using a fixed regulator,
         * as the omap_hsmmc does not enable/disable regulators on the TI814X.
         */

        ret = gpio_request_one(GPIO_WLAN_EN, GPIOF_OUT_INIT_LOW, "wlan_en");
        if (ret) {
            pr_err("Error requesting wlan enable gpio: %d\n", ret);
            return;
        }

        /*
         * Set our set_power callback function which will be called from
         * set_ios. This is requireq since, unlike other omap2+ platforms, a
         * no-op set_power function is registered. Thus, we cannot use a fixed
         * regulator, as it will never be toggled.
         * Moreover, even if this was not the case, we're on mmc0, for which
         * omap_hsmmc' set_power functions do not toggle any regulators.
         * TODO: Consider modifying omap_hsmmc so it would enable/disable a
         * regulator for ti814x/mmc0.
         */
        dev = mmc[1].dev;
        if (!dev) {
            pr_err("wl12xx mmc device initialization failed\n");
            return;
        }

        pdata = dev->platform_data;
        if (!pdata) {
            pr_err("Platform data of wl12xx device not set\n");
            return;
        }

        pdata->slots[0].set_power = wl12xx_set_power;
    }

    static void __init ti814x_wl12xx_init(void)
    {
        ti814x_wl12xx_wlan_init();
    }

    static void __init dm385_evm_init(void)
    {
        int bw; /* bus-width */

        ti814x_mux_init(board_mux);
        omap_serial_init();
        omap_mux_init_signal("gpio1_10_mux0", TI814X_PIN_INPUT_PULL_UP );   /* PENIRQ# GP1[10] , PULL UP , Dir = INPUT */
        ti814x_evm_i2c_init();

    omap2_hsmmc_init(mmc);

    //UART1 Pinmux
        omap_mux_init_signal("uart0_rin.uart1_rxd_mux0", TI814X_PIN_INPUT_PULL_UP);
        omap_mux_init_signal("uart0_dtrn.uart1_txd_mux0", TI814X_PIN_OUTPUT_PULL_UP);

    /* nand initialisation */
    board_nand_init(ti814x_nand_partitions,
    ARRAY_SIZE(ti814x_nand_partitions), 0, NAND_OMAP_BUS_8);

    ti814x_wl12xx_init();

    #ifdef CONFIG_SND_SOC_TI81XX_HDMI
        /* hdmi mclk setup */
        ti813x_hdmi_clk_init();
        platform_add_devices(dm385_devices, ARRAY_SIZE(dm385_devices));
    #endif

        regulator_use_dummy_regulator();
    }

  • Hi Gigi,

    There is connection problem on SDIO line which resolves above issue. Now I am able to calibrate and also able turn on wlan interface by

    ifconfig wlan0 up

    But when i try to connect it Access point by wpa_supplicant i get following messages

    wpa_supplicant -P/var/run/wpa_supplicant.pid -d -Dnl80211 -c/etc/wpa_supplicant.conf -iwlan0 -B


    wpa_supplicant v2.0-devel-ol_R5.SP7.01
    random: Trying to read entropy from /dev/random
    Successfully initialized wpa_supplicant
    Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'
    Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
    Reading configuration file '/etc/wpa_supplicant.conf'
    ctrl_interface='/var/run/wpa_supplicant'
    eapol_version=1
    update_config=1
    Priority group 0
       id=0 ssid='e-infochip'
    nl80211: interface wlan0 in phy wl12xx: state: 0
    phy0
    rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
    nl80211: Set mode ifindex 3 iftype 2 (STATION)
    nl80211: Subscribe to mgmt frames with non-AP handle 0x14fcb0
    nl80211: Register frame type=0xd0 nl_handle=0x14fcb0
    nl80211: Register frame match - hexdump(len=2): 04 0a
    nl80211: Register frame type=0xd0 nl_handle=0x14fcb0
    nl80211: Register frame match - hexdump(len=2): 04 0b
    nl80211: Register frame type=0xd0 nl_handle=0x14fcb0
    nl80211: Register frame match - hexdump(len=2): 04 0c
    nl80211: Register frame type=0xd0 nl_handle=0x14fcb0
    nl80211: Register frame match - hexdump(len=2): 04 0d
    nl80211: Register frame type=0xd0 nl_handle=0x14fcb0
    nl80211: Register frame match - hexdump(len=6): 04 09 50 6f 9a 09
    nl80211: Register frame type=0xd0 nl_handle=0x14fcb0
    nl80211: Register frame match - hexdump(len=5): 7f 50 6f 9a 09
    nl80211: Register frame type=0xd0 nl_handle=0x14fcb0
    nl80211: Register frame match - hexdump(len=1): 06
    nl80211: Register frame type=0xd0 nl_handle=0x14fcb0
    nl80211: Register frame match - hexdump(len=2): 0a 07
    nl80211: Set TX rates failed: ret=-100 (Network is down)
    wl12xx: firmware booted (Rev 6.3.8.0.111)
    netlink: Operstate: linkmode=1, operstate=5
    nl80211: Using driver-based off-channel TX
    nl80211: Supports Probe Response offload in AP mode
    nl80211: driver param='(null)'
    nl80211: Regulatory information - country=00
    nl80211: 2402-2472 @ 40 MHz
    nl80211: 2457-2482 @ 20 MHz
    nl80211: 2474-2494 @ 20 MHz
    nl80211: 5170-5250 @ 40 MHz
    nl80211: 5735-5835 @ 40 MHz
    wlan0: Own MAC address: 00:0c:0c:a0:06:4c
    wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
    wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
    wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
    wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
    wlan0: RSN: flushing PMKID list in the driver
    nl80211: Flush PMKIDs
    WPS: Set UUID for interface wlan0
    WPS: UUID based on MAC address - hexdump(len=16): db b0 04 3b 87 76 52 7a a1 e7 b1 c8 b1 ff 85 52
    EAPOL: SUPP_PAE entering state DISCONNECTED
    EAPOL: Supplicant port status: Unauthorized
    EAPOL: KEY_RX entering state NO_KEY_RECEIVE
    EAPOL: SUPP_BE entering state INITIALIZE
    EAP: EAP entering state DISABLED
    EAPOL: Supplicant port status: Unauthorized
    EAPOL: Supplicant port status: Unauthorized
    P2P: Own listen channel: 1
    P2P: Random operating channel: 81:6
    P2P: Add operating class 81
    P2P: Channels - hexdump(len=11): 01 02 03 04 05 06 07 08 09 0a 0b
    wlan0: Added interface wlan0
    wlan0: State: DISCONNECTED -> DISCONNECTED
    wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
    netlink: Operstate: linkmode=-1, operstate=5
    Daemonize..
    root@dm814x-evm:~# wl12xx: ERROR ELP wakeup timeout!
    ------------[ cut here ]------------
    WARNING: at /home/chetan/MyLan/wavu/wl12xx_firmware/new/wl1271_new/compat-wireless/drivers/net/wireless/wl12xx/main.c:1432 wl12xx_queue_recovery_work+0x34/0x98 [wl12xx]()
    Modules linked in: tsc2004 syslink wl12xx mac80211 cfg80211 compat wl12xx_sdio
    Backtrace:
    [<c004cf70>] (dump_backtrace+0x0/0x110) from [<c038ffbc>] (dump_stack+0x18/0x1c)
     r6:bf0be67d r5:00000598 r4:00000000 r3:60000013
    [<c038ffa4>] (dump_stack+0x0/0x1c) from [<c00718e4>] (warn_slowpath_common+0x54/0x6c)
    [<c0071890>] (warn_slowpath_common+0x0/0x6c) from [<c0071920>] (warn_slowpath_null+0x24/0x2c)
     r8:c3aad14c r7:ffffff92 r6:ffff9ca5 r5:00000000 r4:c3aad660
    r3:00000009
    [<c00718fc>] (warn_slowpath_null+0x0/0x2c) from [<bf0a3688>] (wl12xx_queue_recovery_work+0x34/0x98 [wl12xx])
    [<bf0a3654>] (wl12xx_queue_recovery_work+0x0/0x98 [wl12xx]) from [<bf0ada24>] (wl1271_ps_elp_wakeup+0x198/0x234 [wl12xx])
     r4:c3aad660 r3:60000013
    [<bf0ad88c>] (wl1271_ps_elp_wakeup+0x0/0x234 [wl12xx]) from [<bf0a0718>] (wl1271_op_sched_scan_start+0x120/0x138 [wl12xx])
     r7:c3bb6a00 r6:c44177d8 r5:c3aad690 r4:c3aad660
    [<bf0a05f8>] (wl1271_op_sched_scan_start+0x0/0x138 [wl12xx]) from [<bf04c6b0>] (ieee80211_request_sched_scan_start+0x100/0x164 [mac80211])
    [<bf04c5b0>] (ieee80211_request_sched_scan_start+0x0/0x164 [mac80211]) from [<bf05a2c4>] (ieee80211_sched_scan_start+0x2c/0x38 [mac80211])
    [<bf05a298>] (ieee80211_sched_scan_start+0x0/0x38 [mac80211]) from [<bf021aa0>] (nl80211_start_sched_scan+0x538/0x594 [cfg80211])
    [<bf021568>] (nl80211_start_sched_scan+0x0/0x594 [cfg80211]) from [<c02fe55c>] (genl_rcv_msg+0x184/0x1c4)
    [<c02fe3d8>] (genl_rcv_msg+0x0/0x1c4) from [<c02fd9e0>] (netlink_rcv_skb+0x58/0xb4)
    [<c02fd988>] (netlink_rcv_skb+0x0/0xb4) from [<c02fe3cc>] (genl_rcv+0x20/0x2c)
     r6:c3a5b800 r5:c464f600 r4:c464f600 r3:00000000
    [<c02fe3ac>] (genl_rcv+0x0/0x2c) from [<c02fd3a0>] (netlink_unicast+0x220/0x2bc)
     r4:c44b0c00 r3:c02fe3ac
    [<c02fd180>] (netlink_unicast+0x0/0x2bc) from [<c02fd6e0>] (netlink_sendmsg+0x2a4/0x31c)
    [<c02fd43c>] (netlink_sendmsg+0x0/0x31c) from [<c02d7a00>] (sock_sendmsg+0xa8/0xc4)
    [<c02d7958>] (sock_sendmsg+0x0/0xc4) from [<c02d91ac>] (sys_sendmsg+0x1b8/0x21c)
     r9:00000008 r8:000000d8 r6:00000000 r5:c30a9ef4 r4:c4157000
    [<c02d8ff4>] (sys_sendmsg+0x0/0x21c) from [<c00493c0>] (ret_fast_syscall+0x0/0x30)
    ---[ end trace 8f16ec8b9ad1050e ]---
    wl12xx: ERROR FW Assert Watchdog timeout
    wl12xx: removing interface 00:0c:0c:a0:06:4c
    ieee80211 phy0: Hardware restart was requested


    what may be the problem?

  • Hi,

    The below error:
    "wl12xx: ERROR ELP wakeup timeout!"

    suggests that the WLAN_IRQ line is not mapped correctly in your board file. Please ensure that...


    Regards,
    Gigi Joseph.

  • Hi Gigi,


    For interrupt line I have following configurations in my board file

    Defining WLAN_IRQ gpio

    #define GPIO_WLAN_IRQ    ((1 * 32) + 25)

    Pinmux for WLAN_IRQ gpio

    omap_mux_init_signal("gpio1_25", TI814X_INPUT_EN | TI814X_PULL_DIS);

    Registering WLAN_IRQ in  wl12xx_platform_data structure

    static struct wl12xx_platform_data wlan_data __initdata = {
        .irq = OMAP_GPIO_IRQ(GPIO_WLAN_IRQ),
        /* COM6 (127x) uses FREF */
        .board_ref_clock = WL12XX_REFCLOCK_38_XTAL,,
        .platform_quirks = WL12XX_PLATFORM_QUIRK_EDGE_IRQ,
    };

    Is these any thing wrong done by me in IRQ line mapping?

  • Hi Chetan,

    Sorry for the late response...
    If it is still relevant, can you enable the DEBUG_IRQ driver logs and send me the logs. I can verify if you are getting any interrupts from the WLAN chipset.

    To enable DEBUG_IRQ logs,
    echo 256 > /sys/module/wl12xx/parameters/debug_level

    Regards,
    Gigi Joseph.

  • Hi Gigi,

    I have compiled latest wifi modules and used it with my board, from log i can see versions as follow

    Compat-wireless backport release: ol_R5.SP4.01

    Backport based on wl12xx.git ol_R5.SP7.01

    Firmware virsion : Rev 6.3.10.0.139

    when i am trying to do ifconfig wlan0 up i get following error

    wl12xx: state: 0
    wavu_dbg: wl12xx_set_power reseting
    wl12xx: ERROR timeout waiting for the hardware to complete initialization
    wavu_dbg: wl12xx_set_power reseting
    wl12xx: ERROR timeout waiting for the hardware to complete initialization
    wavu_dbg: wl12xx_set_power reseting
    wl12xx: ERROR timeout waiting for the hardware to complete initialization
    wl12xx: ERROR firmware boot failed despite 3 retries
    ifconfig: SIOCSIFFLAGS: Invalid argument

    Regards,

    Chetan Kankotiya