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.

Unable to initialize wl1271L

Other Parts Discussed in Thread: WL1271

We have a tiwi-BLE moduel from LS-research attached to an SDIO controller. I cannot get the Wifi driver to initialize properly.

I added a few extra printk's to the driver, to see a bit more of what's happening. The following appears on the output:

sdhci-arasan e0101000.sdhci: card claims to support voltages below defined range
mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
mmc1: new SDIO card at address 0001
wl12xx_probe
wlcore_alloc_hw
wlcore_probe
wlcore_nvs_cb: Platform data found, irq=116
wl12xx_setup: Platform data found, irq=116
wlcore: loaded
mmc1: Timeout waiting for hardware interrupt.
mmc1: Reset 0x2 never completed.
mmc1: Reset 0x4 never completed.
mmc1: Timeout waiting for hardware interrupt.
mmc1: Reset 0x2 never completed.
mmc1: Reset 0x4 never completed.

I measured various lines on the module. The SDIO CLK is running at ~12 MHz. The IRQ line never goes high, it's connected to a GPIO line on the CPU. The WLAN_EN is enabled (high) during this routine, there's a 70ms delay between WLAN_EN going high and initiating communication.

The lines "mmc1: queuing unknown CIS tuple 0x91 (3 bytes)" and "mmc1: new SDIO card at address 0001" look familiar, I also saw those on TI evaluation boards with this chipset, so they appear to indicate all is well and that the chips has been detected.


