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.

Linux/WL1801MOD: Error in loading firmware for 1801MOD

Part Number: WL1801MOD
Other Parts Discussed in Thread: WL1801

Tool/software: Linux

Hi Community Members,

We are having issues in bring up of wlan0 interface. We are using a custom AM335x board and using latest ti-am335x-03.02.00.05.

We are able to detect SDIO Card in kernel as we are getting the following logs.

root@ngt:~# dmesg | grep mmc1
[    1.462928] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
[    1.478877] mmc1: new high speed SDIO card at address 0001

But it seems I am getting issues in loading firmware  wl18xx-conf.bin.

I downloaded build-utilites from git://git.ti.com/wilink8-wlan/build-utilites.git latest 8.7SP1.

When I am trying to generate wl18xx-conf.bin using wlconf -D I am getting the following error.

I am using built in drivers in the kernel 4.4.

This is my dts configuration.

&mmc3 {
    /*these are on the crossbar and are outlined in the
    xbar-event-map element */
    status = "okay";
    dmas = <&edma 12 1
    &edma 13 2>;
    dma-names = "tx", "rx";
    status = "okay";
    vmmc-supply = <&wlan_en_reg>;
    bus-width = <4>;
    pinctrl-names = "default";
    pinctrl-0 = < &mmc2_pins &wlan_pins >;
    pinctrl-1 = < &mmc2_pins_sleep &wlan_pins_sleep >;
    ti,non-removable;
    ti,needs-special-hs-handling;
    cap-power-off-card;
    keep-power-in-suspend;


        #address-cells = <1>;
        #size-cells = <0>;
        wlcore: wlcore@0 {
                compatible = "ti,wl1801";
                reg = <2>;
                interrupt-parent = <&gpio3>;
                interrupts = <2 8>;
        };
};

          wlan_en_reg: fixedregulator@2 {
                compatible = "regulator-fixed";
                regulator-name = "wlan-en-regulator";
                regulator-min-microvolt = <1800000>;
                regulator-max-microvolt = <1800000>;
        /* WLAN_EN GPIO for this board - Bank3, pin1 */
                gpio = <&gpio3 1 0>;

        /* WLAN card specific delay */
                startup-delay-us = <70000>;
                enable-active-high;
        };

Can anyone please let me know what can be the issue

