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/WL1837MOD: WLAN_EN signal control problem

Part Number: WL1837MOD
Other Parts Discussed in Thread: MIO, WL1837

Tool/software: Linux

Hardware: Zynq US+ with WL1837MOD
Kernel: Linux 4.14 from Xilinx

I have a problem with driving WLAN_EN line with using linux driver. When I control WLAN_EN manually it works correctly (firmware loads, boots, and I can turn on/off wlan0 interface). But when I try to set WLAN_EN management to driver (with using fixed-regulator) it works improperly.

Linux messages when WLAN_EN controlled manually:

[    1.322624] wmmcsdio_fixed: 3300 mV
[    1.322700] reg-fixed-voltage fixedregulator: wmmcsdio_fixed supplying 3300000uV

[    3.129042] mmc0: SDHCI controller on ff160000.sdhci [ff160000.sdhci] using ADMA 64-bit
[    3.145733] mmc0: new high speed SDIO card at address 0001

[    8.953425] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[    8.961005] wlcore: WARNING Detected unconfigured mac address in nvs, derive from fuse instead.
[    8.971109] wlcore: WARNING This default nvs file can be removed from the file system
[    8.981472] wlcore: loaded

$ ifconfig wlan0 up
[   10.569948] wlcore: PHY firmware version: Rev 8.2.0.0.240
[   10.663280] wlcore: firmware booted (Rev 8.9.0.0.76)
[   10.674482] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

Linux messages when WLAN_EN controlled by driver:

[    1.318807] OF: /fixedregulator: arguments longer than property
[    1.318827] reg-fixed-voltage: probe of fixedregulator failed with error -22

[    2.544844] mmc0: SDHCI controller on ff170000.sdhci [ff170000.sdhci] using ADMA 64-bit
[    2.657767] mmc0: error -110 whilst initialising SD card

# ifconfig wlan0 up
ifconfig: SIOCGIFFLAGS: No such device

