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.

Bring up Wilink with Zynq on custom board

Greetings,

I have recently gotten the TI drivers for the Wilink to work with a microzed and petalinux in preparation for bringing up the same stup for a custom board.  I notice some distinct differences.  Attached is a bootlog on my new board...

I think the problem lies in the startup power.  One think I see is the following line. 

wlan-en-regulator: disabling  

This occurs before my modules are loaded.  I do not see this message on the microzed.  Of note, when I disconnect the module from the Microzed, the WLAN_EN signal is always low but I still do not see the disabling message.

I have looked at the WLAN_EN line.  This is also different.  The WLAN_EN line is low on my board but high on the ZED at power up.  I can control the WLAN_EN line via the linux GPIO mechanism so I think that it is connected properly. 

It would seem that this signal is pulled up on the PMOD adapter and the TI design checklist indicates it is puled up.  Wondering if there is a requirements to have this signal floating when the mmc is brought up.  The mmc does say that it has a vmmc so the device tree should be correct in assigning the fixed regulator to mmc 0.

Any thoughts on what I may be doing incorrectly.

Thanks,

John

Starting kernel ...                                                                                                 
                                                                                                                    
Booting Linux on physical CPU 0x0                                                                                   
Linux version 3.17.0-xilinx (wood_j@nhl-ulnx01) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 25
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d                                                     
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache                                            
Machine model: ARES-200-v0                                                                                          
Ignoring memory range 0x0 - 0x14000000                                                                              
cma: Failed to reserve 128 MiB                                                                                      
Memory policy: Data cache writealloc                                                                                
PERCPU: Embedded 8 pages/cpu @8be5f000 s8704 r8192 d15872 u32768                                                    
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 48768                                          
Kernel command line: console=ttyPS0,115200 earlyprintk                                                              
PID hash table entries: 1024 (order: 0, 4096 bytes)                                                                 
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)                                                     
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)                                                       
Memory: 176596K/196608K available (4797K kernel code, 250K rwdata, 1672K rodata, 11184K init, 211K bss, 20012K rese)
Virtual kernel memory layout:                                                                                       
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)                                                                   
    fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)                                                                   
    vmalloc : 0x8c800000 - 0xff000000   (1832 MB)                                                                   
    lowmem  : 0x80000000 - 0x8c000000   ( 192 MB)                                                                   
    pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)                                                                   
    modules : 0x7f000000 - 0x7fe00000   (  14 MB)                                                                   
      .text : 0x80008000 - 0x806597cc   (6470 kB)                                                                   
      .init : 0x8065a000 - 0x81146200   (11185 kB)                                                                  
      .data : 0x81148000 - 0x81186920   ( 251 kB)                                                                   
       .bss : 0x81186920 - 0x811bb568   ( 212 kB)                                                                   
