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/WL1807MOD: WL1807MOD

Part Number: WL1807MOD
Other Parts Discussed in Thread: WL1835, WL1271

Tool/software: Linux

Hello,

I have been working on WL18XX  to implement WLAN0 interface over SPI in IMX28 processor. My kernel vrsion is 3.14.79-rt85. In the linux there are wl18xx ,wlcore, wl12xx and wl1251 driver files are exist. Also I  fallowed Getting Started Guide for WL18xx modules.According to the this guide I implemented CONFIG files. Also I implement  this patch ( https://patchwork.kernel.org/patch/9199301/ ) to the files, according to my device tree my implementation is like that,

ssp2: ssp@80014000 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "fsl,imx28-spi";
				pinctrl-names = "default";
				pinctrl-0 = <&spi2_pins_a>;
				clock-frequency = <48000000>;
				status = "okay";
                power-supply = <&wlan_en_reg>;
               
                wlcore: wlcore@1 {
            
                    compatible = "ti,wl1271","ti,wlcore";
                    reg = <1>;
                    spi-max-frequency = <48000000>;
                    interrupt-parent = <&gpio0>;
 	            	interrupts = <10 2>;
 	            	vmmc-supply = <&wlan_en_reg>;
       	        	clock-xtal;
    	        	ref-clock-frequency = <38400000>;
                };

I think I doing something wrong in here because after insmod the compiled wlcore wl12xx and wl18xx files  I could not see any wlan0 interface  by using "ifconfig -a"  command. I wonder should I have to implement Linux Backporting to my kernel. And are there any proper wilink8 version for my kernel version. I would be very appreciated if you help me. 

  • Hi,

    How are you physically connecting the wl18xx module the imx host processor?
    Have you connected the SPI pins?

    Next, If you are using a wl18xx module it should be:
    compatible = "ti,wl1835";

    instead of:
    compatible = "ti,wl1271","ti,wlcore";

    Next, you need to load the kernel modules when your kernel is booting.
    Are you loading the following modules?
    cfg80211.ko
    mac80211.ko
    wlcore.ko
    wlcore_spi.ko
    wl18xx.ko

    Please provide the full log of your kernel booting and loading of the above modules.

    Best Regards,
    Eyal
  • Hi  

    Eyal Reizer said:


    How are you physically connecting the wl18xx module the imx host processor?
    Have you connected the SPI pins?

    Next, If you are using a wl18xx module it should be:
    compatible = "ti,wl1835";

    instead of:
    compatible = "ti,wl1271","ti,wlcore";

    Next, you need to load the kernel modules when your kernel is booting.
    Are you loading the following modules?
    cfg80211.ko
    mac80211.ko
    wlcore.ko
    wlcore_spi.ko
    wl18xx.ko

    Please provide the full log of your kernel booting and loading of the above modules.

    Best Regards,
    Eyal

    Eyal,

    Actually I did not connect  the wl18xx module physically to host processor. Firstly I am tying to implement driver after that I will connect to the host. But my first priority ,I want to see if I can implement the driver or not.

    Should I connect the module before implementing ? Would be helpful ?

    Yes you are right I need to write "ti,wl18xx", but I  tried with compatible = "ti,wl18xx". I guess I am doing wrong at here. Can I write like compatible = "ti,wl1835" ?

    Actually  cfg80211.ko, mac80211.ko, wlcore.ko, wlcore_spi.ko, wl18xx.ko kernel modules are not load while kernel is booting. I will add them after the booting from console.

    This is my kernel log;

    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 3.14.79-rt85 (ptxdist@ptxdist) (gcc version 4.9.2 (                                                                                                                                                             OSELAS.Toolchain-2014.12.2) ) #21 PREEMPT RT 2016-04-01
    [    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
    [    0.000000] CPU: VIVT data cache, VIVT instruction cache
    [    0.000000] Machine model: TQ Systems TQMa28 on MBa28
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pag                                                                                                                                                             es: 32512
    [    0.000000] Kernel command line: root=/dev/mmcblk1p3 rw rootwait console=tty0                                                                                                                                                              consoleblank=0 console=ttyAPP3,115200 lcd_panel=fg0700 ssp1 panic=1
    [    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
    [    0.000000] Dentry cache hash table entries: 16384 (order: 7, 589824 bytes)
    [    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.000000] Memory: 116328K/131072K available (4955K kernel code, 331K rwdata                                                                                                                                                             , 1892K rodata, 237K init, 5535K bss, 14744K reserved)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    [    0.000000]     vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
    [    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc06b83b8   (6849 kB)
    [    0.000000]       .init : 0xc06b9000 - 0xc06f455c   ( 238 kB)
    [    0.000000]       .data : 0xc06f6000 - 0xc0748c5c   ( 332 kB)
    [    0.000000]        .bss : 0xc0748c5c - 0xc0cb0ae0   (5536 kB)
    [    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000000] of_irq_init: children remain, but no parents
    [    0.000049] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 17895                                                                                                                                                             6969942ns
    [    0.002869] Console: colour dummy device 80x30
    [    0.008633] console [tty0] enabled
    [    0.008649] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo                                                                                                                                                              Molnar
    [    0.008658] ... MAX_LOCKDEP_SUBCLASSES:  8
    [    0.008668] ... MAX_LOCK_DEPTH:          48
    [    0.008677] ... MAX_LOCKDEP_KEYS:        8191
    [    0.008686] ... CLASSHASH_SIZE:          4096
    [    0.008695] ... MAX_LOCKDEP_ENTRIES:     16384
    [    0.008704] ... MAX_LOCKDEP_CHAINS:      32768
    [    0.008713] ... CHAINHASH_SIZE:          16384
    [    0.008723]  memory used by lock dependency info: 3695 kB
    [    0.008733]  per task-struct memory footprint: 1152 bytes
    [    0.081230] Calibrating delay loop... 226.09 BogoMIPS (lpj=1130496)
    [    0.081255] pid_max: default: 32768 minimum: 301
    [    0.082012] Security Framework initialized
    [    0.082598] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.082656] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.179804] CPU: Testing write buffer coherency: ok
    [    0.185824] Setting up static identity map for 0x404b7450 - 0x404b74a8
    [    0.221443] devtmpfs: initialized
    [    0.239212] pinctrl core: initialized pinctrl subsystem
    [    0.253529] regulator-dummy: no parameters
    [    0.261986] NET: Registered protocol family 16
    [    0.264499] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.407429] Serial: AMBA PL011 UART driver
    [    0.412097] 80074000.serial: ttyAMA0 at MMIO 0x80074000 (irq = 239, base_baud                                                                                                                                                              = 0) is a PL011 rev2
    [    0.492931] bio: create slab <bio-0> at 0
    [    0.519748] mxs-dma 80004000.dma-apbh: initialized
    [    0.536195] mxs-dma 80024000.dma-apbx: initialized
    [    0.540456] 3P3V: 3300 mV
    [    0.543535] vddio-sd0: 3300 mV
    [    0.547850] usb0_vbus: 5000 mV
    [    0.551669] usb1_vbus: 5000 mV
    [    0.554552] dummy-3v3: 3300 mV
    [    0.558068] wlanreg: 1800 mV
    [    0.562211] SCSI subsystem initialized
    [    0.567185] usbcore: registered new interface driver usbfs
    [    0.568652] usbcore: registered new interface driver hub
    [    0.569879] usbcore: registered new device driver usb
    [    0.639785] pps_core: LinuxPPS API ver. 1 registered
    [    0.639958] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giome                                                                                                                                                             tti <giometti@linux.it>
    [    0.640355] PTP clock support registered
    [    0.645405] Advanced Linux Sound Architecture Driver Initialized.
    [    0.666301] Switched to clocksource mxs_timer
    [    1.315909] FS-Cache: Loaded
    [    1.318293] CacheFiles: Loaded
    [    1.433686] NET: Registered protocol family 2
    [    1.444182] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
    [    1.445086] TCP bind hash table entries: 1024 (order: 4, 73728 bytes)
    [    1.449139] TCP: Hash tables configured (established 1024 bind 1024)
    [    1.450241] TCP: reno registered
    [    1.450551] UDP hash table entries: 256 (order: 3, 40960 bytes)
    [    1.451722] UDP-Lite hash table entries: 256 (order: 3, 40960 bytes)
    [    1.457238] NET: Registered protocol family 1
    [    1.465553] RPC: Registered named UNIX socket transport module.
    [    1.465757] RPC: Registered udp transport module.
    [    1.465891] RPC: Registered tcp transport module.
    [    1.466016] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    1.479959] futex hash table entries: 256 (order: 2, 20480 bytes)
    [    1.666865] NFS: Registering the id_resolver key type
    [    1.670568] Key type id_resolver registered
    [    1.670764] Key type id_legacy registered
    [    1.672009] msgmni has been set to 227
    [    1.678229] Key type big_key registered
    [    1.704339] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 2                                                                                                                                                             49)
    [    1.705270] io scheduler noop registered (default)
    [    1.705483] GPIO_TEST: Initializing the GPIO_TEST LKM
    [    1.709290] GPIO_TEST: The button state is currently: 0
    [    1.709466] GPIO_TEST: The button is mapped to IRQ: 56
    [    1.710721] GPIO_TEST: The interrupt request result is: 0
    [    1.764753] Console: switching to colour frame buffer device 100x30
    [    1.778827] mxsfb 80030000.lcdif: initialized
    [    1.785508] of_dma_request_slave_channel: dma-names property of node '/apb@80                                                                                                                                                             000000/apbx@80040000/serial@80074000' missing or empty
    [    1.794003] uart-pl011 80074000.serial: no DMA platform data
    [    1.801679] 8006a000.serial: ttyAPP0 at MMIO 0x8006a000 (irq = 235, base_baud                                                                                                                                                              = 1500000) is a 8006a000.serial
    [    1.813888] mxs-auart 8006a000.serial: Found APPUART 3.1.0
    [    1.821032] 8006c000.serial: ttyAPP1 at MMIO 0x8006c000 (irq = 236, base_baud                                                                                                                                                              = 1500000) is a 8006c000.serial
    [    1.833878] mxs-auart 8006c000.serial: Found APPUART 3.1.0
    [    1.841581] 80070000.serial: ttyAPP3 at MMIO 0x80070000 (irq = 237, base_baud                                                                                                                                                              = 1500000) is a 80070000.serial
    [    2.448810] console [ttyAPP3] enabled
    [    2.461079] mxs-auart 80070000.serial: Found APPUART 3.1.0
    [    2.474403] 80072000.serial: ttyAPP4 at MMIO 0x80072000 (irq = 238, base_baud                                                                                                                                                              = 1500000) is a 80072000.serial
    [    2.498951] mxs-auart 80072000.serial: Found APPUART 3.1.0
    [    2.512145] at24 0-0050: 4096 byte 24c32 EEPROM, read-only, 0 bytes/write
    [    2.525124] at24 1-0050: 8192 byte 24c64 EEPROM, writable, 32 bytes/write
    [    2.567933] tun: Universal TUN/TAP device driver, 1.6
    [    2.579052] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
    [    2.593907] CAN device driver interface
    [    2.615456] flexcan 80032000.can: device registered (reg_base=c88ac000, irq=2                                                                                                                                                             12)
    [    2.638080] flexcan 80034000.can: device registered (reg_base=c88b0000, irq=2                                                                                                                                                             13)
    [    2.802443] libphy: fec_enet_mii_bus: probed
    [    2.820725] fec 800f4000.ethernet: failed to get phy-reset-gpios: -16
    [    2.842564] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [    2.855553] usbcore: registered new interface driver usb-storage
    [    2.880738] ci_hdrc ci_hdrc.0: EHCI Host Controller
    [    2.896772] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
    [    2.927008] ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
    [    2.967421] hub 1-0:1.0: USB hub found
    [    2.978056] hub 1-0:1.0: 1 port detected
    [    3.014792] ci_hdrc ci_hdrc.1: EHCI Host Controller
    [    3.024807] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 2
    [    3.056765] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
    [    3.077204] hub 2-0:1.0: USB hub found
    [    3.085943] hub 2-0:1.0: 1 port detected
    [    3.116034] stmp3xxx-rtc 80056000.rtc: rtc core: registered 80056000.rtc as r                                                                                                                                                             tc0
    [    3.131400] i2c /dev entries driver
    [    3.153756] lm73 1-0049: sensor 'lm73'
    [    3.164168] lm73 1-004a: sensor 'lm73'
    [    3.180891] stmp3xxx_rtc_wdt stmp3xxx_rtc_wdt: initialized watchdog with hear                                                                                                                                                             tbeat 19s
    [    3.251946] mxs-mmc 80010000.ssp: initialized
    [    3.279149] mxs-mmc 80012000.ssp: Got WP GPIO #28.
    [    3.302361] mmc0: BKOPS_EN bit is not set
    [    3.317466] mmc0: new high speed MMC card at address 0001
    [    3.326789] mxs-mmc 80012000.ssp: initialized
    [    3.375051] mmcblk0: mmc0:0001 Q1J54A 3.64 GiB
    [    3.390989] mxs-dcp 80028000.dcp: Failed to register sha1 hash!
    [    3.397268] mmcblk0boot0: mmc0:0001 Q1J54A partition 1 2.00 MiB
    [    3.407027] mmcblk0boot1: mmc0:0001 Q1J54A partition 2 2.00 MiB
    [    3.447900]  mmcblk0: p1 p2 p3 p4
    [    3.461243] mxs-dcp: probe of 80028000.dcp failed with error -22
    [    3.496864] usbcore: registered new interface driver usbhid
    [    3.511966] usbhid: USB HID core driver
    [    3.516946]  mmcblk0boot1: unknown partition table
    [    3.541676]  mmcblk0boot0: unknown partition table
    [    3.599191] input: mxs-lradc as /devices/soc0/80000000.apb/80040000.apbx/8005                                                                                                                                                             0000.lradc/input/input0
    [    3.618856] mmc1: new high speed SD card at address b368
    [    3.626875] mmcblk1: mmc1:b368 AF SD 1.86 GiB
    [    3.638569]  mmcblk1: p1 p2 p3 p4
    [    3.707005] sgtl5000 1-000a: Failed to get mclock: -2
    [    3.721001] i2c 1-000a: Driver sgtl5000 requests probe deferral
    [    3.745963] mxs-sgtl5000 sound.12: ASoC: CODEC (null) not registered
    [    3.757948] mxs-sgtl5000 sound.12: snd_soc_register_card failed (-517)
    [    3.769302] platform sound.12: Driver mxs-sgtl5000 requests probe deferral
    [    3.782626] Netfilter messages via NETLINK v0.30.
    [    3.791855] nf_conntrack version 0.5.0 (1817 buckets, 7268 max)
    [    3.812257] nf_tables: (c) 2007-2009 Patrick McHardy <kaber@trash.net>
    [    3.823309] nf_tables_compat: (c) 2012 Pablo Neira Ayuso <pablo@netfilter.org                                                                                                                                                             >
    [    3.836232] IPVS: Registered protocols ()
    [    3.848015] IPVS: Connection hash table configured (size=4096, memory=32Kbyte                                                                                                                                                             s)
    [    3.862926] IPVS: Creating netns size=1472 id=0
    [    3.874435] IPVS: ipvs loaded.
    [    3.887641] ip_tables: (C) 2000-2006 Netfilter Core Team
    [    3.898964] TCP: cubic registered
    [    3.907188] NET: Registered protocol family 17
    [    3.918494] Bridge firewalling registered
    [    3.928467] can: controller area network core (rev 20120528 abi 9)
    [    3.940543] NET: Registered protocol family 29
    [    3.950688] can: raw protocol (rev 20120528)
    [    3.960905] can: broadcast manager protocol (rev 20120528 t)
    [    3.973996] Key type dns_resolver registered
    [    3.989765] registered taskstats version 1
    [    4.020459] Key type encrypted registered
    [    4.031689] wlanreg: disabling
    [    4.039980] regulator-dummy: disabling
    [    4.058707] sgtl5000 1-000a: sgtl5000 revision 0x11
    [    4.095798] 1-000a: 1200 mV normal
    [    4.105321] sgtl5000 1-000a: Using internal LDO instead of VDDD
    [    4.148150] mxs-sgtl5000 sound.12: sgtl5000 <-> 80042000.saif mapping ok
    [    4.162146] mxs-sgtl5000 sound.12: sgtl5000 <-> 80046000.saif mapping ok
    [    4.207907] stmp3xxx-rtc 80056000.rtc: setting system clock to 1970-01-01 00:42:21 UTC (2541)
    [    4.312174] ALSA device list:
    [    4.319627]   #0: mxs_sgtl5000
    [    4.370263] EXT2-fs (mmcblk1p3): warning: mounting unchecked fs, running e2fsck is recommended
    [    4.392518] VFS: Mounted root (ext2 filesystem) on device 179:27.
    [    4.412998] devtmpfs: mounted
    [    4.424237] Freeing unused kernel memory: 236K (c06b9000 - c06f4000)
    mounting filesystems...done.
    running rc.d services...
    restoring mixer state...no /etc/asound.state, aborting
    starting udev
    creating static nodes
    starting udevd...[    5.695138] udevd[150]: stdone
    arting version 182
    waiting for devices...[   10.259102] random: nonblocking pool is initialized
    done
    syslogd starting
    klogd starting
    crond starting
    Starting system message bus: dbus.
    starting dropbear...done
    Starting telnetd...
    starting network interfaces...
    [   18.589001] fec 800f4000.ethernet eth1: Freescale FEC PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=800f0000.etherne:01, irq=-1)
    udhcpc (v1.24.1) started
    Sending discover...
    [   20.595860] libphy: 800f0000.etherne:01 - Link is Up - 100/Full
    Sending discover...
    Sending select for 192.168.1.123...
    Lease of 192.168.1.123 obtained, lease time 3600
    deleting routers
    route: SIOCDELRT: No such process
    adding dns 192.168.1.1
    Starting udhcpd...
    loading modules
    

    These are my kernel module logs;

    [ 384.317699] cfg80211: Calling CRDA to update world regulatory domain

    root@TQMa28:~ lsmod
    wl12xx 54928 0 - Live 0xbf198000
    wl18xx 76347 0 - Live 0xbf17d000
    wlcore 173593 2 wl12xx,wl18xx, Live 0xbf145000
    mac80211 494477 3 wl12xx,wl18xx,wlcore, Live 0xbf0a5000
    cfg80211 467514 3 wl18xx,wlcore,mac80211, Live 0xbf005000
    wlcore_spi 6982 0 - Live 0xbf000000

    Thank you,

    Best Regards.

  • Ok,

    Yes, you have to physically connect the module over SPI using all the relevant hardware signals (SPI pins,wlan_enable wlan_irq) and to correctly mux the relevant pins in you board device tree file (.dts)
    Only after that when the modules are loaded (using insmod) the driver will attempt to load and if successful it will create the wlan0 interface.

    Best Regards,
    Eyal
  • Thank you Eyal Reizer,

    This helps me a lot.

    Best Regards
  • Also, I wonder that I need to implement backport to the kernel.

    While I was doing research, I realized that most of the developer uses backporting.

    Thank you,

    Best Regards.