Thanks

  • Hi,

    This query has been assigned to a relevant expert. We will get back to you shortly.

    Best regards,
    Vihang
  • Hi 

    One more development,

    I am getting this also in the bootlogs

    wlan-en-regulator: disabling  

    Although the SDIO Card is detected  which I can see by looking into mmc logs,my regulators are disabled.

    root@ngt:/sys/class/gpio/gpio98# dmesg | grep mmc1
    [ 1.472488] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
    [ 1.478929] mmc1: new high speed SDIO card at address 0001

    Also the WL_EN gpio is used as I am not able to export in user space.

    Can any one please let me know the issue.

    Thanks

    Deep

  • I havent seen the full log nut the wrror print abount not finding the config file "wl18xx-conf.bin" during driver load is not fatal. it uses default values which should be ok for the standard TI module.

    Is the driver loading with this message or not? Please post full log.

    Also the message about the wlan_enable regulator disabling is ok. It will enable again when you bring the interface up (e.g. ifconfig wlan0 up).

    BR,

    Eyal

  • Hi,

    I am attaching the bootlogs.

    The problem it seems that the wl18xx interupt is not working. I cannot see them in cat /proc/interrupts.

    canary_wifi.txt
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Initializing cgroup subsys cpu
    [    0.000000] Initializing cgroup subsys cpuacct
    [    0.000000] Linux version 4.4.32-gadde2ca9f8 (canary@canary-OptiPlex-3040) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #213 PREEM
    PT Mon Mar 27 12:57:47 IST 2017
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (A0] CPU: PIPT / VIPT nonaliasing ction cache
    [    0.000000] Machine model: TI AM335x BeagleBone Black
    [    0.000000] cma: Reserved 48 MiB at 0x8b800000
    [    0he writeback
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (neon )
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 64960
    [    0.000000] Kernel commandot=PARTUUID=000071bc-02 rw rootfstype=ext4 rootwait
    [    0.0000 (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: 200268K/262144K available (6579K kernel code, 351K rwdata, 2416K rodata, 268K init, 273K bss, 12724K reserved, 49152K cm
    a-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xd0800000 - 0xff8]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    [    0.0000xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc08d0fd4   (8996 kB)
    [    0.000000]       .init : 0xc08d10  0.000000]       .data : 0xc0914000 - 0xc096bff0   ( 352 kB)
    [96bff0 - 0xc09b06d8   ( 274 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000]  Build-time adjustment of leaf fanout to 32.
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [    0.000015] sched_clock: 32 bits at 24MHz, resolution 41ns, 0.000040] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle
    _ns: 79635851949 ns
    [    0.000052] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000218] clocksource_probe: no matching clocksources found
    [    0.000405] Console: colour dummy device 80x30
    [    0.000431]as been replaced by 'ttyS3'
    [    0.000438] This ensures that you still see kernel messages. Please
    [    0.000444] update your kernel commandline.
    [    0.000463] Calibrating delay loop... 718.02 BogoMIPS (lpj=3590144)
    [    0.119006] pid_max: default: 32768 minimum: 301
    [    0.119143] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ sh table entries: 1024 (order: 0, 4096 bytes)
    [    0.119886] Initializing cgroup subsys io
    [    0.119919] Initializing cgroup subsys memory
    [    0.119957] Initializing cgroup subsys devices
    [    0.119974] Initializing cgroup subsys freezer
    [    0.119990] Initializing cgroup subsys perf_event
    [    0.120004] Initializing cgroup subsys pids
    [    0.120036] CPU: Testing write buffer coherency: ok
    [    0.120446] Setting up static identity map for 0x80008200 - 0x80008258
    [    0.125124] devtmpfs: initialized
    [    0.137865] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.154204] omap_hwmod: debugss: _wait_target_disable failed
    [  : mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.214641] pinctrl core: initialized pinctrl subsystem
    [    0.216095] NET: Re  0.218396] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.249008] cpuidle: using governor ladder
    [    0.278997] cpuidle: using governor menu
    [    0.283962] OMAP GPIO hardware version 0.1
    [    0.295922] 3.3V Power supply Enabled1.8V Power supply Enabled3.3 1.8 PWR enabled.---**********
    [    0.296002] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.337931] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.341991] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring p
    robe
    [    0.342052] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c1_pins, deferring p
    robe
    [    0.342092] omap_i2c 48ev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe
    [    0.342222] media: Linux media interface: v0.10
    [    0.342286] Linux video capture interface: v2.00
    [    0.342345] pps_core: LinuxPPS API ver. 1 registered
    [    0.342354] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.342385] PTP clock s] EDAC MC: Ver: 3.0.0
    [    0.343709] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.344090] Advanced Linux Sound Architecture Driver Initialized.
    [    0.345373] clocksource: Switched to clocksource timer1
    [    0.357586] NET: Registered protocol family 2
    [    0.358425] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.358465] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.358496] TCP: Hash tables configured (established 2048 bind 2048)
    [    0.358576] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.358597] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [ tocol family 1
    [    0.359180] RPC: Registered named UNIX socket transport module.
    [    0.359195] RPC: Registered udp transport module.
    [    0.359202] RPC: Registered tcp transport module.
    [    0.359209] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.360228] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.362382] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.371545] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.372673] NFS: Registering the id_resolver key type
    [    0.372743] Key type id_resolver registered
    [    0.372751] Key type id_legacy registered
    [    0.372847] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.384966] Block layer SCSI generic (bsg) driver version 0.4 loade scheduler noop registered
    [    0.385015] io scheduler deadline registered
    [    0.385188] io scheduler cfq registered (default)
    [    0.386914] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [    0.457443] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.461996] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
    [    0.463312] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250
    [    0.464522] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 160, base_baud = 3000000) is a 8250
    [    0.465819] console [ttyS3] disabled
    [    0.465906] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 161, base_baud = 3000000) is a 8250
    [    1.125881] console [ttyS3] enabled
    [    1.130615] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 162, base_baud = 3000000) is a 8250
    [    1.140675] [drm] Initialized drm 1.1.0 20060810
    ed
    [    1.159405] libphy: Fixed MDIO Bus: probed
    [    1.165902] mousedev: PS/2 mouse device common for all mice
    [    1.173272] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
    [    1.180669] i2c /dev entries driver
    [    1.185205] cpuidle: enable-method property 'ti,am3352' found operations
    [    1.192661] ********Inside MMC Probe ***********
    [    1.197616] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.235705] *********At the end of probe ***************
    [    1.241348] ********Inside MMC Probe ***********
    [    1.326025] mmc0: host does not support reading read-only switch, assuming write-enable
    [    1.339527] mmc0: new high speed SDHC card at address aaaa
    [    1.346010] mmcblk0: mmc0:aaaa SU04G 3.69 GiB 
    [    1.354202]  mmcblk0: p1 p2
    [    1.365477] *********At the end of probe ***************
    [    1.372760] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.381784] omap_hsmmc 47810000.mmc: card claims to support voltages below defined range
    [    1.391290] NET: Registered protocol family 10
    [    1.397207] sit: IPv6 over IPv4 tunneling driver
    [    1.402692] NET: Registered protocol family 17
    [    1.407699] Key type dns_resolver registered
    [    1.412281] omap_voltage_late_init: Voltage driver support not added
    [    1.424449] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
    [    1.431577] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    1.438634] omap_i2c 4802a000.i2c: bus 1 rev0.ap_i2c 4819c000.i2c: bus 2 rev0.11 at 400 kHz
    [    1.451907] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
    [    1.461674] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
    [    1.468088] mmc1: new high speed SDIO card at address 0001
    [    1.478773] wlan-en-regulator: disabling
    [    1.482852] ALSA device list:
    [    1.486204]   No soundcards found.
    [    1.566964] EXT4-fs (mmcblk0p2): recovery complete
    [    1.575898] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    1.584096] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [    1.595251] devtmpfs: mounted
    [    1.598672] Freeing unused kernel memory: 268K (c08d1000 - c0914000)
    [    1.605260] This architecture does not have kernel memory protection.
    INIT: version 2.88 booting
    2): re-mounted. Opts: data=ordered
    INIT: Entering runlevel: 1
    Starting udev
    
    NEXT GENERATION TELEMATICS - Intermediate_release2 - 1Gb_RN52
    
    umount: can't umount /mnt/.psplash: Invalid argument
    root@ngt:~# [    2.477410] udevd[105]: starting version 182
    [    2.801990] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    3.048887] 47401300.usb-phy supply vcc not found, using dummy regulator
    [    3.207442] 47401b00.usb-phy supply vcc not found, using dummy regulator
    [    3.520087] CAN device driver interface
    [    3.552837] c_can_platform 481cc000.can: c_can_platform device registered (regs=fa1cc000, irq=169)
    [    3.625059] ***Searching for interrupts*******
    [    3.650418] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [    3.657495] *******Chip family is wl18xx
    [    3.675157] c_can_platform 481d0000.can: c_can_platform device registered (regs=fa1d0000, irq=170)
    [    4.135006] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [    4.394599] asoc-simple-card sound: tlv320aic3x-hifi <-> 48038000.mcasp mapping ok
    [    4.779167] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
    [    5.415080] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [    6.497900] usbcore: registered new interface driver usbfs
    [    6.503524] usbcore: registered new interface driver hub
    [    6.553352] usbcore: registered new device driver usb
    [    6.673046] musb-hdrc musb-hdrc.2.auto: MUSB HDRC host driver
    [    6.726751] musb-hdrc musb-hdrc.2.auto: new USB bus registered, assigned bus number 1
    [    6.771974] hub 1-0:1.0: USB hub found
    [    6.795634] hub 1-0:1.0: 1 port detected
    [    7.188782] cfg80211: World regulatory domain updated:
    [    7.193980] cfg80211:  DFS Master region: unset
    [    7.209805] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
    [    7.224197] cfg80211:   (2402z), (N/A, 2000 mBm), (N/A)
    [    7.232410] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000 KHz AUTO), (N/A, 2000 mBm), (N/A)
    [    7.241890] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO)
    , (N/A, 2000 mBm), (N/A)
    [    7.259676] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
    [    7.269243] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
    [    7.277636] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
    [    7.285698] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
    [    7.311167] ****Inside function wlcore_probe***
    [    7.318552] *****Inside wl18xx_setup**
    [    7.322342] ***********Inside the function wl18xx_conf_init
    [    7.335582] ***inside wl18xx_load_conf_file*********
    [    7.348335] ***end of wl18xx_load_conf_file**
    [    7.352764] **Inside function*******wl18xx_setup
    root@ngt:~# 
    root@ngt:~# ifconfig wlan0 up
    ifconfig: SIOCGIFFLAGS: No such device
    root@ngt:~# 
    
    

  • I am not sure all the driver modules are preset.
    The log is too short. Doesn't seem like load process has completed but I don't see any error as well.

    What modules do you see loaded using lsmod?
    Can you also share your:

    zcat /proc/config.gz

    Want to see that all wl18xx related modules are selected.

    BR,
    Eyal
  • Hi Eyal,

    I have redirected the result of   zcat /proc/config.gz in a file.

    I am attaching the file.

    file.txt

    Please let me know if any modifications are required.

    Thanks

  • It looks like it has all the right wl18xx related module enabled.

    Can you try enabling just this one?:
    CONFIG_FW_LOADER_USER_HELPER_FALLBACK

    Are you seeing all the modules loaded using lsmod?

    Lastly, are you sure you have sent the full console boot log (dmesg?) from boot?
    I expect to see more messages.

    BR,
    Eyal
  • Hi Eyal,

    Thanks for your prompt reply.

    I have sent you full boot logs. Below is my lsmod result.



    bootlogs.txt
    U-Boot 2016.05-00305-g3b08611-dirty (Feb 28 2017 - 11:12:41 +0530)
    
    CPU  : AM335X-GP rev 2.1
    
    Inside show_board_info
    Model: TI AM335x BeagleBone Black
           Watchdog enabled
    DRAM:  256 MiB
    NAND:  0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    reading uboot.env
    
    ** Unable to read "uboot.env" from mmc0:1 **
    Using default environment
    
    <ethaddr> not set. Validating first E-fuse MAC
    Press SPACE to abort autoboot in 2 seconds
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    reading boot.scr
    ** Unable to read file boot.scr **
    reading uEnv.txt
    ** Unable to read file uEnv.txt **
    switch to partitions #0, OK
    mmc0 is current device
    Scanning mmc 0:1...
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    3502392 bytes read in 253 ms (13.2 MiB/s)
    36737 bytes read in 13 ms (2.7 MiB/s)
    Kernel image @ 0x82000000 [ 0x000000 - 0x357138 ]
    ## Flattened Device Tree blob at 88000ob at 0x88000000
       Loading Device Tree to 8ef20000, end 8ef2bf80 ... OK
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Initializing cgroup subsys cpu
    [    0.000000] Initializing cgroup subsys cpuacct
    [    0.000000] Linux version 4.4.32-gadde2ca9f8 (canary@canary-OptiPlex-3040) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #225 PREEM
    PT Mon Mar 27 18:49:43 IST 2017
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] Machine model: TI AM335x BeagleBone Black
    [    0.000000] cma: Reserved 48 MiB at 0x8b800000
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (neon )
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 64960
    [    0.000000] Kernel command line: console=ttyO3,115200n8 root=PARTUUID=000071bc-02 rw rootfstype=ext4 rootwait
    [    0.0000 (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: 200268K/262144K available (6579K kernel code, 351K rwdata, 2416K rodata, 268K init, 273K bss, 12724K reserved, 49152K cm
    a-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xd0800000 - 0xff8]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    [    0.0000xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc08d0fd4   (8996 kB)
    [    0.000000]       .init : 0xc08d1000 - 0xc0914000   ( 268 kB)
    [    0.000000]       .data : 0xc0914000 - 0xc096bff0   ( 352 kB)
    [    0.000000]        .bss : 0xc096bff0 - 0xc09b06d8   ( 274 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000]  Build-time adjustment of leaf fanout to 32.
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [    0.000012] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000035] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000047] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000220] clocksource_probe: no matching clocksources found
    [    0.000404] Console: colour dummy device 80x30
    [    0.000431] WARNING: Your 'console=ttyO3' has been replaced by 'ttyS3'
    [    0.000438] This ensures that you still see kernel messages. Please
    [    0.000444] update your kernel commandline.
    [    0.000464] Calibrating delay loop... 718.02 BogoMIPS (lpj=3590144)
    [    0.119009] pid_max: default: 32768 minimum: 301
    [    0.119141] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.119152] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.119887] Initializing cgroup subsys io
    [    0.119919] Initializing cgroup subsys memory
    [    0.119959] Initializing cgroup subsys devices
    [    0.119975] Initializing cgroup subsys freezer
    [    0.119990] Initializing cgroup subsys perf_event
    [    0.120004] Initializing cgroup subsys pids
    [    0.120034] CPU: Testing write buffer coherency: ok
    [    0.120440] Setting up static identity map for 0x80008200 - 0x80008258
    [    0.125130] devtmpfs: initialized
    [    0.137891] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.154243] omap_hwmod: debugss: _wait_target_disable failed
    [    0.210552] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.214716] pinctrl core: initialized pinctrl subsystem
    [    0.216179] NET: Re  0.218500] DMA: preallocated 25llocations
    [    0.249008] cpuidle: using governor ladder
    [    0.278998] cpuidle: using governor menu
    [    0.283972] OMAP GPIO hardware version 0.1
    [    0.295973] 3.3V Power supply Enabled1.8V Power supply Enabled3.3 1.8 PWR enabled.---**********
    [    0.296051] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.337932] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.342006] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring p
    robe
    [    0.342068] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c1_pins, deferring p
    robe
    [    0.342108] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring p
    robe
    [    0.342238] media: Linux media interface: v0.10
    [    0.342303] Linux video capture interface: v2.00
    [    0.342363] pps_core: LinuxPPS API ver. 1 registered
    [    0.342372] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.342402] PTP clock support registered
    [    0.342462] EDAC MC: Ver: 3.0.0
    [    0.343732] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.344115] Advanced Linux Sound Architecture Driver Initialized.
    [    0.345406] clocksource: Switched to clocksource timer1
    [    0.357620] NET: Registered protocol family 2
    [    0.358457] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.358498] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.358528] TCP: Hash tables configured (established 2048 bind 2048)
    [    0.358610] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.358: 256 (order: 0, 4096 bytes)
    [    0.358796] NET: Registered protocol family 1
    [    0.359225] RPC: Registered named UNIX socket transport module.
    [    0.359240] RPC: Registered udp transport module.
    [    0.359248] RPC: Registered tcp transport module.
    [    0.359255] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.360272] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.362421] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.371580] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.372706] NFS: Registering the id_resolver key type
    [    0.372791] Key type id_resolver registered
    [    0stered
    [    0.372897] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.385017] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
    [    0.385049] io scheduler noop registered
    [    0.385063] io scheduler deadline registered
    [    0.385234] io s)
    [    0.386955] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [    0.457474] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.462037] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
    [    0.463346] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250
    [    0.464551] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 160, base_baud = 3000000) is a 8250
    [    0.465841] console [ttyS3] disabled
    [    0.465934] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 161, base_baud = 3000000) is a 8250
    [    1.125898] console [ttyS3] enabled
    [    1.130637] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 162, base_baud = 3000000) is a 8250
    [    1.140701] [drm] Initialized drm 1.1.0 20060810
    [    1.153554] loop: module loaded
    [    1.159384] libphy: Fixed MDIO Bus: probed
    [    1.165875] mousedev: PS/2 mouse device common for all mice
    [    1.173227] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
    [    1.180615] i2c /dev entries driver
    [    1.185149] cpuidle: 2' found operations
    [    1.192601] ********Inside MMC Probe ***********
    [    1.197552] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.235739] *********At the end of probe ***************
    [    1.241381] ********Inside MMC Probe ***********
    [    1.325841] mmc0: host does not support reading read-only swi 1.336306] mmc0: new high speed SDHC card at address aaaa
    [    1.342527] mmcblk0: mmc0:aaaa SU04G 3.69 GiB 
    [    1.351024]  mmcblk0: p1 p2
    [    1.365470] *********At the end of probe ***************
    [    1.372752] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.381762] omap_hsmmc 47810000.mmc: card claims to support voltages below defined range
    [    1.391239] NET: Registered protocol family 10
    [    1.397131] sit: IPv6 over IPv4 tunneling driver
    [    1.402618] NET: Registered protocol family 17
    [    1.407635] Key type dns_resolver registered
    [    1.412218] omap_voltage_late_init: Voltage driver support not added
    8 byte 24c256 EEPROM, writable, 1 bytes/write
    [    1.431462] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    1.438531] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
    [    1.445252] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 400 kHz
    [    1.451856] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
    [    1.461883] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
    [    1.471097] ALSA device list:
    [    1.474103]   No soundcards found.
    [    1.478566] mmc1: new high speed SDIO card at address 0001
    [    1.806473] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    1.814688] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [    1.825724] devtmpfs: mounted
    [    1.829109] Freeing unused kernel memory: 268K (c08d1000 - c0914000)
    [    1.835737] This architecture does not have kernel memory protection.
    INIT: version 2.88 booting
    [    2.265308] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
    INIT: Entering runlevel: 1
    Starting udev
    
    NEXT GENERATION TELEMATICS - Intermediate_release2 - 1Gb_RN52
    
    umount: can't umount /mnt/.psplash: Invalid argument
    root@ngt:~# ing version 182
    [    3.096512] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    3.223568] 47401300.usb-phy supply vcc not found, using dummy regulator
    [    3.417745] 47401b00.usb-phy supply vcc not found, using dummy regulator
    [    3.779652] CAN device driver interface
    [    3.819587] c_can_platform 481cc000.can: c_can_platform device registered (regs=fa1cc000, irq=169)
    [    3.898337] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [    3.914110] ***Searching for interrupts*******
    [    3.935345] *******Chip family is wl18xx[    3.942001] c_can_platform 481d0000.can: c_can_platform device registered (regs=fa1d0000, irq=170
    )
    [    4.346815] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
    [    4.646870] asoc-simple-card sound: tlv320aic3x-hifi <-> 48038000.mcasp mapping ok
    [    4.963849] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [    5.730283] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [    6.749033] usbcore: registered new interface driver usbfs
    [    6.754657] usbcore: registered new interface driver hub
    [    6.804445] usbcore: registered new device driver usb
    [    6.944904] musb-hdrc musb-hdrc.2.auto: MUSB HDRC host driver
    [    6.978342] musb-hdrc musb-hdrc.2.auto: new USB bus registered, assigned bus number 1
    [    7.016089] hub 1-0:1.0: USB hub found
    [    7.043618] hub 1-0:1.0: 1 port detected
    [    7.470607] cfg80211: World regulatory domain updated:
    [    7.475949] cfg80211:  DFS Master region: unset
    [    7.480329] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
    [    7.490250] cfg80211:   (2402000 (N/A, 2000 mBm), (N/A)
    [    7.498352] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000 KHz AUTO), (N/A, 2000 mBm), (N/A)
    [    7.507826] cfg80211:   
                               [    7.515937] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
    [    7.525490] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
    [    7.535014] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
    [    7.543401] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
    [    7.551458] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
    [    7.576153] ****Inside function wlcore_probe***
    [    7.583737] *****Inside wl18xx_setup**
    [    7.588941] ***********Inside the function wl18xx_conf_init
    [    7.594560] ***inside wl18xx_load_conf_file*********
    [    7.615884] ***end of wl18xx_load_conf_file**
    [    7.620298] *****ht_mode_param******(null)
    [    7.624412] **Inside function 2*******wl18xx_setup
    [    7.629322] ****inside func wlcore_nvs_cb after wlcore_probe****
    [    7.635594] ****inside wl12xx_set_power_on ******
    
    
    

    Also I am attaching bootlogs again.

    Let me know what exactly you are expecting.

    Thanks

  • Hi,

    wlcore_sdio is not loaded yet.
    So it probably stalls while loading it for some reason. It either has to fail, or you should see more messages...
    What file system are you using? Is it the standard processor sdk one?

    [ 7.576153] ****Inside function wlcore_probe***
    [ 7.583737] *****Inside wl18xx_setup**
    [ 7.588941] ***********Inside the function wl18xx_conf_init
    [ 7.594560] ***inside wl18xx_load_conf_file*********
    [ 7.615884] ***end of wl18xx_load_conf_file**
    [ 7.620298] *****ht_mode_param******(null)
    [ 7.624412] **Inside function 2*******wl18xx_setup
    [ 7.629322] ****inside func wlcore_nvs_cb after wlcore_probe****
    [ 7.635594] ****inside wl12xx_set_power_on ******

    Is this the last message seen, are those prints you have added?
    What happens next? are you getting the console back?

    interrupt-parent = <&gpio3>;
    interrupts = <2 8>;

    I assume you are using gpio3_2 for wlan_irq, right?
    Can you try:
    interrupt-parent = <&gpio3>;
    interrupts = <2 IRQ_TYPE_EDGE_FALLING>;

    BR,
    Eyal
  • Hi Eyal,

    I am using latest ti sdk ti-am335x-03.02.00.05.
    Yes I am using gpio3_2.

    interrupts = <2 IRQ_TYPE_EDGE_FALLING> // Writing this MACRO is giving me compilation error.

    That is why i am writing interrupts = <2 8>

    How can I load wlcore_sdio. Who loads it?


    Thanks
  • Add this include to your .dts file for the compilation warning

    #include <dt-bindings/interrupt-controller/irq.h>

    As in:
    git.ti.com/.../am335x-evm.dts

    wlcore_sdio is loaded automatically after the module is probed, at the same time wl18xx, wlcore etc. are being loaded.

    BR,
    Eyal
  • Hi Eyal,

    I tried the same. But still my wlcore_sdio is not used by any module.
    Also after cat /proc/interrupts I am not able to see the interrupts by wl18xx .

    Any clues?
    Thanks
  • It is ok that wlcore_sio is used by no one.

    Should look like:

    root@am335x-evm:~# lsmod | grep wlcore
    wlcore                228129  1 wl18xx
    mac80211              468843  2 wl18xx,wlcore
    cfg80211              248846  3 wl18xx,wlcore,mac80211
    wlcore_sdio             8734  0
    root@am335x-evm:~# lsmod | grep wl18xx
    wl18xx                 93660  0
    wlcore                228129  1 wl18xx
    mac80211              468843  2 wl18xx,wlcore
    cfg80211              248846  3 wl18xx,wlcore,mac80211
    root@am335x-evm:~#

    The question is if it was loaded automatically or you have manually loaded it.

    Anyway it looks like it didn't finish loading and this is why you don't see the interrupt being registered.

    Are you absolutely sure that you are using the correct .dtb file that you have built during boot? Pay attention to the symlnks in /rootfs/boot

    Try adding debug prints inside drivers/net/wireless/ti/wlcore/sdio.c and see where it fails. Start with the probe function.

    BR,

    Eyal

  • Hi Eyal,

    The drivers were automatically loaded. I am using drivers available in the TI SDK itself.
    I did not compile it externally as my kernel is 4.4.

    I am resending the dts configurations.

    wlan_en_reg: fixedregulator@2 {
    compatible = "regulator-fixed";
    regulator-name = "wlan-en-regulator";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    /* WLAN_EN GPIO for this board - Bank3, pin1 */
    gpio = <&gpio3 1 0>;

    /* WLAN card specific delay */
    startup-delay-us = <70000>;
    enable-active-high;
    };
    /*


    &mmc3 {
    /*these are on the crossbar and are outlined in the
    xbar-event-map element */
    status = "okay";
    dmas = <&edma 12 1
    &edma 13 2>;
    dma-names = "tx", "rx";
    status = "okay";
    vmmc-supply = <&wlan_en_reg>;
    bus-width = <4>;
    pinctrl-names = "default";
    pinctrl-0 = < &mmc2_pins &wlan_pins >;
    ti,non-removable;
    ti,needs-special-hs-handling;
    cap-power-off-card;
    keep-power-in-suspend;
    enable-sdio-wakeup;


    #address-cells = <1>;
    #size-cells = <0>;
    wlcore: wlcore@0 {
    compatible = "ti,wl1801";
    board-ref-clock = <4>;
    reg = <2>;
    interrupt-parent = <&gpio3>;
    interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
    };
    }


    What symlinks do I need to see in Pay attention to the symlnks in /rootfs/boot

    Thanks
    Deep
  • The .dts file entries look ok provide that you have also muxed gpio3_1 and gpio3_2 as gpios, as you did not attach this part of the .dts.

    It is inside probably part of:

    pinctrl-0 = < &mmc2_pins &wlan_pins >;

    The symlink I refer to is the following:

    root@am335x-evm:~# ls /boot -l

    lrwxrwxrwx    1 root     root            32 Mar 19 19:50 am335x-evm.dtb -> devicetree-zImage-am335x-evm.dtb

    As you probably use a different file then am335x-evm.dtb you need to make sure it is the one that is being picked up by u-boot when the kernel loads.

    BR,

    Eyal

  • Hi Eyal,

    I have muxed them as gpios

    /* wl12xx/wl18xx card enable/irq GPIOs. */
    wlan_pins: pinmux_wlan_pins {
    pinctrl-single,pins = <
    0x10C (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gmii1_crs.gpio3_1 used for wi-fi EN */
    0x110 (PIN_INPUT_PULLUP | MUX_MODE7) /* MII1_RX_ER.gpio3_2 used for wi-fi IRQ */

    Also /boot -l is showing the correct dtb file

    root@ngt:/boot# ls /boot -l
    -rwxrwxrwx 1 root root boneblack.dtb
    -rwxr-xr-x 1 r9 2017 zImage

    I need to know one thing..in am335x-evm.dts there are 3 pins configured as wlan_pins. What is the 3rd pin for?
  • HI Eyal,

    The problem is that I am not getting any logs from wlcore.
    How to increase the DEBUG logs for wlcore. My DYNAMIC_DEBUG is enabled in kernel config.
  • Hi,

    Third pin you are talking about is probably bluetooth_enable.

    For additional logs, please refer to:
    processors.wiki.ti.com/.../WL18xx_Driver_Debug

    you can also just add a bunch of printk inside of drivers/net/wireless/ti/wlcore/sdio.c in case opening the built in debug messages will not show you useful info.

    Best Regards,
    Eyal
  • Hi Eyal,

    I have a doubt in the lsmod

    root@ngt:~# lsmod

    Module                  Size  Used by

    wl18xx                 91108  0

    wlcore                214379  2 wl18xx

    mac80211              350563  2 wl18xx,wlcore

    cfg80211              219748  3 mac80211,wl18xx,wlcore

    musb_dsps              10667  0

    musb_hdrc             105337  1 musb_dsps

    udc_core               13867  1 musb_hdrc

    usbcore               226099  1 musb_hdrc

    ecb                     1909  0

    md5                     1897  0

    sha1_generic            2621  0

    sha1_arm_neon           6261  0

    sha1_arm                3862  1 sha1_arm_neon

    snd_soc_simple_card     8991  0

    omap_aes_driver        21614  0

    omap_sham              25097  0

    omap_rng                4759  0

    c_can_platform          6590  0

    c_can                  11311  1 c_can_platform

    rng_core                7538  1 omap_rng

    can_dev                12779  1 c_can

    wlcore_sdio             8554  0

    snd_soc_tlv320aic3x    47880  1

    snd_soc_davinci_mcasp    20494 soc_omap            3193  1 snd_soc_davinci_mcasp

    snd_soc_core          158914  5 snd_soc_davinci_mcasp,snd_soc_edma,snd_soc_omap,snd_soc_tlv320aic3x,snd_soc_simple_card

    snd_pcm_dmaengine       5325  2 snd_soc_core,snd_soc_omap

    snd_pcm                93_soc_core,snd_soc_omap,snd_soc_tlv320aic3x,snd_pcm_dmaengine

    snd_timer              23171  1 snd_pcm

    musb_am335x             1 4634  0

    Why is wlcore is used by 2 ?

    Also I am adding debug prints in wlcore/sdio.c and wlcore/main.c 

    It seems when wl12xx_set_power_on()  is called..it goes inside wlcore_set_partition() it is failing here.

    It means the driver is unable to read the chip's register.

    Can you please let me know?

    Thanks

  • Hi
    Can any one help me on this? I am still stuck.
  • Hi,

    You need to probe the wlan_enable pin and make sure it is already on when the driver tries acessing the chip.

    Please also add debug prints in this area of code to understand exactly where it fails and attach the logs.

    My guess would be an issue with your wlan_enable pin starting.

    Best Regards,

    Eyal

  • The wlan_enable pin is  getting enabled when the driver tries to access the chip.

    The problem comes when the driver is loaded, the firmware is loaded ...and the sdio_clk comes continuously like a mmc clock.  .

    I am sending the capture

  • Hi Eyal,

    I have resolved the issue.

    The issue was of the dma allocation in device tree.

    Now my working device tree is :

    &mmc3 {

       /*these are on the crossbar and are outlined in the

       xbar-event-map element */

       status = "okay";

       dmas = <&edma_xbar 12 0 1    

       &edma_xbar 13 0 2>;

       dma-names = "tx", "rx";

       vmmc-supply = <&wlan_en_reg>;

       bus-width = <4>;

       pinctrl-names = "default";

       pinctrl-0 = < &mmc2_pins &wlan_pins>;

       pinctrl-1 = <&mmc2_pins_sleep &wlan_pins_sleep>;

       ti,non-removable;

       ti,needs-special-hs-handling;

       cap-power-off-card;

       keep-power-in-suspend;

      /* enable-sdio-wakeup;*/

           #address-cells = <1>;

           #size-cells = <0>;

           wlcore: wlcore@0 {

                   compatible = "ti,wl1801";

                   board-ref-clock = <4>;

                   reg = <2>;

                   interrupt-parent = <&gpio3>;

                   interrupts = <2 IRQ_TYPE_EDGE_RISING>;

           };

    };

    Thanks for your support