Preemptible hierarchical RCU implementation.                                                                        
        Dump stacks of tasks blocking RCU-preempt GP.                                                               
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.                                                        
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2                                                        
NR_IRQS:16 nr_irqs:16 16                                                                                            
L2C: platform provided aux values match the hardware, so have no effect.  Please remove them.                       
L2C-310 erratum 769419 enabled                                                                                      
L2C-310 enabling early BRESP for Cortex-A9                                                                          
L2C-310 full line of zeros enabled for Cortex-A9                                                                    
L2C-310 ID prefetch enabled, offset 1 lines                                                                         
L2C-310 dynamic clock gating enabled, standby mode enabled                                                          
L2C-310 cache controller enabled, 8 ways, 512 kB                                                                    
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76360001                                                                   
slcr mapped to 8c804000                                                                                             
zynq_clock_init: clkc starts at 8c804100                                                                            
Zynq clock init                                                                                                     
sched_clock: 64 bits at 300MHz, resolution 3ns, wraps every 1832519335936ns                                         
timer #0 at 8c806000, irq=43                                                                                        
Console: colour dummy device 80x30                                                                                  
Calibrating delay loop... 1196.85 BogoMIPS (lpj=5984256)                                                            
pid_max: default: 32768 minimum: 301                                                                                
Security Framework initialized                                                                                      
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)                                                         
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)                                                    
CPU: Testing write buffer coherency: ok                                                                             
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000                                                                    
Setting up static identity map for 0x14487588 - 0x144875e0                                                          
CPU1: Booted secondary processor                                                                                    
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001                                                                    
Brought up 2 CPUs                                                                                                   
SMP: Total of 2 processors activated.                                                                               
CPU: All CPU(s) started in SVC mode.                                                                                
devtmpfs: initialized                                                                                               
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4                                             
regulator-dummy: no parameters                                                                                      
NET: Registered protocol family 16                                                                                  
DMA: preallocated 256 KiB pool for atomic coherent allocations                                                      
cpuidle: using governor ladder                                                                                      
cpuidle: using governor menu                                                                                        
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.                                         
hw-breakpoint: maximum watchpoint size is 4 bytes.                                                                  
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x8c880000                                                         
VCCPINT: 1000 mV                                                                                                    
wlan-en-regulator: 1800 mV                                                                                          
vgaarb: loaded                                                                                                      
SCSI subsystem initialized                                                                                          
usbcore: registered new interface driver usbfs                                                                      
usbcore: registered new interface driver hub                                                                        
usbcore: registered new device driver usb                                                                           
media: Linux media interface: v0.10                                                                                 
Linux video capture interface: v2.00                                                                                
pps_core: LinuxPPS API ver. 1 registered                                                                            
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>                            
PTP clock support registered                                                                                        
EDAC MC: Ver: 3.0.0                                                                                                 
Advanced Linux Sound Architecture Driver Initialized.                                                               
Switched to clocksource arm_global_timer                                                                            
NET: Registered protocol family 2                                                                                   
TCP established hash table entries: 2048 (order: 1, 8192 bytes)                                                     
TCP bind hash table entries: 2048 (order: 2, 16384 bytes)                                                           
TCP: Hash tables configured (established 2048 bind 2048)                                                            
TCP: reno registered                                                                                                
UDP hash table entries: 256 (order: 1, 8192 bytes)                                                                  
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)                                                             
NET: Registered protocol family 1                                                                                   
RPC: Registered named UNIX socket transport module.                                                                 
RPC: Registered udp transport module.                                                                               
RPC: Registered tcp transport module.                                                                               
RPC: Registered tcp NFSv4.1 backchannel transport module.                                                           
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available                                        
futex hash table entries: 512 (order: 3, 32768 bytes)                                                               
jffs2: version 2.2. (NAND) (SUMMARY)  �© 2001-2006 Red Hat, Inc.                                                    
msgmni has been set to 344                                                                                          
io scheduler noop registered                                                                                        
io scheduler deadline registered                                                                                    
io scheduler cfq registered (default)                                                                               
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-2364208                                                       
dma-pl330 f8003000.dmac:        DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16                               
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 82, base_baud = 6250000) is a xuartps                             
console [ttyPS0] enabled                                                                                            
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to 8c86c000                                                             
[drm] Initialized drm 1.1.0 20060810                                                                                
brd: module loaded                                                                                                  
loop: module loaded                                                                                                 
m25p80 spi32765.0: s25fl129p0 (32768 Kbytes)                                                                        
4 ofpart partitions found on MTD device spi32765.0                                                                  
Creating 4 MTD partitions on "spi32765.0":                                                                          
0x000000000000-0x000000700000 : "boot"                                                                              
0x000000700000-0x000000800000 : "bootenv"                                                                           
0x000000800000-0x000001c00000 : "kernel"                                                                            
0x000001c00000-0x000002000000 : "jffs2"                                                                             
CAN device driver interface                                                                                         
e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k                                                                  
e1000e: Copyright(c) 1999 - 2014 Intel Corporation.                                                                 
usbcore: registered new interface driver asix                                                                       
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver                                                          
ehci-pci: EHCI PCI platform driver                                                                                  
ULPI transceiver vendor/product ID 0x0424/0x0007                                                                    
Found SMSC USB3320 ULPI transceiver.                                                                                
ULPI integrity check: passed.                                                                                       
zynq-ehci zynq-ehci.0: Xilinx Zynq USB EHCI Host Controller                                                         
zynq-ehci zynq-ehci.0: new USB bus registered, assigned bus number 1                                                
zynq-ehci zynq-ehci.0: irq 53, io mem 0x00000000                                                                    
zynq-ehci zynq-ehci.0: USB 2.0 started, EHCI 1.00                                                                   
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002                                                       
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1                                                  
usb usb1: Product: Xilinx Zynq USB EHCI Host Controller                                                             
usb usb1: Manufacturer: Linux 3.17.0-xilinx ehci_hcd                                                                
usb usb1: SerialNumber: zynq-ehci.0                                                                                 
hub 1-0:1.0: USB hub found                                                                                          
hub 1-0:1.0: 1 port detected                                                                                        
usbcore: registered new interface driver usb-storage                                                                
mousedev: PS/2 mouse device common for all mice                                                                     
i2c /dev entries driver                                                                                             
cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 57                                                                 
cdns-i2c e0005000.i2c: 400 kHz mmio e0005000 irq 80                                                                 
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at 8c87e000 with timeout 10s                                      
zynq-edac f8006000.memory-controller: ecc not enabled                                                               
Xilinx Zynq CpuIdle Driver started                                                                                  
sdhci: Secure Digital Host Controller Interface driver                                                              
sdhci: Copyright(c) Pierre Ossman                                                                                   
sdhci-pltfm: SDHCI platform and OF driver helper                                                                    
sdhci-arasan e0100000.sdhci: No vqmmc regulator found                                                               
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA                                                
sdhci-arasan e0101000.sdhci: No vmmc regulator found                                                                
sdhci-arasan e0101000.sdhci: No vqmmc regulator found                                                               
mmc1: SDHCI controller on e0101000.sdhci [e0101000.sdhci] using ADMA                                                
ledtrig-cpu: registered to indicate activity on CPUs                                                                
usbcore: registered new interface driver usbhid                                                                     
usbhid: USB HID core driver                                                                                         
TCP: cubic registered                                                                                               
NET: Registered protocol family 17                                                                                  
can: controller area network core (rev 20120528 abi 9)                                                              
NET: Registered protocol family 29                                                                                  
can: raw protocol (rev 20120528)                                                                                    
can: broadcast manager protocol (rev 20120528 t)                                                                    
can: netlink gateway (rev 20130117) max_hops=1                                                                      
Registering SWP/SWPB emulation handler                                                                              
/home/wood_j/Embedded/arestest/linux/petalinux/components/linux-kernel/xlnx-3.17/drivers/rtc/hctosys.c: unable to o)
wlan-en-regulator: disabling                                                                                        
ALSA device list:                                                                                                   
  No soundcards found.                                                                                              