I tried different device tree configurations, but I can not get it working with WLAN_EN controlled by driver. I see problem with fixed-regulator, but I do not understand what is the reason. When I add parameter gpio in fixedregulator node then I get "reg-fixed-voltage: probe of fixedregulator failed with error -22" and there is not wlan0 interface. How can I solve it?

  • Hi,
    Can you pls share your dts file and kernel logs ?

    Thanks
    Saurabh
  •     wmmcsdio_fixed: fixedregulator {
            compatible = "regulator-fixed";
            regulator-name = "wmmcsdio_fixed";
            regulator-min-microvolt = <3300000>;
            regulator-max-microvolt = <3300000>;
            gpio = <&WLAN_EN 0x0 0x1>;
            startup-delay-us = <70000>;
            //enable-active-high;
        };

    &sdhci0 {
        clock-frequency = <0x2faf080>;
        status = "okay";
        pinctrl-names = "default","sleep";
        pinctrl-0 = <&pinctrl_sdhci0_default>;
        pinctrl-1 = <&pinctrl_sdhci0_sleep>;
        no-1-8-v;
        broken-cd;
        xlnx,mio_bank = <1>;
        disable-wp;
        keep-power-in-suspend;
        non-removable;
        enable-sdio-wakeup;
        //mmc-pwrseq = <&sdio_pwrseq>;
        //vqmmc-supply = <&wmmcsdio_fixed>;
        vmmc-supply = <&wmmcsdio_fixed>;
        cap-power-off-card;

        #address-cells = <1>;
        #size-cells = <0>;
        wlcore: wlcore@2 {
            status = "okay";
            compatible = "ti,wl1837";
            reg = <2>;
            interrupt-parent = <&gpio>;
            interrupts = <29 4>;
        };
    };


  • Hi,
    wmmcsdio_fixed: fixedregulator {
    compatible = "regulator-fixed";
    regulator-name = "wmmcsdio_fixed";
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    gpio = <&WLAN_EN 0x0 0x1>;
    [ER] Ho is this gpio (WLAN_EN) defined?
    [ER] Normally it looks something like:
    /* WLAN_EN GPIO for this board – Bank4, pin7 */
    gpio = <&gpio4 7 GPIO_ACTIVE_HIGH>;

    [ER] Is "WLAN_EN" a standard gpio?


    startup-delay-us = <70000>;
    //enable-active-high;
    };

    Based on the error:
    [ 1.318807] OF: /fixedregulator: arguments longer than property
    It seems like the gpio is not defined correctly and the regulator driver is not able to parse this gpio name.

    BR,
    Eyal
  • Thanks for replies!

    WLAN_EN is defined as a standard generated AXI GPIO core from Xilinx SDK. The node is:
            WLAN_EN: gpio@a0002000 {
                #gpio-cells = <3>;
                clock-names = "s_axi_aclk";
                clocks = <&misc_clk_0>;
                compatible = "xlnx,xps-gpio-1.00.a";
                gpio-controller ;
                reg = <0x0 0xa0002000 0x0 0x1000>;
                xlnx,all-inputs = <0x0>;
                xlnx,all-inputs-2 = <0x0>;
                xlnx,all-outputs = <0x1>;
                xlnx,all-outputs-2 = <0x0>;
                xlnx,dout-default = <0x00000000>;
                xlnx,dout-default-2 = <0x00000000>;
                xlnx,gpio-width = <0x1>;
                xlnx,gpio2-width = <0x20>;
                xlnx,interrupt-present = <0x0>;
                xlnx,is-dual = <0x0>;
                xlnx,tri-default = <0xFFFFFFFF>;
                xlnx,tri-default-2 = <0xFFFFFFFF>;
            };

    gpio = <&WLAN_EN 0x0 0x1>;
    The numbers I set here are:
    - 0x0 - first line from WLAN_EN controller (there is only one line)
    - 0x1 - I referred to the Linux file - gpio.h, where 0x1 means #define GPIO_ACTIVE_LOW 1 (on my board I have a reversed logic on WLAN_EN line, so that is why I set active low)


    "[ 1.318807] OF: /fixedregulator: arguments longer than property
    It seems like the gpio is not defined correctly and the regulator driver is not able to parse this gpio name."

    I tried also name "wlanen", but it was the same result. What could be a another reason of that error?

    I attached my full Linux kernel log.

    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.14.0 (pawzap@gd03) (gcc version 6.4.0 (Buildroot 2018.02.2-00001-g2502d4f)) #10 SMP Fri Jun 8 18:20:16 CEST 2018
    [    0.000000] Boot CPU: AArch64 Processor [410fd034]
    [    0.000000] Machine model: xlnx,zynqmp
    [    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
    [    0.000000] bootconsole [cdns0] enabled
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] cma: Reserved 256 MiB at 0x000000006c000000
    [    0.000000] psci: probing for conduit method from DT.
    [    0.000000] psci: PSCIv1.1 detected in firmware.
    [    0.000000] psci: Using standard PSCI v0.2 function IDs
    [    0.000000] psci: MIGRATE_INFO_TYPE not supported.
    [    0.000000] percpu: Embedded 21 pages/cpu @ffffffc87ff76000 s45080 r8192 d32744 u86016
    [    0.000000] Detected VIPT I-cache on CPU0
    [    0.000000] CPU features: enabling workaround for ARM erratum 845719
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 1034240
    [    0.000000] Kernel command line: earlycon clk_ignore_unused
    [    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
    [    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
    [    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
    [    0.000000] software IO TLB [mem 0x68000000-0x6c000000] (64MB) mapped at [ffffffc068000000-ffffffc06bffffff]
    [    0.000000] Memory: 3755984K/4194304K available (9404K kernel code, 586K rwdata, 2852K rodata, 512K init, 2157K bss, 176176K reserved, 262144K cma-reserved)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
    [    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
    [    0.000000]       .text : 0xffffff8008080000 - 0xffffff80089b0000   (  9408 KB)
    [    0.000000]     .rodata : 0xffffff80089b0000 - 0xffffff8008c80000   (  2880 KB)
    [    0.000000]       .init : 0xffffff8008c80000 - 0xffffff8008d00000   (   512 KB)
    [    0.000000]       .data : 0xffffff8008d00000 - 0xffffff8008d92a00   (   587 KB)
    [    0.000000]        .bss : 0xffffff8008d92a00 - 0xffffff8008fae130   (  2158 KB)
    [    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
    [    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
    [    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
    [    0.000000]               0xffffffbf00000000 - 0xffffffbf1dc00000   (   476 MB actual)
    [    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc880000000   ( 34816 MB)
    [    0.000000] Hierarchical RCU implementation.
    [    0.000000]  RCU event tracing is enabled.
    [    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
    [    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
    [    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
    [    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
    [    0.000000] GIC: Using split EOI/Deactivate mode
    [    0.000000] arch_timer: cp15 timer(s) running at 50.00MHz (phys).
    [    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb8812736b, max_idle_ns: 440795202655 ns
    [    0.000003] sched_clock: 56 bits at 50MHz, resolution 20ns, wraps every 4398046511100ns
    [    0.008245] Console: colour dummy device 80x25
    [    0.012498] console [tty0] enabled
    [    0.015864] bootconsole [cdns0] disabled
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.14.0 (pawzap@gd03) (gcc version 6.4.0 (Buildroot 2018.02.2-00001-g2502d4f)) #10 SMP Fri Jun 8 18:20:16 CEST 2018
    [    0.000000] Boot CPU: AArch64 Processor [410fd034]
    [    0.000000] Machine model: xlnx,zynqmp
    [    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
    [    0.000000] bootconsole [cdns0] enabled
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] cma: Reserved 256 MiB at 0x000000006c000000
    [    0.000000] psci: probing for conduit method from DT.
    [    0.000000] psci: PSCIv1.1 detected in firmware.
    [    0.000000] psci: Using standard PSCI v0.2 function IDs
    [    0.000000] psci: MIGRATE_INFO_TYPE not supported.
    [    0.000000] percpu: Embedded 21 pages/cpu @ffffffc87ff76000 s45080 r8192 d32744 u86016
    [    0.000000] Detected VIPT I-cache on CPU0
    [    0.000000] CPU features: enabling workaround for ARM erratum 845719
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 1034240
    [    0.000000] Kernel command line: earlycon clk_ignore_unused
    [    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
    [    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
    [    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
    [    0.000000] software IO TLB [mem 0x68000000-0x6c000000] (64MB) mapped at [ffffffc068000000-ffffffc06bffffff]
    [    0.000000] Memory: 3755984K/4194304K available (9404K kernel code, 586K rwdata, 2852K rodata, 512K init, 2157K bss, 176176K reserved, 262144K cma-reserved)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
    [    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
    [    0.000000]       .text : 0xffffff8008080000 - 0xffffff80089b0000   (  9408 KB)
    [    0.000000]     .rodata : 0xffffff80089b0000 - 0xffffff8008c80000   (  2880 KB)
    [    0.000000]       .init : 0xffffff8008c80000 - 0xffffff8008d00000   (   512 KB)
    [    0.000000]       .data : 0xffffff8008d00000 - 0xffffff8008d92a00   (   587 KB)
    [    0.000000]        .bss : 0xffffff8008d92a00 - 0xffffff8008fae130   (  2158 KB)
    [    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
    [    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
    [    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
    [    0.000000]               0xffffffbf00000000 - 0xffffffbf1dc00000   (   476 MB actual)
    [    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc880000000   ( 34816 MB)
    [    0.000000] Hierarchical RCU implementation.
    [    0.000000]  RCU event tracing is enabled.
    [    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
    [    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
    [    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
    [    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
    [    0.000000] GIC: Using split EOI/Deactivate mode
    [    0.000000] arch_timer: cp15 timer(s) running at 50.00MHz (phys).
    [    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb8812736b, max_idle_ns: 440795202655 ns
    [    0.000003] sched_clock: 56 bits at 50MHz, resolution 20ns, wraps every 4398046511100ns
    [    0.008245] Console: colour dummy device 80x25
    [    0.012498] console [tty0] enabled
    [    0.015864] bootconsole [cdns0] disabled
    [    0.019773] Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lpj=200000)
    [    0.019787] pid_max: default: 32768 minimum: 301
    [    0.019889] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)
    [    0.019908] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes)
    [    0.020491] ASID allocator initialised with 65536 entries
    [    0.020545] Hierarchical SRCU implementation.
    [    0.020820] EFI services will not be available.
    [    0.020844] zynqmp_plat_init Platform Management API v1.0
    [    0.020852] zynqmp_plat_init Trustzone version v1.0
    [    0.020954] smp: Bringing up secondary CPUs ...
    [    0.021203] Detected VIPT I-cache on CPU1
    [    0.021231] CPU1: Booted secondary processor [410fd034]
    [    0.021501] Detected VIPT I-cache on CPU2
    [    0.021519] CPU2: Booted secondary processor [410fd034]
    [    0.021781] Detected VIPT I-cache on CPU3
    [    0.021799] CPU3: Booted secondary processor [410fd034]
    [    0.021840] smp: Brought up 1 node, 4 CPUs
    [    0.021874] SMP: Total of 4 processors activated.
    [    0.021882] CPU features: detected feature: 32-bit EL0 Support
    [    0.021893] CPU: All CPU(s) started at EL2
    [    0.021908] alternatives: patching kernel code
    [    0.022611] devtmpfs: initialized
    [    0.026027] random: get_random_u32 called from bucket_table_alloc+0xf8/0x280 with crng_init=0
    [    0.026172] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
    [    0.026193] futex hash table entries: 1024 (order: 5, 131072 bytes)
    [    0.031588] xor: measuring software checksum speed
    [    0.067853]    8regs     :  2303.000 MB/sec
    [    0.107884]    8regs_prefetch:  2053.000 MB/sec
    [    0.147918]    32regs    :  2727.000 MB/sec
    [    0.187946]    32regs_prefetch:  2308.000 MB/sec
    [    0.187954] xor: using function: 32regs (2727.000 MB/sec)
    [    0.188020] pinctrl core: initialized pinctrl subsystem
    [    0.188179] random: fast init done
    [    0.188513] NET: Registered protocol family 16
    [    0.189236] cpuidle: using governor menu
    [    0.189575] vdso: 2 pages (1 code @ ffffff80089b6000, 1 data @ ffffff8008d04000)
    [    0.189592] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
    [    0.190044] DMA: preallocated 256 KiB pool for atomic allocations
    [    0.219798] reset_zynqmp reset-controller: Xilinx zynqmp reset driver probed
    [    0.220257] ARM CCI_400_r1 PMU driver probed
    [    0.225133] zynqmp-pinctrl ff180000.pinctrl: zynqmp pinctrl initialized
    [    0.232188] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
    [    0.300129] raid6: int64x1  gen()   419 MB/s
    [    0.368139] raid6: int64x1  xor()   380 MB/s
    [    0.436262] raid6: int64x2  gen()   648 MB/s
    [    0.504267] raid6: int64x2  xor()   528 MB/s
    [    0.572270] raid6: int64x4  gen()   970 MB/s
    [    0.640332] raid6: int64x4  xor()   706 MB/s
    [    0.708406] raid6: int64x8  gen()  1093 MB/s
    [    0.776408] raid6: int64x8  xor()   729 MB/s
    [    0.844514] raid6: neonx1   gen()   699 MB/s
    [    0.912501] raid6: neonx1   xor()   715 MB/s
    [    0.980563] raid6: neonx2   gen()  1136 MB/s
    [    1.048616] raid6: neonx2   xor()  1125 MB/s
    [    1.116677] raid6: neonx4   gen()  1498 MB/s
    [    1.184697] raid6: neonx4   xor()  1409 MB/s
    [    1.252772] raid6: neonx8   gen()  1579 MB/s
    [    1.320803] raid6: neonx8   xor()  1494 MB/s
    [    1.320811] raid6: using algorithm neonx8 gen() 1579 MB/s
    [    1.320819] raid6: .... xor() 1494 MB/s, rmw enabled
    [    1.320827] raid6: using neon recovery algorithm
    [    1.321298] XGpio: /amba_pl@0/gpio@a0003000: registered, base is 511
    [    1.321548] XGpio: /amba_pl@0/gpio@a000e000: registered, base is 508
    [    1.321774] XGpio: /amba_pl@0/gpio@a000f000: registered, base is 504
    [    1.321960] XGpio: /amba_pl@0/gpio@a0002000: registered, base is 503
    [    1.322155] XGpio: /amba_pl@0/gpio@a0010000: registered, base is 502
    [    1.322676] OF: /fixedregulator: arguments longer than property
    [    1.322693] reg-fixed-voltage: probe of fixedregulator failed with error -22
    [    1.322950] SCSI subsystem initialized
    [    1.323112] usbcore: registered new interface driver usbfs
    [    1.323147] usbcore: registered new interface driver hub
    [    1.323191] usbcore: registered new device driver usb
    [    1.323249] media: Linux media interface: v0.10
    [    1.323276] Linux video capture interface: v2.00
    [    1.323315] pps_core: LinuxPPS API ver. 1 registered
    [    1.323323] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    1.323345] PTP clock support registered
    [    1.323376] EDAC MC: Ver: 3.0.0
    [    1.323678] zynqmp-ipi ff9905c0.mailbox: Probed ZynqMP IPI Mailbox driver.
    [    1.323811] FPGA manager framework
    [    1.323912] fpga-region fpga-full: FPGA Region probed
    [    1.324002] Advanced Linux Sound Architecture Driver Initialized.
    [    1.324242] Bluetooth: Core ver 2.22
    [    1.324272] NET: Registered protocol family 31
    [    1.324280] Bluetooth: HCI device and connection manager initialized
    [    1.324292] Bluetooth: HCI socket layer initialized
    [    1.324301] Bluetooth: L2CAP socket layer initialized
    [    1.324320] Bluetooth: SCO socket layer initialized
    [    1.324799] clocksource: Switched to clocksource arch_sys_counter
    [    1.324873] VFS: Disk quotas dquot_6.6.0
    [    1.324916] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
    [    1.328726] NET: Registered protocol family 2
    [    1.329034] TCP established hash table entries: 32768 (order: 6, 262144 bytes)
    [    1.329245] TCP bind hash table entries: 32768 (order: 7, 524288 bytes)
    [    1.329681] TCP: Hash tables configured (established 32768 bind 32768)
    [    1.329753] UDP hash table entries: 2048 (order: 4, 65536 bytes)
    [    1.329834] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
    [    1.329989] NET: Registered protocol family 1
    [    1.330222] RPC: Registered named UNIX socket transport module.
    [    1.330232] RPC: Registered udp transport module.
    [    1.330240] RPC: Registered tcp transport module.
    [    1.330247] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    1.330354] Trying to unpack rootfs image as initramfs...
    [    2.409362] Freeing initrd memory: 30544K
    [    2.409718] hw perfevents: no interrupt-affinity property for /pmu, guessing.
    [    2.409873] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
    [    2.410509] audit: initializing netlink subsys (disabled)
    [    2.410743] audit: type=2000 audit(2.396:1): state=initialized audit_enabled=0 res=1
    [    2.411092] workingset: timestamp_bits=62 max_order=20 bucket_order=0
    [    2.411730] NFS: Registering the id_resolver key type
    [    2.411750] Key type id_resolver registered
    [    2.411758] Key type id_legacy registered
    [    2.411771] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
    [    2.411795] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
    [    2.440005] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
    [    2.440026] io scheduler noop registered
    [    2.440034] io scheduler deadline registered
    [    2.440055] io scheduler cfq registered (default)
    [    2.440064] io scheduler mq-deadline registered
    [    2.440072] io scheduler kyber registered
    [    2.440731] nwl-pcie fd0e0000.pcie: Link is UP
    [    2.440775] OF: PCI: host bridge /amba/pcie@fd0e0000 ranges:
    [    2.440809] OF: PCI:   MEM 0xe0000000..0xefffffff -> 0xe0000000
    [    2.440823] OF: PCI:   MEM 0x600000000..0x7ffffffff -> 0x600000000
    [    2.440948] nwl-pcie fd0e0000.pcie: PCI host bridge to bus 0000:00
    [    2.440962] pci_bus 0000:00: root bus resource [bus 00-ff]
    [    2.440974] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
    [    2.440985] pci_bus 0000:00: root bus resource [mem 0x600000000-0x7ffffffff pref]
    [    2.441522] pci 0000:00:00.0: BAR 8: assigned [mem 0xe0000000-0xe00fffff]
    [    2.441537] pci 0000:00:00.0: BAR 0: assigned [mem 0xe0100000-0xe0101fff pref]
    [    2.441554] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe000ffff 64bit]
    [    2.441579] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0010000-0xe0011fff 64bit]
    [    2.441602] pci 0000:00:00.0: PCI bridge to [bus 01-0c]
    [    2.441614] pci 0000:00:00.0:   bridge window [mem 0xe0000000-0xe00fffff]
    [    2.441647] pci 0000:00:00.0: enabling device (0000 -> 0002)
    [    2.441662] pci 0000:01:00.0: enabling device (0000 -> 0002)
    [    2.442536] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
    [    2.442916] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
    [    2.443062] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
    [    2.443203] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
    [    2.443348] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
    [    2.443490] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
    [    2.443638] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
    [    2.443784] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
    [    2.443924] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
    [    2.444133] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success
    [    2.444275] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success
    [    2.444417] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success
    [    2.444559] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success
    [    2.444701] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success
    [    2.444865] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success
    [    2.445009] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success
    [    2.445151] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success
    [    2.469178] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
    [    2.470618] a0000000.serial: ttyS1 at MMIO 0xa0001000 (irq = 52, base_baud = 3000000) is a 16550A
    [    2.472686] cacheinfo: Unable to detect cache hierarchy for CPU 0
    [    2.476594] brd: module loaded
    [    2.479859] loop: module loaded
    [    2.480668] ahci-ceva fd0c0000.ahci: ceva,p1-cominit-params property not defined
    [    2.480721] ahci-ceva: probe of fd0c0000.ahci failed with error -22
    [    2.480867] mtdoops: mtd device (mtddev=name/number) must be supplied
    [    2.481404] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xda
    [    2.481414] nand: AMD/Spansion S34ML02G1
    [    2.481423] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
    [    2.481437] arasan_nand ff100000.nand: HW ECC selected
    [    2.481447] arasan_nand ff100000.nand: timing mode init failed
    [    2.482158] libphy: Fixed MDIO Bus: probed
    [    2.482397] tun: Universal TUN/TAP device driver, 1.6
    [    2.482500] CAN device driver interface
    [    2.482956] macb ff0d0000.ethernet: Not enabling partial store and forward
    [    2.482983] macb ff0d0000.ethernet: invalid hw address, using random
    [    2.483376] libphy: MACB_mii_bus: probed
    [    2.487375] macb ff0d0000.ethernet eth0: Cadence GEM rev 0x50070106 at 0xff0d0000 irq 31 (2e:25:7a:15:da:53)
    [    2.487393] TI DP83867 ff0d0000.ethernet-ffffffff:09: attached PHY driver [TI DP83867] (mii_bus:phy_addr=ff0d0000.ethernet-ffffffff:09, irq=POLL)
    [    2.487662] macb ff0e0000.ethernet: Not enabling partial store and forward
    [    2.487690] macb ff0e0000.ethernet: invalid hw address, using random
    [    2.488078] libphy: MACB_mii_bus: probed
    [    2.492830] macb ff0e0000.ethernet eth1: Cadence GEM rev 0x50070106 at 0xff0e0000 irq 32 (0a:b4:38:5b:54:d9)
    [    2.492851] TI DP83867 ff0e0000.ethernet-ffffffff:09: attached PHY driver [TI DP83867] (mii_bus:phy_addr=ff0e0000.ethernet-ffffffff:09, irq=POLL)
    [    2.493526] usbcore: registered new interface driver asix
    [    2.493578] usbcore: registered new interface driver ax88179_178a
    [    2.493608] usbcore: registered new interface driver cdc_ether
    [    2.493637] usbcore: registered new interface driver net1080
    [    2.493665] usbcore: registered new interface driver cdc_subset
    [    2.493694] usbcore: registered new interface driver zaurus
    [    2.493733] usbcore: registered new interface driver cdc_ncm
    [    2.494010] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
    [    2.494360] xhci_hcd 0000:01:00.0: xHCI Host Controller
    [    2.494380] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1
    [    2.494801] xhci_hcd 0000:01:00.0: hcc params 0x0270f06d hci version 0x96 quirks 0x04000000
    [    2.495034] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [    2.495047] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    2.495058] usb usb1: Product: xHCI Host Controller
    [    2.495068] usb usb1: Manufacturer: Linux 4.14.0 xhci-hcd
    [    2.495077] usb usb1: SerialNumber: 0000:01:00.0
    [    2.495328] hub 1-0:1.0: USB hub found
    [    2.495357] hub 1-0:1.0: 4 ports detected
    [    2.495652] xhci_hcd 0000:01:00.0: xHCI Host Controller
    [    2.495667] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
    [    2.495719] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
    [    2.495790] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
    [    2.495802] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    2.495814] usb usb2: Product: xHCI Host Controller
    [    2.495823] usb usb2: Manufacturer: Linux 4.14.0 xhci-hcd
    [    2.495832] usb usb2: SerialNumber: 0000:01:00.0
    [    2.496052] hub 2-0:1.0: USB hub found
    [    2.496080] hub 2-0:1.0: 4 ports detected
    [    2.496634] usbcore: registered new interface driver uas
    [    2.496693] usbcore: registered new interface driver usb-storage
    [    2.497180] rtc_zynqmp ffa60000.rtc: rtc core: registered ffa60000.rtc as rtc0
    [    2.497236] i2c /dev entries driver
    [    2.497586] cdns-i2c ff020000.i2c: 400 kHz mmio ff020000 irq 34
    [    2.497783] IR NEC protocol handler initialized
    [    2.497792] IR RC5(x/sz) protocol handler initialized
    [    2.497800] IR RC6 protocol handler initialized
    [    2.497807] IR JVC protocol handler initialized
    [    2.497815] IR Sony protocol handler initialized
    [    2.497823] IR SANYO protocol handler initialized
    [    2.497830] IR Sharp protocol handler initialized
    [    2.497837] IR MCE Keyboard/mouse protocol handler initialized
    [    2.497846] IR XMP protocol handler initialized
    [    2.498556] usbcore: registered new interface driver uvcvideo
    [    2.498566] USB Video Class driver (1.1.1)
    [    2.498987] Bluetooth: HCI UART driver ver 2.3
    [    2.498998] Bluetooth: HCI UART protocol H4 registered
    [    2.499006] Bluetooth: HCI UART protocol BCSP registered
    [    2.499034] Bluetooth: HCI UART protocol LL registered
    [    2.499043] Bluetooth: HCI UART protocol ATH3K registered
    [    2.499051] Bluetooth: HCI UART protocol Three-wire (H5) registered
    [    2.499093] Bluetooth: HCI UART protocol Intel registered
    [    2.499102] Bluetooth: HCI UART protocol QCA registered
    [    2.499142] usbcore: registered new interface driver bcm203x
    [    2.499175] usbcore: registered new interface driver bpa10x
    [    2.499208] usbcore: registered new interface driver bfusb
    [    2.499246] usbcore: registered new interface driver btusb
    [    2.499255] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
    [    2.499305] usbcore: registered new interface driver ath3k
    [    2.499426] EDAC MC: ECC not enabled
    [    2.499589] EDAC DEVICE0: Giving out device to module zynqmp-ocm-edac controller zynqmp_ocm: DEV ff960000.memory-controller (INTERRUPT)
    [    2.500042] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 1200000 KHz
    [    2.500064] cpu cpu0: dev_pm_opp_set_rate: failed to find current OPP for freq 1200000000 (-34)
    [    2.500111] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 1199999 KHz
    [    2.500143] cpu cpu0: dev_pm_opp_set_rate: failed to find current OPP for freq 1200000000 (-34)
    [    2.500525] sdhci: Secure Digital Host Controller Interface driver
    [    2.500535] sdhci: Copyright(c) Pierre Ossman
    [    2.500542] sdhci-pltfm: SDHCI platform and OF driver helper
    [    2.501986] PLL: shutdown
    [    2.502064] zynqmp-pinctrl ff180000.pinctrl: not freeing pin 71 (MIO71) as part of deactivating group sdio0_2_grp - it is already used for some other setting
    [    2.502200] PLL: enable
    [    2.544935] mmc0: SDHCI controller on ff170000.sdhci [ff170000.sdhci] using ADMA 64-bit
    [    2.545289] ledtrig-cpu: registered to indicate activity on CPUs
    [    2.545427] usbcore: registered new interface driver usbhid
    [    2.545436] usbhid: USB HID core driver
    [    2.547367] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
    [    2.549094] pktgen: Packet Generator for packet performance testing. Version: 2.75
    [    2.551384] Netfilter messages via NETLINK v0.30.
    [    2.551509] ip_tables: (C) 2000-2006 Netfilter Core Team
    [    2.551648] Initializing XFRM netlink socket
    [    2.551708] NET: Registered protocol family 10
    [    2.552213] Segment Routing with IPv6
    [    2.552258] ip6_tables: (C) 2000-2006 Netfilter Core Team
    [    2.552434] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    2.552809] NET: Registered protocol family 17
    [    2.552825] NET: Registered protocol family 15
    [    2.552843] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
    [    2.552858] Ebtables v2.0 registered
    [    2.552950] can: controller area network core (rev 20170425 abi 9)
    [    2.552982] NET: Registered protocol family 29
    [    2.552991] can: raw protocol (rev 20170425)
    [    2.552999] can: broadcast manager protocol (rev 20170425 t)
    [    2.553011] can: netlink gateway (rev 20170425) max_hops=1
    [    2.553171] Bluetooth: RFCOMM TTY layer initialized
    [    2.553184] Bluetooth: RFCOMM socket layer initialized
    [    2.553248] Bluetooth: RFCOMM ver 1.11
    [    2.553259] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [    2.553267] Bluetooth: BNEP filters: protocol multicast
    [    2.553278] Bluetooth: BNEP socket layer initialized
    [    2.553286] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
    [    2.553297] Bluetooth: HIDP socket layer initialized
    [    2.553403] 9pnet: Installing 9P2000 support
    [    2.553422] Key type dns_resolver registered
    [    2.553742] registered taskstats version 1
    [    2.554082] Btrfs loaded, crc32c=crc32c-generic
    [    2.560332] ff010000.serial: ttyPS0 at MMIO 0xff010000 (irq = 48, base_baud = 6250000) is a xuartps
    [    2.753198] mmc0: error -110 whilst initialising SD card
    [    4.506225] console [ttyPS0] enabled
    [    4.511101] xilinx-psgtr fd400000.zynqmp_phy: Lane:3 type:8 protocol:4 pll_locked:yes
    [    4.519270] PLL: shutdown
    [    4.523627] xilinx-dp-snd-codec fd4a0000.zynqmp-display:zynqmp_dp_snd_codec0: Xilinx DisplayPort Sound Codec probed
    [    4.534199] xilinx-dp-snd-pcm fd4a0000.zynqmp-display:zynqmp_dp_snd_pcm0: Xilinx DisplayPort Sound PCM probed
    [    4.544219] xilinx-dp-snd-pcm fd4a0000.zynqmp-display:zynqmp_dp_snd_pcm1: Xilinx DisplayPort Sound PCM probed
    [    4.554315] xilinx-dp-snd-pcm fd4a0000.zynqmp-display:zynqmp_dp_snd_pcm1: ASoC: Failed to create component debugfs directory
    [    4.565625] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
    [    4.577985] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
    [    4.590773] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: Xilinx DisplayPort Sound Card probed
    [    4.600883] OF: graph: no port node found in /amba/zynqmp-display@fd4a0000
    [    4.607800] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    4.614339] [drm] No driver support for vblank timestamp query.
    [    4.620306] xlnx-drm xlnx-drm.0: bound fd4a0000.zynqmp-display (ops 0xffffff8008a655a8)
    [    4.659029] [drm] Cannot find any crtc or sizes
    [    4.663640] [drm] Initialized xlnx 1.0.0 20130509 for fd4a0000.zynqmp-display on minor 0
    [    4.671677] zynqmp-display fd4a0000.zynqmp-display: ZynqMP DisplayPort Subsystem driver probed
    [    4.681742] zynqmp-pinctrl ff180000.pinctrl: not freeing pin 71 (MIO71) as part of deactivating group sdio0_2_grp - it is already used for some other setting
    [    4.696458] rtc_zynqmp ffa60000.rtc: setting system clock to 1970-01-01 00:08:38 UTC (518)
    [    4.704747] clk: Not disabling unused clocks
    [    4.708968] ALSA device list:
    [    4.711875]   #0: DisplayPort monitor
    [    4.715943] Freeing unused kernel memory: 512K
    Starting logging: OK
    Initializing random number generator... done.
    Starting system message bus: done
    Starting network: OK
    ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
    Starting sshd: OK
    Module: wlcore_sdio loaded
    Module: wl18xx loaded
    

  • I am not familiar with your host controller (Xilinx) but If I understand it correctly, WLAN_EN is actually defined as a gpio bank and not just as single gpio that is part of this bank.
    It think this is where you are failing as the regulator driver expects a single gpio pin which should be part of a gpio bank.
    You probably need to define a pin inside this bank and this is the pin you need to tell the regulator-fixed-voltage to use.

    In any case this seems related to the use of Xilinx SDK and not the wl18xx driver so it might be wise to consult with Xilinx support and verify that you are using their gpio bank/pins correctly.

    Best Regards,
    Eyal
  • WLAN_EN is defined as a gpio bank (not the same as Zynq US+ bank), but it is possibble to get access to one chosen line. In my project it is defined for only one pin (I set it in programmabble logic; the core can work with up to 32 pins). When I manually drive this line I can get WL1837MOD working, so it seems that WLAN_EN driver works correctly.

    "You probably need to define a pin inside this bank and this is the pin you need to tell the regulator-fixed-voltage to use."
    I did it. In line:
    gpio = <&WLAN_EN 0x0 0x1>;
    0x0 - first line from WLAN_EN controller (there is only one line)
    In my AXI GPIO controller I have only one line with index 0. This value is set in gpio parameter in fixed-regulator.

  • The fixed-regulator driver in the Linux kernel is probably not compatible with this type of gpio definition for some reason.
    I suggest you add some debug prints into the drivers/regulator/fixed.c in the Linux kernel you use and see what it complains about as it surely failing parsing your gpio definition line.

    BR,
    Eyal
  • You are right. I did not notice that recently Xilinx made update to gpio driver and now it uses three cells instead two. Now I get:

    [    1.322616] Check gpio port for fixed-regulator: 503
    [    1.402635] wmmcsdio_fixed: 3300 mV
    [    1.402734] reg-fixed-voltage fixedregulator: wmmcsdio_fixed supplying 3300000uV

    Error disappeared and fixed-regulator gets proper gpio controller registered with base 503. This is the same as I controlled manually.

    Unfortunately it is not end of my Wi-Fi problems - now I gets timeouts and still wlan0 interface is not available. I attached the kernel log.

    2402.dmesg2.txt

  • Hi,

    Any chance the regulator is disabled after it initializes, shutting the interface down?

    Try adding something like:

    regulator-boot-on;

    To the regulator node on the .dts file.

    You have also commented the "enabled-active-high". Why?

    BR

    Eyal

  • In my opinion there is no chance that regulator is disabled. By default I set WLAN_EN to be low state and after boot WLAN_EN goes to high. I measured it with multimeter.

    I set regulator-boot-on but there is not change. Still I get timeouts.

    I commented "enabled-active-high" parameter, because I have a reversed logic on WLAN_EN line. When I leave "enabled-active-high" not commented then WLAN_EN stays in low state.

    In my kernel log I do not get "mmc0: new high speed SDIO card at address 0001".
  • If you are not getting "mmc0: new high speed SDIO card at address 0001" it can only mean that the module is not powered on during boot.

    I have seen the following dts file which seems similar to what you are doing:
    github.com/.../zcu100-reva.dtsi

    Can you try similar settings as this files for your .dts using @sdio_pwrseq for wlan_en instead of vmmc?

    BR,
    Eyal
  • Hi,

    I believe that the next step you need to do is hardware probe the sdio bus lines together with the wlan_enable line during boot and see why it is not probing (using a scope).
    It has to be related to wlan_enable not being active when the mmc is probing but you need to do a scope capture and verify that.
    You can only proceed after you get "mmc0: new high speed SDIO card at address 0001"

    Best Regards,
    Eyal