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.

WL1285Q WiFi porting problem

Other Parts Discussed in Thread: WL1271

 

When does "wl128x_switch_tcxo_to_fref()" return 0?

We have problem with WL1285Q porting on AM335x.
So, I added some logs in initialization stage.
Please let me know when we can have below error.

 - am335x SDK : http://ladd00.triumf.ca/~olchansk/MityARM/TI/
 - WL1285Q driver : R5.SP5.01


[   12.419990] wl12xx: driver version: ol_R5.SP4.01-2-g1aa2c8e-dirty
[   12.426420] wl12xx: compilation time: Thu Dec 18 08:55:54 2014
[   12.480696] wl12xx_get_hw_info
[   12.510513] -------------------------- wifi on --------------------------------
[   12.791105] cfg80211: World regulatory domain updated:
[   12.796564] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   12.805384] cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.813745] cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   12.822087] cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   12.830428] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.838755] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.920456] wl12xx_set_power_on[0]
[   12.924105] wl1271_read32[0]
[   12.927274] wl1271_top_reg_read[0]
[   12.930873] wl12xx_get_fuse_mac
[   12.934173] wl12xx_init_pll_clock
[   12.937653] wl128x_boot_clk
[   12.940601] wl->ref_clock=5
[   12.943534] wl128x_switch_tcxo_to_fref
[   12.947616] wl1271_top_reg_read -> ret[0]
[   12.953042] wl1271_top_reg_write -> ret[0]
[   12.957488] wl1271_top_reg_write -> ret[0]
[   12.976802] wl128x_switch_tcxo_to_fref return zero...
[   12.982128] wl128x_boot_clk[-22]
[   12.985518] wl12xx_init_pll_clock[-22]
[   12.989455] wl12xx_get_fuse_mac[-22]
[   12.993268] -------------------------- wifi off --------------------------------
[   13.003101] wl12xx: ERROR couldn't get hw info
[   13.009026] wl12xx_driver: probe of wl12xx failed with error -22
 

  • One more question,
    When wl12xx_set_platform_data() is used that of drivers/net/wireless/wl12xx/wl12xx_platform_data.c?
    Not the one in the driver what we created by compat-wireless.
  • Hi,

    Which AM335x SDK are you using?
    Have you also added the board_tcxo_clock entry in the wl12xx_platform_data structure?
    What are the values of board_tcxo_clock/board_ref_clock that you are using?

    Can you confirm that the WLAN_EN is indeed going high (with a scope)?

    The porting guide is available at: http://processors.wiki.ti.com/index.php/WL127x_Porting_Guide

    Also, wl128x_switch_tcxo_to_fref() returns '0' on success.

    I did not understand your other query regarding: wl12xx_set_platform_data() . The one in the compat-wireless should be invoked. Your kernel ".config" should only have CONFIG_WL12XX_PLATFORM_DATA set.

    Regards,
    Gigi Joseph.
  • 1. SDK is 05.05, you can download it from the link in previous message.

    2. here is platfrom data for wl12xx

    struct wl12xx_platform_data am335xevm_wlan_data = {
                    .irq = OMAP_GPIO_IRQ(AM335XEVM_WLAN_IRQ_GPIO),
                    .board_ref_clock = WL12XX_REFCLOCK_26_XTAL, /* 38.4Mhz */
                    .board_tcxo_clock = WL12XX_TCXOCLOCK_26, /* 26 MHz */
                    .bt_enable_gpio = GPIO_TO_PIN(3, 21),
                    .wlan_enable_gpio = GPIO_TO_PIN(0, 22), /* wifi- enable */
    };

     3. WLAN_EN is working

    4. "wl128x_switch_tcxo_to_fref()" returns zero, then "wl128x_boot_clk()" return "-EINVAL".

    int wl128x_boot_clk(struct wl1271 *wl, int *selected_clock)
    {
                    u16 sys_clk_cfg;
                    int ret;
     
                    printk("wl128x_boot_clk\n");

                    /* For XTAL-only modes, FREF will be used after switching from TCXO */
                    if (wl->ref_clock == WL12XX_REFCLOCK_26_XTAL ||
                        wl->ref_clock == WL12XX_REFCLOCK_38_XTAL) {
                                    printk("wl->ref_clock=%d\n", wl->ref_clock);
                                    if (!wl128x_switch_tcxo_to_fref(wl)){
                                                    printk("wl128x_switch_tcxo_to_fref return zero...\n");
                                                    return -EINVAL;
                                    }
                                    goto fref_clk;
                    }

                    /* Query the HW, to determine which clock source we should use */
                    ret = wl1271_top_reg_read(wl, SYS_CLK_CFG_REG, &sys_clk_cfg);
                    printk("wl1271_top_reg_read[%d]\n", ret);
                    if (ret < 0)
                                    return ret;

                    if (sys_clk_cfg == 0xFFFF)
                                    return -EINVAL;
                    if (sys_clk_cfg & PRCM_CM_EN_MUX_WLAN_FREF)
                                    goto fref_clk;

                    /* If TCXO is either 32.736MHz or 16.368MHz, switch to FREF */
                    if (wl->tcxo_clock == WL12XX_TCXOCLOCK_16_368 ||
                        wl->tcxo_clock == WL12XX_TCXOCLOCK_32_736) {
                                    if (!wl128x_switch_tcxo_to_fref(wl))
                                                    return -EINVAL;
                                    goto fref_clk;
                    }

                    /* TCXO clock is selected */
                    if (!wl128x_is_tcxo_valid(wl))
                                    return -EINVAL;
                    *selected_clock = wl->tcxo_clock;
                    goto config_mcs_pll;

    fref_clk:
                    /* FREF clock is selected */
                    printk("FREF clock is selectedd\n");

                    if (!wl128x_is_fref_valid(wl))
                                    return -EINVAL;
                    *selected_clock = wl->ref_clock;

    config_mcs_pll:
                    return wl128x_configure_mcs_pll(wl, *selected_clock);

    }

     5. .config of the Kernel has "CONFIG_WL12XX_PLATFORM_DATA=y".

     

  • please review the log which is tested with adopted modification in below.


    (1) modification

    Function              : wl128x_boot_clk()
    File                        : drivers/net/wireless/wl12xx/boot.c

    Before:
                    /* For XTAL-only modes, FREF will be used after switching from TCXO */
                    if (wl->ref_clock == WL12XX_REFCLOCK_26_XTAL ||
                        wl->ref_clock == WL12XX_REFCLOCK_38_XTAL) {
                                    if (!wl128x_switch_tcxo_to_fref(wl))
                                                    return -EINVAL;
                                    goto fref_clk;
                    }
     
    After:
                    /* For XTAL-only modes, FREF will be used after switching from TCXO */
                    if (wl->ref_clock == WL12XX_REFCLOCK_26_XTAL ||
                        wl->ref_clock == WL12XX_REFCLOCK_38_XTAL) {
                                    if (wl128x_switch_tcxo_to_fref(wl) < 0)
                                                    return -EINVAL;
                                    goto fref_clk;
                    }
     
    Before:
     
                    /* If TCXO is either 32.736MHz or 16.368MHz, switch to FREF */
                    if (wl->tcxo_clock == WL12XX_TCXOCLOCK_16_368 ||
                        wl->tcxo_clock == WL12XX_TCXOCLOCK_32_736) {
                                    if (!wl128x_switch_tcxo_to_fref(wl))
                                                    return -EINVAL;
                                    goto fref_clk;
                    }

    After:

                    /* If TCXO is either 32.736MHz or 16.368MHz, switch to FREF */
                    if (wl->tcxo_clock == WL12XX_TCXOCLOCK_16_368 ||
                        wl->tcxo_clock == WL12XX_TCXOCLOCK_32_736) {
                                    if (wl128x_switch_tcxo_to_fref(wl) < 0)
                                                    return -EINVAL;
                                    goto fref_clk;
                    }

     

     


    (2) Log

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    [    0.000000] Linux version 3.2.0 (root@ubuntu) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #17 Thu Dec 18 16:30:26 KST 2014
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] Machine: am335xevm
    [    0.000000] Memory policy: ECC disabled, Data cache writeback
    [    0.000000] AM335X ES1.0 (neon )
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=7,2048 noinitrd rootfstype=ubifs rootwait=1 ip=none
    [    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    [    0.000000] Memory: 256MB = 256MB total
    [    0.000000] Memory: 253272k/253272k available, 8872k reserved, 0K highmem
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    [    0.000000]     vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    [    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc059b000   (5708 kB)
    [    0.000000]       .init : 0xc059b000 - 0xc05d9000   ( 248 kB)
    [    0.000000]       .data : 0xc05da000 - 0xc0640758   ( 410 kB)
    [    0.000000]        .bss : 0xc064077c - 0xc066d564   ( 180 kB)
    [    0.000000] NR_IRQS:396
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [    0.000000] Total of 128 interrupts on 1 active controller
    [    0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
    [    0.000000] OMAP clocksource: GPTIMER1 at 24000000 Hz
    [    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
    [    0.000000] Console: colour dummy device 80x30
    [    0.000232] Calibrating delay loop... 498.89 BogoMIPS (lpj=2494464)
    [    0.056343] pid_max: default: 32768 minimum: 301
    [    0.056500] Security Framework initialized
    [    0.056626] Mount-cache hash table entries: 512
    [    0.057093] CPU: Testing write buffer coherency: ok
    [    0.096537] print_constraints: dummy:
    [    0.097008] NET: Registered protocol family 16
    [    0.099832] OMAP GPIO hardware version 0.1
    [    0.103110] am335x_evm_init()
    [    0.106249] omap_mux_init: Add partition: #1: core, flags: 0
    [    0.106704] mmc0_init_LG
    [    0.107249] [brandon] wl12xx_init() evm_id = 0
    [    0.107388] wl12xx_set_platform_data is called in kernel source
    [    0.149898] bio: create slab <bio-0> at 0
    [    0.152842] SCSI subsystem initialized
    [    0.159703] Switching to clocksource gp timer
    [    0.181386] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
    [    0.181886] NET: Registered protocol family 2
    [    0.182135] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.182538] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
    [    0.182767] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.182903] TCP: Hash tables configured (established 8192 bind 8192)
    [    0.182920] TCP reno registered
    [    0.182937] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.182970] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.183210] NET: Registered protocol family 1
    [    0.183542] RPC: Registered named UNIX socket transport module.
    [    0.183560] RPC: Registered udp transport module.
    [    0.183573] RPC: Registered tcp transport module.
    [    0.183585] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.183902] NetWinder Floating Point Emulator V0.97 (double precision)
    [    0.184153] omap-gpmc omap-gpmc: GPMC revision 6.0
    [    0.184177] Registering NAND on CS0
    [    0.198434] VFS: Disk quotas dquot_6.5.2
    [    0.198521] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [    0.199239] msgmni has been set to 494
    [    0.203382] alg: No test for stdrng (krng)
    [    0.204241] io scheduler noop registered
    [    0.204263] io scheduler deadline registered
    [    0.204356] io scheduler cfq registered (default)
    [    0.206811] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
    [    0.609493] console [ttyO0] enabled
    [    0.613932] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    [    0.621961] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    [    0.629957] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
    [    0.637900] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
    [    0.645872] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
    [    0.666642] brd: module loaded
    [    0.676711] loop: module loaded
    [    0.680307] i2c-core: driver [tsl2550] using legacy suspend method
    [    0.686812] i2c-core: driver [tsl2550] using legacy resume method
    [    0.695365] mtdoops: mtd device (mtddev=name/number) must be supplied
    [    0.702893] omap2-nand driver initializing
    [    0.707553] ONFI flash detected
    [    0.711027] ONFI param page 0 valid
    [    0.714707] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xa1 (Micron MT29F1G08ABBEAH4)
    [    0.723437] Creating 8 MTD partitions on "omap2-nand.0":
    [    0.729040] 0x000000000000-0x000000020000 : "SPL"
    [    0.735942] 0x000000020000-0x000000040000 : "SPL.backup1"
    [    0.743329] 0x000000040000-0x000000060000 : "SPL.backup2"
    [    0.750708] 0x000000060000-0x000000080000 : "SPL.backup3"
    [    0.758046] 0x000000080000-0x000000260000 : "U-Boot"
    [    0.765771] 0x000000260000-0x000000280000 : "U-Boot Env"
    [    0.773121] 0x000000280000-0x000000780000 : "Kernel"
    [    0.782183] 0x000000780000-0x000008000000 : "File System"
    [    0.840281] OneNAND driver initializing
    [    0.845237] UBI: attaching mtd7 to ubi0
    [    0.849287] UBI: physical eraseblock size:   131072 bytes (128 KiB)
    [    0.855916] UBI: logical eraseblock size:    126976 bytes
    [    0.861606] UBI: smallest flash I/O unit:    2048
    [    0.866549] UBI: sub-page size:              512
    [    0.871413] UBI: VID header offset:          2048 (aligned 2048)
    [    0.877727] UBI: data offset:                4096
    [    1.917392] UBI: max. sequence number:       172
    [    1.937255] UBI: attached mtd7 to ubi0
    [    1.941267] UBI: MTD device name:            "File System"
    [    1.947034] UBI: MTD device size:            120 MiB
    [    1.952266] UBI: number of good PEBs:        964
    [    1.957119] UBI: number of bad PEBs:         0
    [    1.961800] UBI: number of corrupted PEBs:   0
    [    1.966468] UBI: max. allowed volumes:       128
    [    1.971332] UBI: wear-leveling threshold:    4096
    [    1.976276] UBI: number of internal volumes: 1
    [    1.980957] UBI: number of user volumes:     1
    [    1.985626] UBI: available PEBs:             0
    [    1.990307] UBI: total number of reserved PEBs: 964
    [    1.995434] UBI: number of PEBs reserved for bad PEB handling: 9
    [    2.001761] UBI: max/mean erase counter: 2/0
    [    2.006249] UBI: image sequence number:  873215242
    [    2.011438] UBI: background thread "ubi_bgt0d" started, PID 555
    [    2.018553] CAN device driver interface
    [    2.022619] CAN bus driver for Bosch D_CAN controller 1.0
    [    2.070587] davinci_mdio davinci_mdio.0: phy[3]: device 0:03, driver unknown
    [    2.079100] cdc_ncm: 04-Aug-2011
    [    2.083519] mousedev: PS/2 mouse device common for all mice
    [    2.090728] omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
    [    2.097656] i2c /dev entries driver
    [    2.101974] USB Video Class driver (1.1.1)
    [    2.107284] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    2.117119] -------------------------- wifi on --------------------------------
    [    2.194803] -------------------------- wifi off --------------------------------
    [    2.202595] -------------------------- wifi on --------------------------------
    [    2.280777] omap4_aes_mod_init: loading AM33X AES driver
    [    2.286509] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02
    [    2.293207] omap4_aes_probe: probe() done
    [    2.297656] omap4_sham_mod_init: loading AM33X SHA/MD5 driver
    [    2.303870] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03
    [    2.317384] omap4_sham_probe: probe() done
    [    2.324935] usbhid: USB HID core driver
    [    2.334752] mmc0: card claims to support voltages below the defined range. These will be ignored.
    [    2.344421] nf_conntrack version 0.5.0 (3957 buckets, 15828 max)
    [    2.351392] ip_tables: (C) 2000-2006 Netfilter Core Team
    [    2.357124] TCP cubic registered
    [    2.360563] NET: Registered protocol family 17
    [    2.365252] can: controller area network core (rev 20090105 abi 8)
    [    2.371898] NET: Registered protocol family 29
    [    2.376573] can: raw protocol (rev 20090105)
    [    2.381081] can: broadcast manager protocol (rev 20090105 t)
    [    2.387088] Registering the dns_resolver key type
    [    2.392131] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    2.401052] Power Management for AM33XX family
    [    2.405973] Trying to load am335x-pm-firmware.bin (60 secs timeout)
    [    2.412723] Copied the M3 firmware to UMEM
    [    2.434503] mmc0: new high speed SDIO card at address 0001
    [    2.440968] -------------------------- wifi off --------------------------------
    [    2.457498] Detected MACID=90:59:af:a6:5e:af
    [    2.463281] cpsw: Detected MACID = 90:59:af:a6:5e:b0
    [    2.469953] omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
    [    2.545213] UBIFS: recovery needed
    [    2.714886] UBIFS: recovery completed
    [    2.718764] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
    [    2.725124] UBIFS: file system size:   119230464 bytes (116436 KiB, 113 MiB, 939 LEBs)
    [    2.733470] UBIFS: journal size:       9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
    [    2.741172] UBIFS: media format:       w4/r0 (latest is w4/r0)
    [    2.747303] UBIFS: default compressor: lzo
    [    2.751621] UBIFS: reserved for root:  0 bytes (0 KiB)
    [    2.760784] VFS: Mounted root (ubifs filesystem) on device 0:12.
    [    2.767607] Freeing init memory: 248K
    INIT: version 2.86 booting
    /etc/rcS.d/S01psplash: line 21: /usr/bin/psplash: not found
    Please wait: booting...
    Starting udev
    [    4.414170] Disabling lock debugging due to kernel taint
    [    4.420216] wlcore_sdio: Unknown symbol compat_dependency_symbol (err 0)
    [    4.518172] -------------------------- wifi on --------------------------------
    [    4.631859] wlcore_sdio: Unknown symbol compat_dependency_symbol (err 0)
    [    4.905649] -------------------------- wifi off --------------------------------
    [    4.998308] cfg80211: Calling CRDA to update world regulatory domain
    [    5.260226] wl12xx: driver version: ol_R5.SP4.01-2-g1aa2c8e-dirty
    [    5.266656] wl12xx: compilation time: Tue Dec 23 10:52:05 2014
    [    5.350877] wl12xx_get_hw_info
    [    5.380870] -------------------------- wifi on --------------------------------
    [    5.599280] cfg80211: World regulatory domain updated:
    [    5.604779] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    [    5.613588] cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    [    5.621933] cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    [    5.630285] cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    [    5.638614] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    [    5.646955] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    [    5.860295] wl12xx_set_power_on[0]
    [    5.864865] wl1271_read32[0]
    [    5.868060] wl1271_top_reg_read[0]
    [    5.871662] wl12xx_get_fuse_mac
    [    5.874962] wl12xx_init_pll_clock
    [    5.878442] wl128x_boot_clk
    [    5.881391] wl->ref_clock=5
    [    5.884323] wl128x_switch_tcxo_to_fref
    [    5.888404] wl1271_top_reg_read -> ret[0]
    [    5.892776] wl1271_top_reg_write -> ret[0]
    [    5.897216] wl1271_top_reg_write -> ret[0]
    [    5.916528] FREF clock is selected
    [    5.920816] wl128x_boot_clk[0]
    [    5.925087] wl1271_write32[0]
    [    5.928708] wl12xx_init_pll_clock[0]
    [    5.932809] wl1271_set_partition[0]
    [    5.936525] wl1271_read32[0]
    [    5.939599] wl1271_read32[0]
    [    5.942951] wl12xx_get_fuse_mac[0]
    [    5.946568] -------------------------- wifi off --------------------------------
    [    5.983710] wl12xx: loaded
    [    6.118962] alignment: ignoring faults is unsafe on this CPU.  Defaulting to fixup mode.
    Root filesystem already rw, not remounting
    Caching udev devnodes
    ALSA: Restoring mixer settings...
    Configuring network interfaces... [    6.880835] net eth0: CPSW phy found : id is : 0x143bc31
    udhcpc (v1.13.2) started
    Sending discover...
    Sending discover...
    Sending discover...
    No lease, forking to background
    done.
    Setting up IP spoofing protection: rp_filter.
    Mounting remote filesystems...
    Sun Jul 29 02:28:00 UTC 2012
    INIT: Entering runlevel: 3
    Starting Dropbear SSH server: dropbear.
    Starting syslogd/klogd: done
    Starting thttpdchdir: No such file or directory
    .

    root@AE:~#
    root@AE:~# lsmod
    Module                  Size  Used by
    wl12xx                200377  0
    mac80211              272633  1 wl12xx
    cfg80211              168442  2 wl12xx,mac80211
    wl12xx_sdio             3754  0
    root@AE:~# iwconfig
    lo        no wireless extensions.

    eth1      no wireless extensions.

    wlan0     IEEE 802.11abgn  ESSID:off/any
              Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm
              Retry  long limit:7   RTS thr:off   Fragment thr:off
              Encryption key:off
              Power Management:on

    eth0      no wireless extensions.

    root@AE:~# ifconfig wlan0 up
    [   22.053752] wl12xx: state: 0
    [   22.079958] -------------------------- wifi on --------------------------------
    [   26.342744] ------------[ cut here ]------------
    [   26.347660] WARNING: at /MCU/ti/work-space-r5.sp5.01/compat-wireless/drivers/net/wireless/wl12xx/sdio.c:126 wl12xx_sdio_raw_write+0xc8/0x150 [wl12xx_sdio]()
    [   26.362413] Modules linked in: wl12xx(O) mac80211(O) cfg80211(O) wl12xx_sdio(O)
    [   26.370145] Backtrace:
    [   26.372765] [<c0017978>] (dump_backtrace+0x0/0x110) from [<c0421300>] (dump_stack+0x18/0x1c)
    [   26.381657]  r6:bf0058e4 r5:0000007e r4:00000000 r3:c05fac88
    [   26.387655] [<c04212e8>] (dump_stack+0x0/0x1c) from [<c003d29c>] (warn_slowpath_common+0x5c/0x6c)
    [   26.397015] [<c003d240>] (warn_slowpath_common+0x0/0x6c) from [<c003d2d0>] (warn_slowpath_null+0x24/0x2c)
    [   26.407088]  r8:00000000 r7:cf1b6a00 r6:cf030608 r5:0001ffc4 r4:cfa62400
    [   26.413988] r3:00000009
    [   26.416764] [<c003d2ac>] (warn_slowpath_null+0x0/0x2c) from [<bf0052d4>] (wl12xx_sdio_raw_write+0xc8/0x150 [wl12xx_sdio])
    [   26.428384] [<bf00520c>] (wl12xx_sdio_raw_write+0x0/0x150 [wl12xx_sdio]) from [<bf0abfac>] (wl1271_set_partition+0x94/0x464 [wl12xx])
    [   26.441079] [<bf0abf18>] (wl1271_set_partition+0x0/0x464 [wl12xx]) from [<bf0a2468>] (wl12xx_set_power_on+0x78/0x154 [wl12xx])
    [   26.453119] [<bf0a23f0>] (wl12xx_set_power_on+0x0/0x154 [wl12xx]) from [<bf0a447c>] (wl12xx_chip_wakeup+0x1c/0x374 [wl12xx])
    [   26.464929]  r5:bf0ccc4c r4:cfb75780
    [   26.468740] [<bf0a4460>] (wl12xx_chip_wakeup+0x0/0x374 [wl12xx]) from [<bf0a4a84>] (wl1271_op_add_interface+0x2b0/0x5e8 [wl12xx])
    [   26.481007]  r8:cfb67838 r7:cfb757b0 r6:cfb678c0 r5:bf0ccc4c r4:cfb75780
    [   26.488224] [<bf0a47d4>] (wl1271_op_add_interface+0x0/0x5e8 [wl12xx]) from [<bf059ec4>] (ieee80211_do_open+0x530/0x728 [mac80211])
    [   26.500675] [<bf059994>] (ieee80211_do_open+0x0/0x728 [mac80211]) from [<bf05a12c>] (ieee80211_open+0x70/0x7c [mac80211])
    [   26.512278] [<bf05a0bc>] (ieee80211_open+0x0/0x7c [mac80211]) from [<c037d9a8>] (__dev_open+0xb4/0x100)
    [   26.522171]  r4:cfb67000 r3:bf05a0bc
    [   26.525957] [<c037d8f4>] (__dev_open+0x0/0x100) from [<c037dbf4>] (__dev_change_flags+0x8c/0x13c)
    [   26.535300]  r5:00001043 r4:cfb67000
    [   26.539083] [<c037db68>] (__dev_change_flags+0x0/0x13c) from [<c037dd20>] (dev_change_flags+0x18/0x50)
    [   26.548882]  r7:00000000 r6:00008914 r5:00001002 r4:cfb67000
    [   26.554890] [<c037dd08>] (dev_change_flags+0x0/0x50) from [<c03d006c>] (devinet_ioctl+0x660/0x758)
    [   26.564325]  r6:00008914 r5:cf0de000 r4:becdcc00 r3:00000001
    [   26.570324] [<c03cfa0c>] (devinet_ioctl+0x0/0x758) from [<c03d116c>] (inet_ioctl+0x1b8/0x1c8)
    [   26.579306] [<c03d0fb4>] (inet_ioctl+0x0/0x1c8) from [<c0368c30>] (sock_ioctl+0x78/0x278)
    [   26.587941] [<c0368bb8>] (sock_ioctl+0x0/0x278) from [<c00b6f80>] (do_vfs_ioctl+0x88/0x528)
    [   26.596736]  r7:00000003 r6:cf504860 r5:becdcc00 r4:becdcc00
    [   26.602734] [<c00b6ef8>] (do_vfs_ioctl+0x0/0x528) from [<c00b749c>] (sys_ioctl+0x7c/0x84)
    [   26.611344]  r9:cf0de000 r8:00000000 r7:00000003 r6:00008914 r5:becdcc00
    [   26.618229] r4:cf0291c0
    [   26.621027] [<c00b7420>] (sys_ioctl+0x0/0x84) from [<c0014280>] (ret_fast_syscall+0x0/0x30)
    [   26.629808]  r8:c0014428 r7:00000036 r6:0008c3d0 r5:becdce1c r4:0008c43c
    [   26.636900] ---[ end trace cd335e86cfcedf24 ]---
    [   26.641775] wl1271_sdio mmc0:0001:2: sdio write failed (-110)
    [   26.648575] -------------------------- wifi off --------------------------------
    [   26.689888] -------------------------- wifi on --------------------------------
    [   27.129987] wl12xx_init_pll_clock
    [   27.133496] wl128x_boot_clk
    [   27.136430] wl->ref_clock=5
    [   27.139363] wl128x_switch_tcxo_to_fref
    [   27.144092] wl1271_top_reg_read -> ret[0]
    [   27.148454] wl1271_top_reg_write -> ret[0]
    [   27.153189] wl1271_top_reg_write -> ret[0]
    [   27.172502] FREF clock is selected
    [   27.176954] wl128x_boot_clk[0]
    [   27.180628] wl1271_write32[0]
    [   31.078615] ------------[ cut here ]------------
    [   31.083554] WARNING: at /MCU/ti/work-space-r5.sp5.01/compat-wireless/drivers/net/wireless/wl12xx/sdio.c:126 wl12xx_sdio_raw_write+0xc8/0x150 [wl12xx_sdio]()
    [   31.098291] Modules linked in: wl12xx(O) mac80211(O) cfg80211(O) wl12xx_sdio(O)
    [   31.106018] Backtrace:
    [   31.108639] [<c0017978>] (dump_backtrace+0x0/0x110) from [<c0421300>] (dump_stack+0x18/0x1c)
    [   31.117531]  r6:bf0058e4 r5:0000007e r4:00000000 r3:c05fac88
    [   31.123543] [<c04212e8>] (dump_stack+0x0/0x1c) from [<c003d29c>] (warn_slowpath_common+0x5c/0x6c)
    [   31.132905] [<c003d240>] (warn_slowpath_common+0x0/0x6c) from [<c003d2d0>] (warn_slowpath_null+0x24/0x2c)
    [   31.142979]  r8:00000000 r7:cf0c4800 r6:cf030608 r5:000007b4 r4:cfa62400
    [   31.149880] r3:00000009
    [   31.152655] [<c003d2ac>] (warn_slowpath_null+0x0/0x2c) from [<bf0052d4>] (wl12xx_sdio_raw_write+0xc8/0x150 [wl12xx_sdio])
    [   31.164276] [<bf00520c>] (wl12xx_sdio_raw_write+0x0/0x150 [wl12xx_sdio]) from [<bf0b4808>] (wl1271_load_firmware+0x8d4/0x11bc [wl12xx])
    [   31.177158] [<bf0b3f34>] (wl1271_load_firmware+0x0/0x11bc [wl12xx]) from [<bf0b56ec>] (wl1271_boot+0x54/0xa90 [wl12xx])
    [   31.188565] [<bf0b5698>] (wl1271_boot+0x0/0xa90 [wl12xx]) from [<bf0a4a94>] (wl1271_op_add_interface+0x2c0/0x5e8 [wl12xx])
    [   31.200337] [<bf0a47d4>] (wl1271_op_add_interface+0x0/0x5e8 [wl12xx]) from [<bf059ec4>] (ieee80211_do_open+0x530/0x728 [mac80211])
    [   31.212786] [<bf059994>] (ieee80211_do_open+0x0/0x728 [mac80211]) from [<bf05a12c>] (ieee80211_open+0x70/0x7c [mac80211])
    [   31.224389] [<bf05a0bc>] (ieee80211_open+0x0/0x7c [mac80211]) from [<c037d9a8>] (__dev_open+0xb4/0x100)
    [   31.234282]  r4:cfb67000 r3:bf05a0bc
    [   31.238068] [<c037d8f4>] (__dev_open+0x0/0x100) from [<c037dbf4>] (__dev_change_flags+0x8c/0x13c)
    [   31.247410]  r5:00001043 r4:cfb67000
    [   31.251206] [<c037db68>] (__dev_change_flags+0x0/0x13c) from [<c037dd20>] (dev_change_flags+0x18/0x50)
    [   31.261004]  r7:00000000 r6:00008914 r5:00001002 r4:cfb67000
    [   31.267001] [<c037dd08>] (dev_change_flags+0x0/0x50) from [<c03d006c>] (devinet_ioctl+0x660/0x758)
    [   31.276436]  r6:00008914 r5:cf0de000 r4:becdcc00 r3:00000001
    [   31.282437] [<c03cfa0c>] (devinet_ioctl+0x0/0x758) from [<c03d116c>] (inet_ioctl+0x1b8/0x1c8)
    [   31.291433] [<c03d0fb4>] (inet_ioctl+0x0/0x1c8) from [<c0368c30>] (sock_ioctl+0x78/0x278)
    [   31.300068] [<c0368bb8>] (sock_ioctl+0x0/0x278) from [<c00b6f80>] (do_vfs_ioctl+0x88/0x528)
    [   31.308849]  r7:00000003 r6:cf504860 r5:becdcc00 r4:becdcc00
    [   31.314850] [<c00b6ef8>] (do_vfs_ioctl+0x0/0x528) from [<c00b749c>] (sys_ioctl+0x7c/0x84)
    [   31.323460]  r9:cf0de000 r8:00000000 r7:00000003 r6:00008914 r5:becdcc00
    [   31.330361] r4:cf0291c0
    [   31.333148] [<c00b7420>] (sys_ioctl+0x0/0x84) from [<c0014280>] (ret_fast_syscall+0x0/0x30)
    [   31.341943]  r8:c0014428 r7:00000036 r6:0008c3d0 r5:becdce1c r4:0008c43c
    [   31.349022] ---[ end trace cd335e86cfcedf25 ]---
    [   31.353897] wl1271_sdio mmc0:0001:2: sdio write failed (-110)
    [   31.360666] -------------------------- wifi off --------------------------------
    [   31.399860] -------------------------- wifi on --------------------------------
    [   35.662891] ------------[ cut here ]------------
    [   35.667788] WARNING: at /MCU/ti/work-space-r5.sp5.01/compat-wireless/drivers/net/wireless/wl12xx/sdio.c:126 wl12xx_sdio_raw_write+0xc8/0x150 [wl12xx_sdio]()
    [   35.682540] Modules linked in: wl12xx(O) mac80211(O) cfg80211(O) wl12xx_sdio(O)
    [   35.690266] Backtrace:
    [   35.692877] [<c0017978>] (dump_backtrace+0x0/0x110) from [<c0421300>] (dump_stack+0x18/0x1c)
    [   35.701767]  r6:bf0058e4 r5:0000007e r4:00000000 r3:c05fac88
    [   35.707762] [<c04212e8>] (dump_stack+0x0/0x1c) from [<c003d29c>] (warn_slowpath_common+0x5c/0x6c)
    [   35.717119] [<c003d240>] (warn_slowpath_common+0x0/0x6c) from [<c003d2d0>] (warn_slowpath_null+0x24/0x2c)
    [   35.727192]  r8:00000000 r7:cf1b6a00 r6:cf030608 r5:0001ffc4 r4:cfa62400
    [   35.734093] r3:00000009
    [   35.736869] [<c003d2ac>] (warn_slowpath_null+0x0/0x2c) from [<bf0052d4>] (wl12xx_sdio_raw_write+0xc8/0x150 [wl12xx_sdio])
    [   35.748476] [<bf00520c>] (wl12xx_sdio_raw_write+0x0/0x150 [wl12xx_sdio]) from [<bf0abfac>] (wl1271_set_partition+0x94/0x464 [wl12xx])
    [   35.761168] [<bf0abf18>] (wl1271_set_partition+0x0/0x464 [wl12xx]) from [<bf0a2468>] (wl12xx_set_power_on+0x78/0x154 [wl12xx])
    [   35.773206] [<bf0a23f0>] (wl12xx_set_power_on+0x0/0x154 [wl12xx]) from [<bf0a447c>] (wl12xx_chip_wakeup+0x1c/0x374 [wl12xx])
    [   35.785016]  r5:bf0ccc4c r4:cfb75780
    [   35.788826] [<bf0a4460>] (wl12xx_chip_wakeup+0x0/0x374 [wl12xx]) from [<bf0a4a84>] (wl1271_op_add_interface+0x2b0/0x5e8 [wl12xx])
    [   35.801095]  r8:cfb67838 r7:cfb757b0 r6:cfb678c0 r5:bf0ccc4c r4:cfb75780
    [   35.808287] [<bf0a47d4>] (wl1271_op_add_interface+0x0/0x5e8 [wl12xx]) from [<bf059ec4>] (ieee80211_do_open+0x530/0x728 [mac80211])
    [   35.820733] [<bf059994>] (ieee80211_do_open+0x0/0x728 [mac80211]) from [<bf05a12c>] (ieee80211_open+0x70/0x7c [mac80211])
    [   35.832327] [<bf05a0bc>] (ieee80211_open+0x0/0x7c [mac80211]) from [<c037d9a8>] (__dev_open+0xb4/0x100)
    [   35.842221]  r4:cfb67000 r3:bf05a0bc
    [   35.846006] [<c037d8f4>] (__dev_open+0x0/0x100) from [<c037dbf4>] (__dev_change_flags+0x8c/0x13c)
    [   35.855350]  r5:00001043 r4:cfb67000
    [   35.859132] [<c037db68>] (__dev_change_flags+0x0/0x13c) from [<c037dd20>] (dev_change_flags+0x18/0x50)
    [   35.868930]  r7:00000000 r6:00008914 r5:00001002 r4:cfb67000
    [   35.874936] [<c037dd08>] (dev_change_flags+0x0/0x50) from [<c03d006c>] (devinet_ioctl+0x660/0x758)
    [   35.884371]  r6:00008914 r5:cf0de000 r4:becdcc00 r3:00000001
    [   35.890371] [<c03cfa0c>] (devinet_ioctl+0x0/0x758) from [<c03d116c>] (inet_ioctl+0x1b8/0x1c8)
    [   35.899352] [<c03d0fb4>] (inet_ioctl+0x0/0x1c8) from [<c0368c30>] (sock_ioctl+0x78/0x278)
    [   35.907985] [<c0368bb8>] (sock_ioctl+0x0/0x278) from [<c00b6f80>] (do_vfs_ioctl+0x88/0x528)
    [   35.916780]  r7:00000003 r6:cf504860 r5:becdcc00 r4:becdcc00
    [   35.922780] [<c00b6ef8>] (do_vfs_ioctl+0x0/0x528) from [<c00b749c>] (sys_ioctl+0x7c/0x84)
    [   35.931392]  r9:cf0de000 r8:00000000 r7:00000003 r6:00008914 r5:becdcc00
    [   35.938277] r4:cf0291c0
    [   35.941071] [<c00b7420>] (sys_ioctl+0x0/0x84) from [<c0014280>] (ret_fast_syscall+0x0/0x30)
    [   35.949865]  r8:c0014428 r7:00000036 r6:0008c3d0 r5:becdce1c r4:0008c43c
    [   35.956939] ---[ end trace cd335e86cfcedf26 ]---
    [   35.961811] wl1271_sdio mmc0:0001:2: sdio write failed (-110)
    [   35.967936] -------------------------- wifi off --------------------------------
    [   35.982222] wl12xx: ERROR firmware boot failed despite 3 retries
    ifconfig: SIOCSIFFLAGS: Invalid argument
    root@AE:~#

     

     

     

     

     

     

     

  • Hi Brandon,

    This looks like an SDIO communication issue.
    Can you verify if WLAN_EN is being toggled using a scope?

    Regards,
    Gigi Joseph.
  • WLAN_EN is working.
  • Hi Brandon,

    In that case, can you verify the complete power up sequence? It is available here: http://processors.wiki.ti.com/index.php/WL18xx_Platform_Integration_Guide#WLAN_Reset.2FPower_up_sequence

    Regards,
    Gigi Joseph.
  • The sequence seems no problem.Is there any other thing to check?
  • Brandon,


    the following:

    ifconfig wlan0 up
    [   22.053752] wl12xx: state: 0
    [   22.079958] -------------------------- wifi on --------------------------------
    [   26.342744] ------------[ cut here ]------------
    [   26.347660] WARNING: at /MCU/ti/work-space-r5.sp5.01/compat-wireless/drivers/net/wireless/wl12xx/sdio.c:126

    Indicate that the WL chip is not booted correctly

    I know Gigi already requested to check the WLAN_EN and the boot sequence, but it still look as something in that area

    In addition, you posted that you made a change in the FREF configuration, can you please revert that (or explain again what was the change and why)?

    Shahar

  • Shahar,

    Boot sequence has no problem, and WLAN_EN is working well, as written before.
    It is using module and TCXO inside.

    FREF change is done by Gigi, for error handling.

    BR.

  • Thanks Brandon,
    Please wait while we check what should be done/tested next
  • Hi,

    Which wilink6 module is being used here? Can you attach a picture?

    If I remember correctly the commercial wilink8 module used board_ref_clock of 38.4Mhz XTAL while below I see that you have set it up to 26_XTAL

    struct wl12xx_platform_data am335xevm_wlan_data = {
                    .irq = OMAP_GPIO_IRQ(AM335XEVM_WLAN_IRQ_GPIO),
                    .board_ref_clock = WL12XX_REFCLOCK_26_XTAL, /* 38.4Mhz */
                    .board_tcxo_clock = WL12XX_TCXOCLOCK_26, /* 26 MHz */
                    .bt_enable_gpio = GPIO_TO_PIN(3, 21),
                    .wlan_enable_gpio = GPIO_TO_PIN(0, 22), /* wifi- enable */

    BR

    Eyal


    };

  • This issue was resolved.

    board_ref_clock need to set as "WL12XX_REFCLOCK_26", not "WL12XX_REFCLOCK_26_XTAL"

     

    Thanks, BR