Freeing unused kernel memory: 11184K (8065a000 - 81146000)                                                          
usb 1-1: new high-speed USB device number 2 using zynq-ehci                                                         
INIT: version 2.88 booting                                                                                          
usb 1-1: New USB device found, idVendor=2001, idProduct=1a02                                                        
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3                                                   
usb 1-1: Product: DUB-E100                                                                                          
usb 1-1: Manufacturer: D-Link Corp.                                                                                 
usb 1-1: SerialNumber: 00000A                                                                                       
Loading modules backported from Linux version R8.6-0-g3f5b34f                                                       
Backport generated by backports.git R8.6-0-g4677dc3                                                                 
cfg80211: Calling CRDA to update world regulatory domain                                                            
Creating /dev/flash/* device nodes                                                                                  
asix 1-1:1.0 eth0: register 'asix' at usb-zynq-ehci.0-1, ASIX AX88772 USB 2.0 Ethernet, 54:b8:0a:ef:ab:3f           
random: dd urandom read with 1 bits of entropy available                                                            
starting Busybox inet Daemon: inetd... done.                                                                        
Starting uWeb server:                                                                                               
update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)                                        
 Removing any system startup links for run-postinsts ...                                                            
INIT: Entering runlevel: 5                                                                                          
Configuring network interfaces... ifup: too few parameters for line "iface"                                         
Starting Dropbear SSH server: dropbear.                                                                             
Create nonvol directory                                                                                             
Mounting jffs2 partition                                                                                            
done.                                                                                                               
loading peeknpoke module                                                                                            
modprobe: module peeknpoke not found in modules.dep                                                                 
making device node                                                                                                  
done.                                                                                                               
Calling nonvol simplefb script                                                                                      
loading simplefb module                                                                                             
modprobe: module simplefb not found in modules.dep                                                                  
Calling nonvol lib_fw_freertos script                                                                               
LIB_FW_FREERTOS.SH from NONVOL: DO NOTHING!                                                                         
Copying freertos to /lib/firmware/freertos                                                                          
random: nonblocking pool is initialized                                                                             
loading freertos through remoteproc                                                                                 
modprobe: module zynq_remoteproc not found in modules.dep                                                           
Configuring custom eth0 interface                                                                                   
done.                                                                                                               
asix 1-1:1.0 eth0: link down 

  • I believe that sort of problem is typically caused by a problem with your device tree setup for your board. If Linux doesn't believe there are any devices that depend on the wlan-en-regulator, it will disable it in my experience.

    I solved something similar with heavy reference to Frank Rowand's Solving Device Tree Issues presentation you can find at elinux.org. ( elinux.org/Device_Tree_frowand )
  • I have been trying to see any errors but I am using the same basic device tree that I got working on the Zed board. Both of my mmc's are initialized and mmc0 shows that it has a vmmc so I am wondering if there is an issue with the SD card being detected. We are using a Xilinx Zync with SDIO connected to EMIO which is different than that of the microzed so there is plenty of room for error. I have attempted to make disable CD so that linux thinks there is always a card there. I suspect that the power not being on when the MMC's are brought up is an issue.
  • I was under the impression the regulator was going to be enabled regardless of the card detect status. On a functioning system I never see the message that the regulator is disabled if booted without a card inserted, so I'm not sure that's the culprit.

    You shouldn't be able to toggle the GPIO you're using for the wlan-en-regulator via the /sys/class/gpio subsystem if it's properly configured in device-tree. The fixed-regulator driver should have grabbed that GPIO and prevent you from exporting it through user space. You may have temporarily disabled the device tree to test that, however.
  • Hi John,

    You can also take a look at: processors.wiki.ti.com/.../WiLink8_Linux_Getting_Started_Guide

    for all the dts changes required.

    Regards,
    Gigi Joseph.
  • I have been through that guide extensively getting the Wilink drivers running on the microZed.  Unfortunately it is not much use for custom board bring up as the changes are mostly specific to the TI devices mentioned.  They are completely different on a Zynq, especially as it pertains to gpio interrupts.  I am digging back into this now and believe the problem is that we are using EMIO instead of GPIO and this the signal is an output and not an input at startup.  This means the regulator may be driven off before being initialized whereas with gpio it happens to work because it is an input and the Wilink pullup turns the device on when the MMC is scanned.  I think that this is just luck it worked on the microzed.

  • I believe in order to move forward you have to probe the wlan_en together with the SDIO CMD&CLOCK lines and check whether there is any attempt from the host side to talk to the wilink8 device.

    Best Regards,

    Eyal

  • John,

    I'm attempting to get the Wilink module up and running with a PicoZed board on the PicoZed carrier card, using PetaLinux 2014.4 kernel 3.17. After a few days of building the TI drivers, patching the kernel, setting the kernel config options, and editing the device tree I've got the board booting with the integrated TI drivers and kernel modules. Much of that was due to your helpful posts on getting it up with the MicroZed, so thank you.

    However, the wlan0 interface isn't recognized. All I get are a bunch of:
    cfg80211: Calling CRDA to update world regulatory domain

    and then it reaches the MAX tries and quits. Nothing in ifconfig -a. The driver's doing it's thing but the device isn't being detected. Although I was just experiencing the wlan_en_regulator: disabling message until I found that that line wasn't getting routed right on the board (fixed now). I see no other errors in my boot messages.

    I'm curious, in TI's Platform Integration Guide, they mention enabling CONFIG_WL12XX_PLATFORM_DATA=y. Did you set this in your kernel config? And if so, how? It's dependent on MAC80211 which is disabled in order to use the backports.

    And you didn't set any pin controls in your device tree did you? I saw that as something specific to the AM33xx parts.

    Thanks for any help
  • I solved my problem.  The PicoZed carrier Pmod connector does not have the same pinout as the MicroZed.  I had to make a custom cable to route the pins on the PicoZed carrier Pmod to the correct pins on the WiLink8 adapter.  It took some trial and error because even with a finger length cable, it was too long to support good data transmission on the SDIO interface.  I had to drastically shorten it to meet the high-speed timing requirements.  Otherwise, I was able to follow your procedure to the letter.

    I still get the message 

    cfg80211: Exceeded CRDA call max attempts. Not calling CRDA

    but, the wlan0 interface is detected and connects successfully.  From what I've read the crda timeout may be related to the busybox mdev in Petalinux.  

    cfg80211: Exceeded CRDA call max attempts. Not calling CRDA