Hi,
We've designed a custom board around the Xilinx Zynq processor including the WL1801. The WL1801 is connected to the Zynq through the SDIO interface. We're trying to bring up the device and not having great success currently. Our Linux image is built using Buildroot and we initially used the TI WL18xx drivers from the Xilinx Linux kernel tree. We couldn't make any progress in bringing up the device with these so switched to using drivers built using instructions on the TI WL18xx Wiki (build-utilities), but again can't seem to get the device working. Here's the information on what we've done.
Building the Drivers
Drivers have been downloaded and built as follows:
git clone git://git.ti.com/wilink8-wlan/build-utilites.git cd build-utilites cp setup-env.sample setup-env gedit setup-env ./build_wl18xx.sh init ./build_wl18xx.sh update R8.6
The last command was failing due to the inclusion of the "__TIMESTAMP__" macro (-Werror=date-time). In order to build successfully we had to make the following change to src/driver/drivers/net/wireless/ti/wlcore/Makefile :
- (echo 'static const char *wlcore_timestamp = __TIMESTAMP__;'; \ + (echo 'static const char *wlcore_timestamp = "11:54, London, 11-Sep-2015";'; \
Device Tree
I've attached the .dts file to the post. Within it we have a fixed regulator for the enable line of the WL1801 and a wlcore section for device control. We've tried various parameters as seen on other posts on these forums which seem to make no difference at all.
wlcore { compatible = "wlcore"; interrupt-parent = <&gpio0>; irq = <11>; platform-quirks = <0x1>; board-ref-clock = <0x4>; }; wlan_en_reg: fixedregulator@0 { compatible = "regulator-fixed"; regulator-name = "wlan-en-regulator"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; gpio = <&gpio0 12 4>; startup-delay-us = <70000>; enable-active-high; };
Inserting the Modules
The modules from the build_wl18xx.sh script are inserted post boot on the target in the following order:
insmod /lib/modules/3.18.0-xilinx/updates/compat/compat.ko insmod /lib/modules/3.18.0-xilinx/updates/net/wireless/cfg80211.ko insmod /lib/modules/3.18.0-xilinx/updates/net/mac80211/mac80211.ko insmod /lib/modules/3.18.0-xilinx/updates/drivers/net/wireless/ti/wlcore/wlcore.ko insmod /lib/modules/3.18.0-xilinx/updates/drivers/net/wireless/ti/wlcore/wlcore_sdio.ko insmod /lib/modules/3.18.0-xilinx/updates/drivers/net/wireless/ti/wl18xx/wl18xx.ko
After inserting all modules the output from lsmod is as follows:
# lsmod Module Size Used by Tainted: G wl18xx 26213 0 wlcore_sdio 5092 0 wlcore 122101 1 wl18xx mac80211 256080 2 wl18xx,wlcore cfg80211 155802 3 wl18xx,wlcore,mac80211 compat 6601 4 wl18xx,wlcore_sdio,mac80211,cfg80211 g_ether 1679 0 usb_f_rndis 10640 2 g_ether usb_f_eem 4197 1 usb_f_ecm_subset 3332 0 usb_f_ecm 5059 0 usb_f_ss_lb 11720 0 u_ether 8087 5 g_ether,usb_f_rndis,usb_f_eem,usb_f_ecm_subset,usb_f_ecm libcomposite 29235 6 g_ether,usb_f_rndis,usb_f_eem,usb_f_ecm_subset,usb_f_ecm,usb_f_ss_lb configfs 16620 7 usb_f_rndis,usb_f_eem,usb_f_ecm_subset,usb_f_ecm,usb_f_ss_lb,libcomposite
After inserting modules trying to set the wlan0 interface to up fails:
# ifconfig wlan0 up ifconfig: SIOCGIFFLAGS: No such device
There is no visible debug in dmesg indicating any activity from the Kernel Modules apart from:
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 cfg80211: Calling CRDA to update world regulatory domain cfg80211: Calling CRDA to update world regulatory domain cfg80211: Calling CRDA to update world regulatory domain cfg80211: Calling CRDA to update world regulatory domain cfg80211: Calling CRDA to update world regulatory domain cfg80211: Calling CRDA to update world regulatory domain cfg80211: Calling CRDA to update world regulatory domain cfg80211: Calling CRDA to update world regulatory domain cfg80211: Calling CRDA to update world regulatory domain cfg80211: Calling CRDA to update world regulatory domain cfg80211: Exceeded CRDA call max attempts. Not calling CRDA
Have we made any obvious mistakes, or is there anything we're missing? Is there anything else we can try or a way of enabling more debug from the modules?
Thanks in advance.
/* * CAUTION: This file is automatically generated by Xilinx. * Version: * Today is: Fri May 15 13:17:22 2015 */ /dts-v1/; /include/ "zynq-7000.dtsi" /include/ "pl.dtsi" / { cpus { cpu@0 { operating-points = <666667 1000000 333334 1000000>; }; }; chosen { bootargs = "console=ttyPS0,115200 mem=0x1fed4000 debug earlyprintk"; }; aliases { serial0 = &uart1; serial1 = &uart0; }; memory { device_type = "memory"; reg = <0x0 0x20000000>; }; gpio-poweroff { compatible = "gpio-poweroff"; gpios = <&gpio0 46 0>; }; framebuffer0: framebuffer@1fed4000 { compatible = "simple-framebuffer"; reg = <0x1fed4000 (480 * 640 * 4)>; width = <480>; height = <640>; stride = <(480 * 4)>; format = "x8r8g8b8"; }; wlcore { compatible = "wlcore"; interrupt-parent = <&gpio0>; irq = <11>; platform-quirks = <0x1>; board-ref-clock = <0x4>; }; wlan_en_reg: fixedregulator@0 { compatible = "regulator-fixed"; regulator-name = "wlan-en-regulator"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; gpio = <&gpio0 12 4>; startup-delay-us = <70000>; enable-active-high; }; }; &gpio0 { emio-gpio-width = <6>; gpio-mask-high = <0x0>; gpio-mask-low = <0x5600>; }; &i2c0 { clock-frequency = <400000>; status = "okay"; rtc { compatible = "dallas,ds1307"; reg = <0x68>; }; }; &intc { num_cpus = <2>; num_interrupts = <96>; }; &qspi { is-dual = <0>; num-cs = <1>; status = "okay"; xlnx,fb-clk = <0x1>; xlnx,qspi-mode = <0x0>; flash@0 { compatible = "s25fl512s"; reg = <0x0>; spi-tx-bus-width = <1>; spi-rx-bus-width = <4>; spi-max-frequency = <100000000>; #address-cells = <1>; #size-cells = <1>; fsbl@0 { label = "fsbl"; reg = <0x0 0x500000>; }; kernel@1 { label = "kernel"; reg = <0x500000 0x500000>; }; devtree@2 { label = "devtree"; reg = <0xA00000 0x40000>; }; ramdisk@3 { label = "ramdisk"; reg = <0xA40000 0x18C0000>; }; flash@4 { label = "flash"; reg = <0x2300000 0x1D00000>; }; }; }; &sdhci0 { clock-frequency = <50000000>; status = "okay"; }; &sdhci1 { clock-frequency = <50000000>; status = "okay"; vmmc-supply = <&wlan_en_reg>; }; &spi0 { is-decoded-cs = <0>; num-cs = <2>; status = "okay"; touchscreen@0 { reg = <0>; /* CS0 */ compatible = "ti,ads7846"; interrupt-parent = <&gpio0>; interrupts = <52 2>; /* MIO 52, falling edge */ spi-max-frequency = <1000000>; pendown-gpio = <&gpio0 52 0>; vcc-supply = <®ulator_vccpint>; /* dummy */ }; nfc@0 { compatible = "ti,trf7970a"; reg = <1>; pinctrl-names = "default"; spi-max-frequency = <2000000>; interrupt-parent = <&gpio0>; interrupts = <15 1>; /* GPIO MIO 15, rising edge */ ti,enable-gpios = <&gpio0 14 0>, <&gpio0 13 0>; /* 13 = dummy- don't need EN2 support */ vin-supply = <®ulator_vccpint>; /* dummy */ autosuspend-delay = <30000>; /*irq-status-read-quirk; en2-rf-quirk;*/ status = "okay"; }; }; &adc { status = "disabled"; }; &uart0 { current-speed = <115200>; device_type = "serial"; port-number = <1>; status = "okay"; }; &uart1 { current-speed = <115200>; device_type = "serial"; port-number = <0>; status = "okay"; }; &usb0 { dr_mode = "peripheral"; phy_type = "ulpi"; status = "okay"; usb-reset = <&gpio0 20 0>; }; &clkc { fclk-enable = <0x3>; ps-clk-frequency = <33333333>; };