What could be the cause of this behaviour?

  • Hi Mike,

    Can you share the complete boot logs? Are you failing to turn on WiFi (or scan not working)? Are the modules getting inserted properly? Do you see the wlan0 interface?

    Regards,
    Gigi Joseph.

  • Joseph Gigi said:
    Can you share the complete boot logs?

    Sure. I'll send it.

    Are you failing to turn on WiFi (or scan not working)? Are the modules getting inserted properly? Do you see the wlan0 interface

    The modules load, but fail to properly intitialize, as you can see in the log.

    The wlan0 interface is not being created (because the driver fails to initialize, I guess).

  • Here's the dmesg output

    Booting Linux on physical CPU 0x0
    Linux version 3.13.0 (mike@paradigit) (gcc version 4.8.2 (GCC) ) #1 SMP PREEMPT Mon Apr 7 16:12:05 CEST 2014
    CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
    CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    Machine model: Topic Zynq Miami
    cma: CMA: reserved 8 MiB at 0f000000
    Memory policy: Data cache writealloc
    On node 0 totalpages: 65536
    free_area_init_node: node 0, pgdat c050f300, node_mem_map c052b000
      Normal zone: 512 pages used for memmap
      Normal zone: 0 pages reserved
      Normal zone: 65536 pages, LIFO batch:15
    PERCPU: Embedded 8 pages/cpu @c0732000 s8640 r8192 d15936 u32768
    pcpu-alloc: s8640 r8192 d15936 u32768 alloc=8*4096
    pcpu-alloc: [0] 0 [0] 1 
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
    Kernel command line: console=ttyPS0,115200 ubi.mtd=qspi-rootfs root=ubi0:qspi-rootfs rw rootfstype=ubifs rootwait quiet
    PID hash table entries: 1024 (order: 0, 4096 bytes)
    Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    Memory: 246264K/262144K available (3651K kernel code, 152K rwdata, 1192K rodata, 144K init, 104K bss, 15880K reserved, 0K highmem)
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
        vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
        lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
        pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
        modules : 0xbf000000 - 0xbfe00000   (  14 MB)
          .text : 0xc0008000 - 0xc04c31ac   (4845 kB)
          .init : 0xc04c4000 - 0xc04e81c0   ( 145 kB)
          .data : 0xc04ea000 - 0xc0510040   ( 153 kB)
           .bss : 0xc051004c - 0xc052a1cc   ( 105 kB)
    Preemptible hierarchical RCU implementation.
    	Dump stacks of tasks blocking RCU-preempt GP.
    NR_IRQS:16 nr_irqs:16 16
    slcr mapped to d0802000
    Zynq clock init
    sched_clock: 16 bits at 52kHz, resolution 19230ns, wraps every 1260288461ns
    timer #0 at d0804000, irq=43
    Calibrating delay loop... 1263.61 BogoMIPS (lpj=631808)
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 512
    Initializing cgroup subsys freezer
    CPU: Testing write buffer coherency: ok
    CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    Setting up static identity map for 0x376ea0 - 0x376ef8
    L310 cache controller enabled
    l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x72060000, Cache size: 512 kB
    CPU1: Booted secondary processor
    CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    Brought up 2 CPUs
    SMP: Total of 2 processors activated.
    CPU: All CPU(s) started in SVC mode.
    devtmpfs: initialized
    VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
    regulator-dummy: no parameters
    NET: Registered protocol family 16
    DMA: preallocated 256 KiB pool for atomic coherent allocations
    cpuidle: using governor ladder
    cpuidle: using governor menu
    zynq-gpio e000a000.gpio: gpio at 0xe000a000 mapped to 0xd080e000
    hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
    hw-breakpoint: maximum watchpoint size is 4 bytes.
    zynq-ocm f800c000.ps7-ocmc: ZYNQ OCM pool: 256 KiB @ 0xd0880000
    bio: create slab <bio-0> at 0
    wl-wifi: 3300 mV 
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    EDAC MC: Ver: 3.0.0
    cfg80211: Calling CRDA to update world regulatory domain
    Switched to clocksource ttc_clocksource
    NET: Registered protocol family 2
    TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
    TCP: Hash tables configured (established 2048 bind 2048)
    TCP: reno registered
    UDP hash table entries: 256 (order: 1, 8192 bytes)
    UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
    NET: Registered protocol family 1
    hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
    squashfs: version 4.0 (2009/01/31) Phillip Lougher
    msgmni has been set to 496
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    dma-pl330 f8003000.ps7-dma: Loaded driver for PL330 DMAC-2364208
    dma-pl330 f8003000.ps7-dma: 	DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
    e0001000.uart: ttyPS0 at MMIO 0xe0001000 (irq = 82, base_baud = 6144000) is a xuartps
    console [ttyPS0] enabled
    xuartps e0000000.uart: failed to get alias id, errno -19
    e0000000.uart: ttyPS1 at MMIO 0xe0000000 (irq = 59, base_baud = 6144000) is a xuartps
    xdevcfg f8007000.devcfg: ioremap 0xf8007000 to d0818000
    zynq-qspi e000d000.qspi: master is unqueued, this is deprecated
    m25p80 spi32766.0: s25fl512s (65536 Kbytes)
    7 ofpart partitions found on MTD device spi32766.0
    Creating 7 MTD partitions on "spi32766.0":
    0x000000000000-0x000000040000 : "qspi-u-boot-spl"
    0x000000040000-0x000000100000 : "qspi-u-boot-img"
    0x000000100000-0x000000140000 : "qspi-u-boot-env"
    0x000000140000-0x000000180000 : "qspi-device-tree"
    0x000000180000-0x000000580000 : "qspi-linux"
    0x000000580000-0x000003d80000 : "qspi-rootfs"
    0x000003d80000-0x000004000000 : "qspi-scratch"
    zynq-qspi e000d000.qspi: at 0xE000D000 mapped to 0xD081A000, irq=51
    ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    ULPI transceiver vendor/product ID 0x0424/0x0007
    Found SMSC USB3320 ULPI transceiver.
    ULPI integrity check: passed.
    using random self ethernet address
    using random host ethernet address
    usb0: HOST MAC 62:fb:77:3e:40:1d
    usb0: MAC fa:1b:a7:f9:49:17
    using random self ethernet address
    using random host ethernet address
    g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
    g_ether gadget: g_ether ready
    zynq-udc: bind to driver g_ether
    cdns-i2c e0004000.ps7-i2c: 100 kHz mmio e0004000 irq 57
    xadcps f8007100.xadc: enabled:	yes	reference:	external
    zynq-wdt f8005000.swdt: Xilinx Watchdog Timer at d0822000 with timeout 10s
    zynq-edac f8006000.ps7-ddrc: ecc not enabled
    cpu cpu0: dummy supplies not allowed
    cpufreq_cpu0: failed to get cpu0 regulator: -19
    Xilinx Zynq CpuIdle Driver started
    sdhci: Secure Digital Host Controller Interface driver
    sdhci: Copyright(c) Pierre Ossman
    sdhci-pltfm: SDHCI platform and OF driver helper
    sdhci-arasan e0100000.sdhci: dummy supplies not allowed
    mmc0: no vqmmc regulator found
    sdhci-arasan e0100000.sdhci: dummy supplies not allowed
    mmc0: no vmmc regulator found (-19)
    mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
    sdhci-arasan e0101000.sdhci: dummy supplies not allowed
    mmc1: no vqmmc regulator found
    mmc1: SDHCI controller on e0101000.sdhci [e0101000.sdhci] using ADMA
    usbcore: registered new interface driver usbhid
    usbhid: USB HID core driver
    TCP: cubic registered
    NET: Registered protocol family 17
    Registering SWP/SWPB emulation handler
    registered taskstats version 1
    UBI: attaching mtd5 to ubi0
    UBI: scanning is finished
    UBI: attached mtd5 (name "qspi-rootfs", size 56 MiB) to ubi0
    UBI: PEB size: 262144 bytes (256 KiB), LEB size: 262016 bytes
    UBI: min./max. I/O unit sizes: 1/256, sub-page size 1
    UBI: VID header offset: 64 (aligned 64), data offset: 128
    UBI: good PEBs: 224, bad PEBs: 0, corrupted PEBs: 0
    UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
    UBI: max/mean erase counter: 11/7, WL threshold: 4096, image sequence number: 91933419
    UBI: available PEBs: 0, total reserved PEBs: 224, PEBs reserved for bad PEB handling: 0
    UBI: background thread "ubi_bgt0d" started, PID 335
    sdhci-arasan e0101000.sdhci: card claims to support voltages below defined range
    UBIFS: background thread "ubifs_bgt0_0" started, PID 337
    random: nonblocking pool is initialized
    UBIFS: recovery needed
    mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
    mmc1: new SDIO card at address 0001
    g_ether gadget: high-speed config #1: CDC Ethernet (ECM)
    UBIFS: recovery completed
    UBIFS: mounted UBI device 0, volume 0, name "qspi-rootfs"
    UBIFS: LEB size: 262016 bytes (255 KiB), min./max. I/O unit sizes: 8 bytes/256 bytes
    UBIFS: FS size: 55023360 bytes (52 MiB, 210 LEBs), journal size 8122496 bytes (7 MiB, 31 LEBs)
    UBIFS: reserved for root: 0 bytes (0 KiB)
    UBIFS: media format: w4/r0 (latest is w4/r0), UUID 27FA9DC9-3345-4A36-8E21-B2000998EB93, small LPT model
    VFS: Mounted root (ubifs filesystem) on device 0:13.
    devtmpfs: mounted
    Freeing unused kernel memory: 144K (c04c4000 - c04e8000)
    

  • Still having this problem. Please help.

    I ran an SDIO transfer test program (sdiostress kernel module) that uploads and downloads data to the chip's memory, and that ran without any errors. So the SDIO transfer appears to run just fine.


    Help?


    Anyone?

    PS: Is there a place where TI provides real support?

  • Here's the max debugging I managed to get from the drivers:

    sdhci-arasan e0101000.sdhci: card claims to support voltages below defined range
    mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
    mmc1: new SDIO card at address 0001
    wl12xx_get_platform_data.
    wl1271_sdio mmc1:0001:2: sdio PM caps = 0x0
    wl12xx_probe
    wlcore_alloc_hw
    wlcore_probe
    wlcore_nvs_cb: Platform data found, irq=116
    wl12xx_setup: Platform data found, irq=116
    wlcore: mem_start 00040000 mem_size 00014FC0
    wlcore: reg_start 00300000 reg_size 00008800
    wlcore: mem2_start 00000000 mem2_size 00000000
    wlcore: mem3_start 00000000 mem3_size 00000000
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffc4, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffc0, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffcc, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffc8, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffd4, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffd0, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffd8, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 52 addr 0x1fffc, byte 0x01
    wl1271_sdio mmc1:0001:2: sdio read 53 addr 0x1a634, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x15974, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x15980, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio read 53 addr 0x1597c, 4 bytes
    wlcore: PG Ver major = 3 minor = 1, MAC is present
    wlcore: mem_start 00040000 mem_size 00014FC0
    wlcore: reg_start 00310000 reg_size 00006000
    wlcore: mem2_start 00000000 mem2_size 00000000
    wlcore: mem3_start 00000000 mem3_size 00000000
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffc4, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffc0, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffcc, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffc8, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffd4, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffd0, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffd8, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio read 53 addr 0x15e74, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio read 53 addr 0x15e78, 4 bytes
    wlcore: mem_start 00000000 mem_size 000177C0
    wlcore: reg_start 00300000 reg_size 00008800
    wlcore: mem2_start 00000000 mem2_size 00000000
    wlcore: mem3_start 00000000 mem3_size 00000000
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffc4, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffc0, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffcc, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffc8, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffd4, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffd0, 4 bytes
    wl1271_sdio mmc1:0001:2: sdio write 53 addr 0x1ffd8, 4 bytes
    wlcore: chip id 0x4030111 (1271 PG20)
    wlcore: base address: oui deadbe nic ef0000
    wlcore: loaded
    mmc1: Timeout waiting for hardware interrupt.
    sdhci: =========== REGISTER DUMP (mmc1)===========
    sdhci: Sys addr: 0x00000000 | Version:  0x00008901
    sdhci: Blk size: 0x00000000 | Blk cnt:  0x00000000
    sdhci: Argument: 0x00010000 | Trn mode: 0x00000000
    sdhci: Present:  0x01ff0000 | Host ctl: 0x00000001
    sdhci: Power:    0x00000000 | Blk gap:  0x00000000
    sdhci: Wake-up:  0x00000000 | Clock:    0x00000000
    sdhci: Timeout:  0x00000000 | Int stat: 0x00000000
    sdhci: Int enab: 0x00ff0003 | Sig enab: 0x00ff0003
    sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
    sdhci: Caps:     0x69ec0080 | Caps_1:   0x00000000
    sdhci: Cmd:      0x0000071a | Max curr: 0x00000001
    sdhci: Host ctl2: 0x00000000
    sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000000
    sdhci: ===========================================
    mmc1: Reset 0x2 never completed.
    sdhci: =========== REGISTER DUMP (mmc1)===========
    sdhci: Sys addr: 0x00000000 | Version:  0x00008901
    sdhci: Blk size: 0x00000000 | Blk cnt:  0x00000000
    sdhci: Argument: 0x00010000 | Trn mode: 0x00000000
    sdhci: Present:  0x01ff0000 | Host ctl: 0x00000001
    sdhci: Power:    0x00000000 | Blk gap:  0x00000000
    sdhci: Wake-up:  0x00000000 | Clock:    0x00000000
    sdhci: Timeout:  0x00000000 | Int stat: 0x00000000
    sdhci: Int enab: 0x00ff0003 | Sig enab: 0x00ff0003
    sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
    sdhci: Caps:     0x69ec0080 | Caps_1:   0x00000000
    sdhci: Cmd:      0x0000071a | Max curr: 0x00000001
    sdhci: Host ctl2: 0x00000000
    sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000000
    sdhci: ===========================================
    mmc1: Reset 0x4 never completed.
    sdhci: =========== REGISTER DUMP (mmc1)===========
    sdhci: Sys addr: 0x00000000 | Version:  0x00008901
    sdhci: Blk size: 0x00000000 | Blk cnt:  0x00000000
    sdhci: Argument: 0x00010000 | Trn mode: 0x00000000
    sdhci: Present:  0x01ff0000 | Host ctl: 0x00000001
    sdhci: Power:    0x00000000 | Blk gap:  0x00000000
    sdhci: Wake-up:  0x00000000 | Clock:    0x00000000
    sdhci: Timeout:  0x00000000 | Int stat: 0x00000000
    sdhci: Int enab: 0x00ff0003 | Sig enab: 0x00ff0003
    sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
    sdhci: Caps:     0x69ec0080 | Caps_1:   0x00000000
    sdhci: Cmd:      0x0000071a | Max curr: 0x00000001
    sdhci: Host ctl2: 0x00000000
    sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000000
    sdhci: ===========================================

  • Hi Mike,

    I see that you are using kernel v 3.13 - Unfortunately we don't have a wl12xx version that supports it...

    Regards,
    Gigi Joseph.

  • For your information - we solved it now by buying a product from another vendor, who was even willing to cooperate to get it working on our system.

    I won't be recommending TI wifi chips to any of our customers either.