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/AM3358: Wilink WL1831 not working

Part Number: AM3358
Other Parts Discussed in Thread: WL1831

Tool/software: Linux

I am trying to get wlan0 working with AM3358, and WL1831.

If I type ifconfig -a, wlan0 is not listed.

The dmesg log is showing:

[    1.642573] wlan-1-en-regulator: disabling

I am using:

git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git

v4.9.69-2821-g89d085d

device tree is attached.

dmesg.txt is attached

The schematic has been uploaded to the secure site and given to Brad Griffis and Bin Liu.

/dts-v1/;

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

/ {
    model = "xxx";
    compatible = "xxx", "ti,am33xx";

    cpus {
        cpu@0 {
        };
    };

    chosen {
        stdout-path = &uart0;
    };

    memory@80000000 {
        device_type = "memory";
        reg = <0x80000000 0x20000000>; /* 512 MB */
    };

    leds {
        pinctrl-names = "default";
        pinctrl-0 = <&mygpio1_pins_default>;

        compatible = "gpio_leds";

        led0 {
            label = "heartbeat";
            gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
            linux,default-trigger = "heartbeat";
            default-state = "off";
        };

        led1 {
            label = "cpu0";
            gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
            linux,default-trigger = "cpu0";
            default-state = "off";
        };

        led2 {
            label = "mmc1";
            gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
            linux,default-trigger = "mmc1";
            default-state = "off";
        };

        led3 {
            label = "eth0";
            gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
            linux,default-trigger = "eth0";
            default-state = "off";
        };
    };

    jtag {
        pinctrl-names = "default";
        pinxtrl-0 = <&mydebugss1_pins_default>;
    };

    vmmcsd_fixed: fixedregulator@0 {
        compatible = "regulator-fixed";
        regulator-name = "vmmcsd_fixed";
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
    };

    wlan_1_en_reg: fixedregulator@1 {
        compatible = "regulator-fixed";
        regulator-name = "wlan-1-en-regulator";
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
        startup-delay-us = <70000>;

        gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>; /* v8 */
        enable-active-high;
    };
};

&am33xx_pinmux {
    pinctrl-names = "default";

    myrtc1_pins_default: myrtc1_pins_default {
        pinctrl-single,pins = <
            0x1f8 ( PIN_INPUT | MUX_MODE0 ) /* (B5) RTC_PORz.RTC_PORz */
            0x200 ( PIN_OUTPUT | MUX_MODE0 ) /* (C5) EXT_WAKEUP.EXT_WAKEUP */
            0x1fc ( PIN_INPUT | MUX_MODE0 ) /* (C6) PMIC_POWER_EN.PMIC_POWER_EN */
            0x204 ( PIN_INPUT | MUX_MODE0 ) /* (B4) ENZ_KALDO_1P8V.ENZ_KALDO_1P8V */
        >;
    };

    mydebugss1_pins_default: mydebugss1_pins_default {
        pinctrl-single,pins = <
            0x1d0 ( PIN_INPUT | MUX_MODE0 ) /* (C11) TMS.TMS */
            0x1d4 ( PIN_INPUT | MUX_MODE0 ) /* (B11) TDI.TDI */
            0x1d8 ( PIN_OUTPUT | MUX_MODE0 ) /* (A11) TDO.TDO */
            0x1dc ( PIN_INPUT | MUX_MODE0 ) /* (A12) TCK.TCK */
            0x1e0 ( PIN_INPUT | MUX_MODE0 ) /* (B10) nTRST.nTRST */
            0x1e4 ( PIN_INPUT | MUX_MODE0 ) /* (C14) EMU0.EMU0 */
            0x1e8 ( PIN_INPUT | MUX_MODE0 ) /* (B14) EMU1.EMU1 */
        >;
    };

    mygpio1_pins_default: mygpio1_pins_default {
        pinctrl-single,pins = <
            0x164 ( PIN_INPUT | MUX_MODE7 ) /* (C18) eCAP0_in_PWM0_out.gpio0[7] */
            0x120 ( PIN_INPUT | MUX_MODE7 ) /* (K15) gmii1_txd2.gpio0[17] */
            0x1b0 ( PIN_OUTPUT | MUX_MODE7 ) /* (A15) xdma_event_intr0.gpio0[19] */
            0x74 ( PIN_INPUT | MUX_MODE7 ) /* (U17) gpmc_wpn.gpio0[31] */
        >;
    };

    mygpio2_pins_default: mygpio2_pins_default {
        pinctrl-single,pins = <
            0x90 ( PIN_INPUT | MUX_MODE7 ) /* (R7) gpmc_advn_ale.gpio2[2] */
            0x94 ( PIN_INPUT | MUX_MODE7 ) /* (T7) gpmc_oen_ren.gpio2[3] */
            0x98 ( PIN_INPUT | MUX_MODE7 ) /* (U6) gpmc_wen.gpio2[4] */
            0x9c ( PIN_INPUT | MUX_MODE7 ) /* (T6) gpmc_be0n_cle.gpio2[5] */
        >;
    };

    mygpio3_pins_default: mygpio3_pins_default {
        pinctrl-single,pins = <
            0x190 ( PIN_INPUT | MUX_MODE7 ) /* (A13) mcasp0_aclkx.gpio3[14] */
            0x194 ( PIN_INPUT | MUX_MODE7 ) /* (B13) mcasp0_fsx.gpio3[15] */
            0x1a0 ( PIN_INPUT | MUX_MODE7 ) /* (B12) mcasp0_aclkr.gpio3[18] */
            0x1ac ( PIN_INPUT | MUX_MODE7 ) /* (A14) mcasp0_ahclkx.gpio3[21] */
        >;
    };

    mygpio4_pins_default: mygpio4_pins_default {
        pinctrl-single,pins = <
            0x0 ( PIN_OUTPUT | MUX_MODE7 ) /* (U7) gpmc_ad0.gpio1[0] */
            0x4 ( PIN_OUTPUT | MUX_MODE7 ) /* (V7) gpmc_ad1.gpio1[1] */
            0x8 ( PIN_OUTPUT | MUX_MODE7 ) /* (R8) gpmc_ad2.gpio1[2] */
            0xc ( PIN_OUTPUT | MUX_MODE7 ) /* (T8) gpmc_ad3.gpio1[3] */
            0x50 ( PIN_OUTPUT | MUX_MODE7 ) /* (R14) gpmc_a4.gpio1[20] */
            0x54 ( PIN_OUTPUT_PULLUP | MUX_MODE7 ) /* (V15) gpmc_a5.gpio1[21] */
        >;
    };

    wlan_disc_1_pins: wlan_disc_1_pins {
        pinctrl-single,pins = <
            0x18 ( PIN_INPUT | MUX_MODE7 ) /* (R9) gpmc_ad6.gpio1[6] */
            0x14 ( PIN_OUTPUT_PULLDOWN | MUX_MODE7 ) /* (V8) gpmc_ad5.gpio1[5] */
            0x10 ( PIN_OUTPUT_PULLDOWN | MUX_MODE7 ) /* (U8) gpmc_ad4.gpio1[4] */
        >;
    };

    myglue1_pins_default: myglue1_pins_default {
        pinctrl-single,pins = <
            0x1b8 ( PIN_INPUT | MUX_MODE0 ) /* (A10) nRESETIN_OUT.nRESETIN_OUT */
            0x1c0 ( PIN_INPUT | MUX_MODE0 ) /* (B18) nNMI.nNMI */
        >;
    };

    mymdio1_pins_default: mymdio1_pins_default {
        pinctrl-single,pins = <
            0x14c ( PIN_OUTPUT | MUX_MODE0 ) /* (M18) mdio_clk.mdio_clk */
            0x148 ( PIN_INPUT | MUX_MODE0 ) /* (M17) mdio_data.mdio_data */
            0x11c ( PIN_OUTPUT_PULLUP | MUX_MODE7 ) /* (J18) gmii1_txd3.gpio0[16] */
        >;
    };

    myrmii1_pins_default: myrmii1_pins_default {
        pinctrl-single,pins = <
            0x10c ( PIN_INPUT | MUX_MODE1 ) /* (H17) gmii1_crs.rmii1_crs_dv */
            0x110 ( PIN_INPUT | MUX_MODE1 ) /* (J15) gmii1_rxer.rmii1_rxer */
            0x114 ( PIN_OUTPUT | MUX_MODE1 ) /* (J16) gmii1_txen.rmii1_txen */
            0x128 ( PIN_OUTPUT | MUX_MODE1 ) /* (K17) gmii1_txd0.rmii1_txd0 */
            0x124 ( PIN_OUTPUT | MUX_MODE1 ) /* (K16) gmii1_txd1.rmii1_txd1 */
            0x140 ( PIN_INPUT | MUX_MODE1 ) /* (M16) gmii1_rxd0.rmii1_rxd0 */
            0x13c ( PIN_INPUT | MUX_MODE1 ) /* (L15) gmii1_rxd1.rmii1_rxd1 */
            0x144 ( PIN_INPUT | MUX_MODE0 ) /* (H18) rmii1_refclk.rmii1_refclk */
        >;
    };

    mymmc1_pins_default: mymmc1_pins_default {
        pinctrl-single,pins = <
            0x100 ( PIN_INPUT | MUX_MODE0 ) /* (G17) mmc0_clk.mmc0_clk */
            0x104 ( PIN_INPUT | MUX_MODE0 ) /* (G18) mmc0_cmd.mmc0_cmd */
            0xfc ( PIN_INPUT | MUX_MODE0 ) /* (G16) mmc0_dat0.mmc0_dat0 */
            0xf8 ( PIN_INPUT | MUX_MODE0 ) /* (G15) mmc0_dat1.mmc0_dat1 */
            0xf4 ( PIN_INPUT | MUX_MODE0 ) /* (F18) mmc0_dat2.mmc0_dat2 */
            0xf0 ( PIN_INPUT | MUX_MODE0 ) /* (F17) mmc0_dat3.mmc0_dat3 */
            0x138 ( PIN_INPUT | MUX_MODE3 ) /* (L16) gmii1_rxd2.mmc0_dat4 */
            0x134 ( PIN_INPUT | MUX_MODE3 ) /* (L17) gmii1_rxd3.mmc0_dat5 */
            0x130 ( PIN_INPUT | MUX_MODE3 ) /* (L18) gmii1_rxclk.mmc0_dat6 */
            0x12c ( PIN_INPUT | MUX_MODE3 ) /* (K18) gmii1_txclk.mmc0_dat7 */
        >;
    };

    mymmc2_pins_default: mymmc2_pins_default {
        pinctrl-single,pins = <
            0x8c ( PIN_INPUT | MUX_MODE3 ) /* (V12) gpmc_clk.mmc2_clk */
            0x88 ( PIN_INPUT | MUX_MODE3 ) /* (T13) gpmc_csn3.mmc2_cmd */
            0x44 ( PIN_INPUT | MUX_MODE3 ) /* (V14) gpmc_a1.mmc2_dat0 */
            0x48 ( PIN_INPUT | MUX_MODE3 ) /* (U14) gpmc_a2.mmc2_dat1 */
            0x4c ( PIN_INPUT | MUX_MODE3 ) /* (T14) gpmc_a3.mmc2_dat2 */
            0x78 ( PIN_INPUT | MUX_MODE3 ) /* (U18) gpmc_be1n.mmc2_dat3 */
        >;
    };

    myi2c1_pins_default: myi2c1_pins_default {
        pinctrl-single,pins = <
            0x18c ( PIN_INPUT | MUX_MODE0 ) /* (C16) I2C0_SCL.I2C0_SCL */
            0x188 ( PIN_INPUT | MUX_MODE0 ) /* (C17) I2C0_SDA.I2C0_SDA */
        >;
    };

    myusb1_pins_default: myusb1_pins_default {
        pinctrl-single,pins = <
            0x21c ( PIN_OUTPUT | MUX_MODE0 ) /* (F16) USB0_DRVVBUS.USB0_DRVVBUS */
        >;
    };

    myspi1_pins_default: myspi1_pins_default {
        pinctrl-single,pins = <
            0x150 ( PIN_INPUT | MUX_MODE0 ) /* (A17) spi0_sclk.spi0_sclk */
            0x154 ( PIN_INPUT | MUX_MODE0 ) /* (B17) spi0_d0.spi0_d0 */
            0x158 ( PIN_INPUT | MUX_MODE0 ) /* (B16) spi0_d1.spi0_d1 */
            0x15c ( PIN_INPUT | MUX_MODE0 ) /* (A16) spi0_cs0.spi0_cs0 */
        >;
    };

    myuart1_pins_default: myuart1_pins_default {
        pinctrl-single,pins = <
            0x180 ( PIN_INPUT | MUX_MODE0 ) /* (D16) uart1_rxd.uart1_rxd */
            0x184 ( PIN_OUTPUT | MUX_MODE0 ) /* (D15) uart1_txd.uart1_txd */
            0x178 ( PIN_INPUT | MUX_MODE0 ) /* (D18) uart1_ctsn.uart1_ctsn */
            0x17c ( PIN_OUTPUT | MUX_MODE0 ) /* (D17) uart1_rtsn.uart1_rtsn */
        >;
    };

    myuart2_pins_default: myuart2_pins_default {
        pinctrl-single,pins = <
            0x170 ( PIN_INPUT | MUX_MODE0 ) /* (E15) uart0_rxd.uart0_rxd */
            0x174 ( PIN_OUTPUT | MUX_MODE0 ) /* (E16) uart0_txd.uart0_txd */
        >;
    };

};

&uart1 {
    pinctrl-names = "default";
    pinctrl-0 = <&myuart1_pins_default>;

    status = "okay";
};

&uart0 {
    pinctrl-names = "default";
    pinctrl-0 = <&myuart2_pins_default>;

    status = "okay";
};

&i2c0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&myi2c1_pins_default>;
    clock-frequency = <400000>;
    #address-cells = <1>;
    #size-cells = <0>;

};


&spi0 {
    pinctrl-names = "default";
    pinctrl-0 = <&myspi1_pins_default>;
    status = "okay";
    flash: mx25u12835f@0 {
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "macronix,mx25u12835f", "jedec,spi-nor";
        spi-max-frequency = <66000000>;
        reg = <0>;

        partitions {
            compatible = "fixed-partitions";
            #address-cells = <1>;
            #size-cells = <1>;
            /* 0x00000->0x0ffff    spl 1 64KiB NLO */
            spl@0 {
                reg = <0x0 0x10000>;
            };
            /* 0x10000->0x8ffff    u-boot uboot.img 512KB */
            u-boot@10000 {
                reg = <0x10000 0x80000>;
            };
            /* 0x90000->0x10ffff    u-boot1 uboot.img 512KB */
            u-boot1@90000 {
                reg = <0x90000 0x80000>;
            };
            /* 0x110000->0x12ffff    env1 128KB */
            u-boot-env1@110000 {
                reg = <0x110000 0x20000>;
            };
            /* 0x130000->0x14ffff    env2 128KB */
            u-boot-env2@130000 {
                reg = <0x130000 0x20000>;
            };
            /* 0x150000->0x15ffff    key  64KB      */
            key@150000 {
                reg = <0x150000 0x10000>;
            };
            /* 0x160000->0x16ffff    oemkey  64KB     */
            oemkey@160000 {
                reg = <0x160000 0x10000>;
            };
            /* 0x170000 ->0x96ffff emmc.img.gz 8MB  */
            emmcimggz@170000 {
                reg = <0x170000 0x800000>;
            };
            /* 0x970000 ->0xffffff   empty   */
            empty@970000 {
                reg = <0x900000 0x700000>;
            };

        };
    };
};

&usb {
    status = "okay";
};

&usb_ctrl_mod {
    status = "okay";
};

&usb0_phy {
    status = "okay";
};

&usb0 {
    status = "okay";
    dr_mode = "host";
    /* maximum-speed = "full-speed"; */
};

&cppi41dma {
    status = "okay";
    };

&mmc3 {
    pinctrl-names = "default";
    pinctrl-0 = <&mymmc2_pins_default &wlan_disc_1_pins>;
    vmmc-supply = <&wlan_1_en_reg>;
    bus-width = <4>;
    status = "okay";
    ti,non-removable;
    ti,needs-special-hs-handling;
    cap-power-off-card;
    keep-power-in-suspend;

    #address-cells = <1>;
    #size-cells = <0>;
    wlcore@2 {
        compatible = "ti,wl1831";
        reg = <2>;
        interrupt-parent = <&gpio1>;
        interrupts = <6 IRQ_TYPE_EDGE_RISING>;
    };
};

&mmc1 {
    pinctrl-names = "default";
    pinctrl-0 = <&mymmc1_pins_default>;
    ti,non-removable;
    bus-width = <8>;
    status = "okay";
    vmmc-supply = <&vmmcsd_fixed>;
};

&davinci_mdio {
    pinctrl-names = "default";
    pintctrl-0 = <&mymdio1_pins_default>;
    status = "okay";
};

&cpsw_emac0 {
    phy_id = <&davinci_mdio>, <0>;
    phy-mode = "rmii";
    reset-gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
};

&phy_sel {
    rmii-clock-ext;
};

&mac {
    pinctrl-names = "default";
    pinctrl-0 = <&myrmii1_pins_default>;
    status = "okay";
};

&rtc {
    status = "disabled";
};
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.69-g89d085d1a4 (gcc version 6.4.0 (GCC) ) #4 PREEMPT Fri May 25 13:01:13 CDT 2018
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt:Machine model: xxx
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 48 MiB at 0x9d000000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 131072
[    0.000000] free_area_init_node: node 0, pgdat c0c434a4, node_mem_map dcb61000
[    0.000000]   Normal zone: 1152 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 131072 pages, LIFO batch:31
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (sgx neon)
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
[    0.000000] Kernel command line: console=ttyS0,115200 ramdisk_size=327680 root=/dev/ram0 rw rootfstype=ext2
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 417340K/524288K available (7168K kernel code, 279K rwdata, 2416K rodata, 1024K init, 287K bss, 57796K reserved, 49152K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0800000   (8160 kB)
[    0.000000]       .init : 0xc0b00000 - 0xc0c00000   (1024 kB)
[    0.000000]       .data : 0xc0c00000 - 0xc0c45c70   ( 280 kB)
[    0.000000]        .bss : 0xc0c45c70 - 0xc0c8d9f4   ( 288 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] 	Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] OMAP clockevent source: timer2 at 26000000 Hz
[    0.000015] sched_clock: 32 bits at 26MHz, resolution 38ns, wraps every 82595524588ns
[    0.000034] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 73510017198 ns
[    0.000044] OMAP clocksource: timer1 at 26000000 Hz
[    0.000201] clocksource_probe: no matching clocksources found
[    0.000375] Console: colour dummy device 80x30
[    0.000417] Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
[    0.089143] pid_max: default: 32768 minimum: 301
[    0.089259] Security Framework initialized
[    0.089300] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.089309] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090139] CPU: Testing write buffer coherency: ok
[    0.090526] Setting up static identity map for 0x80100000 - 0x80100060
[    0.091385] EFI services will not be available.
[    0.092790] devtmpfs: initialized
[    0.104034] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.104423] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.104450] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.108122] pinctrl core: initialized pinctrl subsystem
[    0.109595] NET: Registered protocol family 16
[    0.111574] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.126825] omap_hwmod: debugss: _wait_target_disable failed
[    0.219139] cpuidle: using governor ladder
[    0.249129] cpuidle: using governor menu
[    0.253617] gpio gpiochip0: (gpio): added GPIO chardev (254:0)
[    0.254003] gpiochip_setup_dev: registered GPIOs 0 to 31 on device: gpiochip0 (gpio)
[    0.255483] OMAP GPIO hardware version 0.1
[    0.256349] gpio gpiochip1: (gpio): added GPIO chardev (254:1)
[    0.256692] gpiochip_setup_dev: registered GPIOs 32 to 63 on device: gpiochip1 (gpio)
[    0.258805] gpio gpiochip2: (gpio): added GPIO chardev (254:2)
[    0.259295] gpiochip_setup_dev: registered GPIOs 64 to 95 on device: gpiochip2 (gpio)
[    0.261376] gpio gpiochip3: (gpio): added GPIO chardev (254:3)
[    0.261705] gpiochip_setup_dev: registered GPIOs 96 to 127 on device: gpiochip3 (gpio)
[    0.270665] No ATAGs?
[    0.270690] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.307544] edma 49000000.edma: TI EDMA DMA engine driver
[    0.307865] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator@0[0]'
[    0.308233] of_get_named_gpiod_flags: parsed 'gpio' property of node '/fixedregulator@1[0]' - status (0)
[    0.311365] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/myi2c1_pins_default, deferring probe
[    0.311499] media: Linux media interface: v0.10
[    0.311559] Linux video capture interface: v2.00
[    0.311602] pps_core: LinuxPPS API ver. 1 registered
[    0.311610] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.311641] PTP clock support registered
[    0.311680] EDAC MC: Ver: 3.0.0
[    0.312785] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[    0.313129] Advanced Linux Sound Architecture Driver Initialized.
[    0.314424] clocksource: Switched to clocksource timer1
[    0.325342] NET: Registered protocol family 2
[    0.326140] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.326195] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.326242] TCP: Hash tables configured (established 4096 bind 4096)
[    0.326328] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.326346] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.326488] NET: Registered protocol family 1
[    0.326933] RPC: Registered named UNIX socket transport module.
[    0.326947] RPC: Registered udp transport module.
[    0.326953] RPC: Registered tcp transport module.
[    0.326960] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.326975] PCI: CLS 0 bytes, default 64
[    0.327508] Trying to unpack rootfs image as initramfs...
[    0.328329] rootfs image is not initramfs (no cpio magic); looks like an initrd
[    0.562746] Freeing initrd memory: 40636K
[    0.563260] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    0.566013] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.573961] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.575087] NFS: Registering the id_resolver key type
[    0.575136] Key type id_resolver registered
[    0.575143] Key type id_legacy registered
[    0.575193] ntfs: driver 2.1.32 [Flags: R/O].
[    0.580663] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.580687] io scheduler noop registered
[    0.580695] io scheduler deadline registered
[    0.580860] io scheduler cfq registered (default)
[    0.582103] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    0.647879] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
[    0.651651] console [ttyS0] disabled
[    0.651750] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
[    1.237545] console [ttyS0] enabled
[    1.242205] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250
[    1.252798] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
[    1.259696] [drm] Initialized
[    1.276990] brd: module loaded
[    1.286977] loop: module loaded
[    1.292811] m25p80 spi1.0: mx25u12835f (16384 Kbytes)
[    1.298118] 9 ofpart partitions found on MTD device spi1.0
[    1.303631] Creating 9 MTD partitions on "spi1.0":
[    1.308477] 0x000000000000-0x000000010000 : "spl"
[    1.314625] 0x000000010000-0x000000090000 : "u-boot"
[    1.320813] 0x000000090000-0x000000110000 : "u-boot1"
[    1.327153] 0x000000110000-0x000000130000 : "u-boot-env1"
[    1.333774] 0x000000130000-0x000000150000 : "u-boot-env2"
[    1.340432] 0x000000150000-0x000000160000 : "key"
[    1.346317] 0x000000160000-0x000000170000 : "oemkey"
[    1.352437] 0x000000170000-0x000000970000 : "emmcimggz"
[    1.358915] 0x000000900000-0x000001000000 : "empty"
[    1.365730] libphy: Fixed MDIO Bus: probed
[    1.444497] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[    1.450636] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[    1.457861] libphy: 4a101000.mdio: probed
[    1.461902] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver Micrel KSZ8081 or KSZ8091
[    1.472338] cpsw 4a100000.ethernet: No slave[1] phy_id, phy-handle, or fixed-link property
[    1.480764] cpsw 4a100000.ethernet: Detected MACID = 60:64:05:40:eb:5d
[    1.487562] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[    1.496617] mousedev: PS/2 mouse device common for all mice
[    1.502769] i2c /dev entries driver
[    1.508846] cpuidle: enable-method property 'ti,am3352' found operations
[    1.516623] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
[    1.516634] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
[    1.516644] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@48060000[0]'
[    1.516652] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@48060000[0]'
[    1.516658] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
[    1.516666] omap_hsmmc 48060000.mmc: lookup for GPIO cd failed
[    1.516676] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
[    1.516681] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
[    1.516688] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@48060000[0]'
[    1.516694] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@48060000[0]'
[    1.516699] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
[    1.516705] omap_hsmmc 48060000.mmc: lookup for GPIO wp failed
[    1.574990] omap_hsmmc 47810000.mmc: GPIO lookup for consumer cd
[    1.575004] omap_hsmmc 47810000.mmc: using device tree for GPIO lookup
[    1.575019] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@47810000[0]'
[    1.575028] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@47810000[0]'
[    1.575036] omap_hsmmc 47810000.mmc: using lookup tables for GPIO lookup
[    1.575046] omap_hsmmc 47810000.mmc: lookup for GPIO cd failed
[    1.575057] omap_hsmmc 47810000.mmc: GPIO lookup for consumer wp
[    1.575065] omap_hsmmc 47810000.mmc: using device tree for GPIO lookup
[    1.575073] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@47810000[0]'
[    1.575081] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@47810000[0]'
[    1.575089] omap_hsmmc 47810000.mmc: using lookup tables for GPIO lookup
[    1.575097] omap_hsmmc 47810000.mmc: lookup for GPIO wp failed
[    1.578472] omap_hsmmc 47810000.mmc: RX DMA channel request failed
[    1.585673] ledtrig-cpu: registered to indicate activity on CPUs
[    1.597971] NET: Registered protocol family 10
[    1.604190] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.611392] NET: Registered protocol family 17
[    1.616287] Key type dns_resolver registered
[    1.620809] omap_voltage_late_init: Voltage driver support not added
[    1.635592] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    1.642573] wlan-1-en-regulator: disabling
[    1.646919] ALSA device list:
[    1.649953]   No soundcards found.
[    1.654371] RAMDISK: gzip image found at block 0
[    1.659634] mmc0: new high speed MMC card at address 0001
[    1.675605] mmcblk0: mmc0:0001 Q2J55L 7.09 GiB
[    1.684955] mmcblk0boot0: mmc0:0001 Q2J55L partition 1 16.0 MiB
[    1.695018] mmcblk0boot1: mmc0:0001 Q2J55L partition 2 16.0 MiB
[    1.715831]  mmcblk0: p1 p2
[    2.234510] random: fast init done
[    5.579041] EXT4-fs (ram0): mounting ext2 file system using the ext4 subsystem
[    5.587963] EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
[    5.595324] VFS: Mounted root (ext2 filesystem) on device 1:0.
[    5.601801] devtmpfs: mounted
[    5.606416] Freeing unused kernel memory: 1024K
[    5.651513] systemd[1]: System time before build time, advancing clock.
[    5.681261] systemd[1]: systemd 230 running in system mode. (-PAM -AUDIT -SELINUX -IMA -APPARMOR -SMACK +SYSVINIT -UTMP -LIBCRYPTSETUP -GCRYPT +GNUTLS +ACL -XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
[    5.700241] systemd[1]: Detected architecture arm.
[    5.734901] systemd[1]: Set hostname to <xxx>.
[    5.739901] systemd[1]: Initializing machine ID from random generator.
[    5.935277] systemd[1]: Listening on Journal Socket.
[    5.967230] systemd[1]: Created slice System Slice.
[    5.996802] systemd[1]: Listening on Syslog Socket.
[    6.028892] systemd[1]: Starting Apply Kernel Variables...
[    6.075485] systemd[1]: Listening on Network Service Netlink Socket.
[    6.118817] systemd[1]: Mounting Configuration File System...
[    6.320419] EXT4-fs (ram0): re-mounted. Opts: (null)
[    7.326905] systemd-journald[124]: Received request to flush runtime journal from PID 1
[   10.570059] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[   11.192998] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[   11.253995] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[   11.300850] remoteproc remoteproc0: wkup_m3 is available
[   11.304772] remoteproc remoteproc0: powering up wkup_m3
[   11.306964] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 224244
[   11.307233] remoteproc remoteproc0: remote processor wkup_m3 is now up
[   11.307264] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
[   11.473869] omap-aes 53500000.aes: will run requests pump with realtime priority
[   11.548103] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[   11.927294] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[   11.946067] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[   12.356554] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer reset
[   12.356573] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
[   12.356588] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
[   12.356595] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
[   12.356602] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
[   12.356611] am335x-phy-driver 47401300.usb-phy: lookup for GPIO reset failed
[   12.356619] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer vbus-detect
[   12.356625] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
[   12.356632] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
[   12.356638] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
[   12.356644] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
[   12.356650] am335x-phy-driver 47401300.usb-phy: lookup for GPIO vbus-detect failed
[   12.356721] 47401300.usb-phy supply vcc not found, using dummy regulator
[   12.384256] usbcore: registered new interface driver usbfs
[   12.451799] usbcore: registered new interface driver hub
[   12.479061] usbcore: registered new device driver usb
[   12.573888] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
[   12.648681] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
[   12.701269] hub 1-0:1.0: USB hub found
[   12.732634] hub 1-0:1.0: 1 port detected
[   13.766633] net eth0: initializing cpsw version 1.12 (0)
[   13.772001] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[   13.876274] cpsw 4a100000.ethernet: ALE Table size 1024
[   13.975211] Micrel KSZ8081 or KSZ8091 4a101000.mdio:00: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=4a101000.mdio:00, irq=-1)
[   14.069129] libphy: PHY  not found
[   14.069147] net eth0: phy "" not found on slave 1, err -19
[   14.134497] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   16.165411] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[   16.173355] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   18.321393] random: crng init done

  • From the logs, it seems the SDIO MMC card is detected.. Can, you try with the below patch -
    processors.wiki.ti.com/.../WL18xx_Platform_Integration_Guide

    Thanks
  • The patch does not apply cleanly:

    Applying patch v6-wlcore-add-missing-nvs-file-name-info-for-wilink8.patch
    patching file drivers/net/wireless/ti/wlcore/main.c
    Hunk #1 succeeded at 6049 with fuzz 1 (offset 9 lines).
    patching file drivers/net/wireless/ti/wlcore/sdio.c
    Hunk #1 FAILED at 230.
    1 out of 1 hunk FAILED -- rejects in file drivers/net/wireless/ti/wlcore/sdio.c
    patching file drivers/net/wireless/ti/wlcore/spi.c
    Hunk #1 FAILED at 92.
    1 out of 1 hunk FAILED -- rejects in file drivers/net/wireless/ti/wlcore/spi.c
    Patch v6-wlcore-add-missing-nvs-file-name-info-for-wilink8.patch does not apply (enforce with -f)

    I looked at the patch. 

    Which part of the patch do you think I need to have to fix my issue?

  • Please, make sure, the below 'nvs_name' is added to the structures..

    static const struct wilink_family_data wl18xx_data = {
    .name = "wl18xx",
    .cfg_name = "ti-connectivity/wl18xx-conf.bin",
    + .nvs_name = "ti-connectivity/wl1271-nvs.bin",
    };

    Thanks
  • Hari Nagalla said:
    Please, make sure, the below 'nvs_name' is added to the structures..

    I am using TI git repository: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git 

    I am on commit: 89d085d1a407961d43d2492803facb6a8e678fda

    I already have the changes in the patch that you referenced in this commit:

    commit 9225d7bbdafb9fd1797161b8034b9abbe5fe6eee
    Author: Reizer, Eyal <eyalr@ti.com>
    Date:   Wed Nov 29 13:56:15 2017 +0530
    
        wlcore: add missing nvs file name info for wilink8
    
        commit d382b9c007827987c7939e2bd828af43c7af9668 upstream.
    
        The following commits:
        commit c815fdebef44 ("wlcore: spi: Populate config firmware data")
        commit d776fc86b82f ("wlcore: sdio: Populate config firmware data")
    
        Populated the nvs entry for wilink6 and wilink7 only while it is
        still needed for wilink8 as well.
        This broke user space backward compatibility when upgrading from older
        kernels, as the alternate mac address would not be read from the nvs that
        is present in the file system (lib/firmware/ti-connectivity/wl1271-nvs.bin)
        causing mac address change of the wlan interface.
    
        This patch fix this and update the structure field with the same default
        nvs file name that has been used before.
    
        In addition, some distros hold a default wl1271-nvs.bin in the file
        system with a bogus mac address (deadbeef...) that overrides the mac
        address that is stored inside the device.
        Warn users about this bogus mac address and use the internal mac address
    
        Fixes: c815fdebef44 ("wlcore: spi: Populate config firmware data")
        Fixes: d776fc86b82f ("wlcore: sdio: Populate config firmware data")
        Signed-off-by: Eyal Reizer <eyalr@ti.com>
        Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
        Tested-by: Tony Lindgren <tony@atomide.com>
        Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
        Signed-off-by: Sekhar Nori <nsekhar@ti.com>
    
    diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
    index 5438975..792cb91 100644
    --- a/drivers/net/wireless/ti/wlcore/main.c
    +++ b/drivers/net/wireless/ti/wlcore/main.c
    @@ -6002,6 +6002,8 @@ static int wl1271_register_hw(struct wl1271 *wl)
     {
            int ret;
            u32 oui_addr = 0, nic_addr = 0;
    +       struct platform_device *pdev = wl->pdev;
    +       struct wlcore_platdev_data *pdev_data = dev_get_platdata(&pdev->dev);
    
            if (wl->mac80211_registered)
                    return 0;
    @@ -6026,6 +6028,27 @@ static int wl1271_register_hw(struct wl1271 *wl)
                    nic_addr = wl->fuse_nic_addr + 1;
            }
    
    +       if (oui_addr == 0xdeadbe && nic_addr == 0xef0000) {
    +               wl1271_warning("Detected unconfigured mac address in nvs, derive from fuse instead.\n");
    +               if (!strcmp(pdev_data->family->name, "wl18xx")) {
    +                       wl1271_warning("This default nvs file can be removed from the file system\n");
    +               } else {
    +                       wl1271_warning("Your device performance is not optimized.\n");
    +                       wl1271_warning("Please use the calibrator tool to configure your device.\n");
    +               }
    +
    +               if (wl->fuse_oui_addr == 0 && wl->fuse_nic_addr == 0) {
    +                       wl1271_warning("Fuse mac address is zero. using random mac\n");
    +                       /* Use TI oui and a random nic */
    +                       oui_addr = WLCORE_TI_OUI_ADDRESS;
    +                       nic_addr = get_random_int();
    +               } else {
    +                       oui_addr = wl->fuse_oui_addr;
    +                       /* fuse has the BD_ADDR, the WLAN addresses are the next two */
    +                       nic_addr = wl->fuse_nic_addr + 1;
    +               }
    +       }
    +
            wl12xx_derive_mac_addresses(wl, oui_addr, nic_addr);
    
            ret = ieee80211_register_hw(wl->hw);
    diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
    index 961668b..047e268 100644
    --- a/drivers/net/wireless/ti/wlcore/sdio.c
    +++ b/drivers/net/wireless/ti/wlcore/sdio.c
    @@ -230,6 +230,7 @@ static int wl12xx_sdio_set_power(struct device *child, bool enable)
     static const struct wilink_family_data wl18xx_data = {
            .name = "wl18xx",
            .cfg_name = "ti-connectivity/wl18xx-conf.bin",
    +       .nvs_name = "ti-connectivity/wl1271-nvs.bin",
     };
    
     static const struct of_device_id wlcore_sdio_of_match_table[] = {
    diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c
    index fa3547e..efd22f1 100644
    --- a/drivers/net/wireless/ti/wlcore/spi.c
    +++ b/drivers/net/wireless/ti/wlcore/spi.c
    @@ -92,6 +92,7 @@
     static const struct wilink_family_data wl18xx_data = {
            .name = "wl18xx",
            .cfg_name = "ti-connectivity/wl18xx-conf.bin",
    +       .nvs_name = "ti-connectivity/wl1271-nvs.bin",
     };
    
     struct wl12xx_spi_glue {
    diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h
    index 1827546..95fbedc 100644
    --- a/drivers/net/wireless/ti/wlcore/wlcore.h
    +++ b/drivers/net/wireless/ti/wlcore/wlcore.h
    @@ -40,6 +40,9 @@
     /* wl12xx/wl18xx maximum transmission power (in dBm) */
     #define WLCORE_MAX_TXPWR        25
    
    +/* Texas Instruments pre assigned OUI */
    +#define WLCORE_TI_OUI_ADDRESS 0x080028
    +
     /* forward declaration */
     struct wl1271_tx_hw_descr;
     enum wl_rx_buf_align;
    

  • I already have the code in that patch in the TI git repository.

    commit 9225d7bbdafb9fd1797161b8034b9abbe5fe6eee
    Author: Reizer, Eyal <eyalr@ti.com>
    Date:   Wed Nov 29 13:56:15 2017 +0530
    
        wlcore: add missing nvs file name info for wilink8
    
        commit d382b9c007827987c7939e2bd828af43c7af9668 upstream.
    
        The following commits:
        commit c815fdebef44 ("wlcore: spi: Populate config firmware data")
        commit d776fc86b82f ("wlcore: sdio: Populate config firmware data")
    
        Populated the nvs entry for wilink6 and wilink7 only while it is
        still needed for wilink8 as well.
        This broke user space backward compatibility when upgrading from older
        kernels, as the alternate mac address would not be read from the nvs that
        is present in the file system (lib/firmware/ti-connectivity/wl1271-nvs.bin)
        causing mac address change of the wlan interface.
    
        This patch fix this and update the structure field with the same default
        nvs file name that has been used before.
    
        In addition, some distros hold a default wl1271-nvs.bin in the file
        system with a bogus mac address (deadbeef...) that overrides the mac
        address that is stored inside the device.
        Warn users about this bogus mac address and use the internal mac address
    
        Fixes: c815fdebef44 ("wlcore: spi: Populate config firmware data")
        Fixes: d776fc86b82f ("wlcore: sdio: Populate config firmware data")
        Signed-off-by: Eyal Reizer <eyalr@ti.com>
        Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
        Tested-by: Tony Lindgren <tony@atomide.com>
        Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
        Signed-off-by: Sekhar Nori <nsekhar@ti.com>
    
    diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
    index 5438975..792cb91 100644
    --- a/drivers/net/wireless/ti/wlcore/main.c
    +++ b/drivers/net/wireless/ti/wlcore/main.c
    @@ -6002,6 +6002,8 @@ static int wl1271_register_hw(struct wl1271 *wl)
     {
            int ret;
            u32 oui_addr = 0, nic_addr = 0;
    +       struct platform_device *pdev = wl->pdev;
    +       struct wlcore_platdev_data *pdev_data = dev_get_platdata(&pdev->dev);
    
            if (wl->mac80211_registered)
                    return 0;
    @@ -6026,6 +6028,27 @@ static int wl1271_register_hw(struct wl1271 *wl)
                    nic_addr = wl->fuse_nic_addr + 1;
            }
    
    +       if (oui_addr == 0xdeadbe && nic_addr == 0xef0000) {
    +               wl1271_warning("Detected unconfigured mac address in nvs, derive from fuse instead.\n");
    +               if (!strcmp(pdev_data->family->name, "wl18xx")) {
    +                       wl1271_warning("This default nvs file can be removed from the file system\n");
    +               } else {
    +                       wl1271_warning("Your device performance is not optimized.\n");
    +                       wl1271_warning("Please use the calibrator tool to configure your device.\n");
    +               }
    +
    +               if (wl->fuse_oui_addr == 0 && wl->fuse_nic_addr == 0) {
    +                       wl1271_warning("Fuse mac address is zero. using random mac\n");
    +                       /* Use TI oui and a random nic */
    +                       oui_addr = WLCORE_TI_OUI_ADDRESS;
    +                       nic_addr = get_random_int();
    +               } else {
    +                       oui_addr = wl->fuse_oui_addr;
    +                       /* fuse has the BD_ADDR, the WLAN addresses are the next two */
    +                       nic_addr = wl->fuse_nic_addr + 1;
    +               }
    +       }
    +
            wl12xx_derive_mac_addresses(wl, oui_addr, nic_addr);
    
            ret = ieee80211_register_hw(wl->hw);
    diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
    index 961668b..047e268 100644
    --- a/drivers/net/wireless/ti/wlcore/sdio.c
    +++ b/drivers/net/wireless/ti/wlcore/sdio.c
    @@ -230,6 +230,7 @@ static int wl12xx_sdio_set_power(struct device *child, bool enable)
     static const struct wilink_family_data wl18xx_data = {
            .name = "wl18xx",
            .cfg_name = "ti-connectivity/wl18xx-conf.bin",
    +       .nvs_name = "ti-connectivity/wl1271-nvs.bin",
     };
    
     static const struct of_device_id wlcore_sdio_of_match_table[] = {
    diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c
    index fa3547e..efd22f1 100644
    --- a/drivers/net/wireless/ti/wlcore/spi.c
    +++ b/drivers/net/wireless/ti/wlcore/spi.c
    @@ -92,6 +92,7 @@
     static const struct wilink_family_data wl18xx_data = {
            .name = "wl18xx",
            .cfg_name = "ti-connectivity/wl18xx-conf.bin",
    +       .nvs_name = "ti-connectivity/wl1271-nvs.bin",
     };
    
     struct wl12xx_spi_glue {
    diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h
    index 1827546..95fbedc 100644
    --- a/drivers/net/wireless/ti/wlcore/wlcore.h
    +++ b/drivers/net/wireless/ti/wlcore/wlcore.h
    @@ -40,6 +40,9 @@
     /* wl12xx/wl18xx maximum transmission power (in dBm) */
     #define WLCORE_MAX_TXPWR        25
    
    +/* Texas Instruments pre assigned OUI */
    +#define WLCORE_TI_OUI_ADDRESS 0x080028
    +
     /* forward declaration */
     struct wl1271_tx_hw_descr;
     enum wl_rx_buf_align;
    

  • Is this TI 335x EVM or with custom board? If, TI EVM with COM8 board, i suggest taking Processor SDK and giving it a try..

    software-dl.ti.com/.../index_FDS.html
  • Hari Nagalla said:
    Is this TI 335x EVM or with custom board?

    custom board

    Brad Griffis has the schematic

  • what would cause this?

    [    1.692023] wlan-1-en-regulator: disabling
    

    /dts-v1/;
    
    #include "am33xx.dtsi"
    #include <dt-bindings/interrupt-controller/irq.h>
    
    / {
        model = "model";
        compatible = "ti,am33xx";
    
        cpus {
            cpu@0 {
            };
        };
    
        chosen {
            stdout-path = &uart0;
        };
    
        memory@80000000 {
            device_type = "memory";
            reg = <0x80000000 0x20000000>; /* 512 MB */
        };
    
        leds {
            pinctrl-names = "default";
            pinctrl-0 = <&mygpio1_pins_default>;
    
            compatible = "gpio_leds";
    
            led0 {
                label = "heartbeat";
                gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
                linux,default-trigger = "heartbeat";
                default-state = "off";
            };
    
            led1 {
                label = "cpu0";
                gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
                linux,default-trigger = "cpu0";
                default-state = "off";
            };
    
            led2 {
                label = "mmc1";
                gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
                linux,default-trigger = "mmc1";
                default-state = "off";
            };
    
            led3 {
                label = "eth0";
                gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
                linux,default-trigger = "eth0";
                default-state = "off";
            };
        };
    
        jtag {
            pinctrl-names = "default";
            pinxtrl-0 = <&mydebugss1_pins_default>;
        };
    
        vmmcsd_fixed: fixedregulator@0 {
            compatible = "regulator-fixed";
            regulator-name = "vmmcsd_fixed";
            regulator-min-microvolt = <1800000>;
            regulator-max-microvolt = <1800000>;
        };
    
        wlan_1_en_reg: fixedregulator@1 {
            compatible = "regulator-fixed";
            regulator-name = "wlan-1-en-regulator";
            regulator-min-microvolt = <1800000>;
            regulator-max-microvolt = <1800000>;
            startup-delay-us = <70000>;
    
            gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>; /* v8 */
            enable-active-high;
        };
    };
    
    &am33xx_pinmux {
        pinctrl-names = "default";
    
        myrtc1_pins_default: myrtc1_pins_default {
            pinctrl-single,pins = <
                0x1f8 ( PIN_INPUT | MUX_MODE0 ) /* (B5) RTC_PORz.RTC_PORz */
                0x200 ( PIN_OUTPUT | MUX_MODE0 ) /* (C5) EXT_WAKEUP.EXT_WAKEUP */
                0x1fc ( PIN_INPUT | MUX_MODE0 ) /* (C6) PMIC_POWER_EN.PMIC_POWER_EN */
                0x204 ( PIN_INPUT | MUX_MODE0 ) /* (B4) ENZ_KALDO_1P8V.ENZ_KALDO_1P8V */
            >;
        };
    
        mydebugss1_pins_default: mydebugss1_pins_default {
            pinctrl-single,pins = <
                0x1d0 ( PIN_INPUT | MUX_MODE0 ) /* (C11) TMS.TMS */
                0x1d4 ( PIN_INPUT | MUX_MODE0 ) /* (B11) TDI.TDI */
                0x1d8 ( PIN_OUTPUT | MUX_MODE0 ) /* (A11) TDO.TDO */
                0x1dc ( PIN_INPUT | MUX_MODE0 ) /* (A12) TCK.TCK */
                0x1e0 ( PIN_INPUT | MUX_MODE0 ) /* (B10) nTRST.nTRST */
                0x1e4 ( PIN_INPUT | MUX_MODE0 ) /* (C14) EMU0.EMU0 */
                0x1e8 ( PIN_INPUT | MUX_MODE0 ) /* (B14) EMU1.EMU1 */
            >;
        };
    
        mygpio1_pins_default: mygpio1_pins_default {
            pinctrl-single,pins = <
                0x164 ( PIN_INPUT | MUX_MODE7 ) /* (C18) eCAP0_in_PWM0_out.gpio0[7] */
                0x120 ( PIN_INPUT | MUX_MODE7 ) /* (K15) gmii1_txd2.gpio0[17] */
                0x1b0 ( PIN_OUTPUT | MUX_MODE7 ) /* (A15) xdma_event_intr0.gpio0[19] */
                0x74 ( PIN_INPUT | MUX_MODE7 ) /* (U17) gpmc_wpn.gpio0[31] */
            >;
        };
    
        mygpio2_pins_default: mygpio2_pins_default {
            pinctrl-single,pins = <
                0x90 ( PIN_INPUT | MUX_MODE7 ) /* (R7) gpmc_advn_ale.gpio2[2] */
                0x94 ( PIN_INPUT | MUX_MODE7 ) /* (T7) gpmc_oen_ren.gpio2[3] */
                0x98 ( PIN_INPUT | MUX_MODE7 ) /* (U6) gpmc_wen.gpio2[4] */
                0x9c ( PIN_INPUT | MUX_MODE7 ) /* (T6) gpmc_be0n_cle.gpio2[5] */
            >;
        };
    
        mygpio3_pins_default: mygpio3_pins_default {
            pinctrl-single,pins = <
                0x190 ( PIN_INPUT | MUX_MODE7 ) /* (A13) mcasp0_aclkx.gpio3[14] */
                0x194 ( PIN_INPUT | MUX_MODE7 ) /* (B13) mcasp0_fsx.gpio3[15] */
                0x1a0 ( PIN_INPUT | MUX_MODE7 ) /* (B12) mcasp0_aclkr.gpio3[18] */
                0x1ac ( PIN_INPUT | MUX_MODE7 ) /* (A14) mcasp0_ahclkx.gpio3[21] */
            >;
        };
    
        mygpio4_pins_default: mygpio4_pins_default {
            pinctrl-single,pins = <
                0x0 ( PIN_OUTPUT | MUX_MODE7 ) /* (U7) gpmc_ad0.gpio1[0] */
                0x4 ( PIN_OUTPUT | MUX_MODE7 ) /* (V7) gpmc_ad1.gpio1[1] */
                0x8 ( PIN_OUTPUT | MUX_MODE7 ) /* (R8) gpmc_ad2.gpio1[2] */
                0xc ( PIN_OUTPUT | MUX_MODE7 ) /* (T8) gpmc_ad3.gpio1[3] */
                0x50 ( PIN_OUTPUT | MUX_MODE7 ) /* (R14) gpmc_a4.gpio1[20] */
                0x54 ( PIN_OUTPUT_PULLUP | MUX_MODE7 ) /* (V15) gpmc_a5.gpio1[21] */
            >;
        };
    
        wlan_disc_1_pins: wlan_disc_1_pins {
            pinctrl-single,pins = <
                0x18 ( PIN_INPUT | MUX_MODE7 ) /* (R9) gpmc_ad6.gpio1[6] */
                0x14 ( PIN_OUTPUT_PULLDOWN | MUX_MODE7 ) /* (V8) gpmc_ad5.gpio1[5] */
                0x10 ( PIN_OUTPUT_PULLDOWN | MUX_MODE7 ) /* (U8) gpmc_ad4.gpio1[4] */
            >;
        };
    
        myglue1_pins_default: myglue1_pins_default {
            pinctrl-single,pins = <
                0x1b8 ( PIN_INPUT | MUX_MODE0 ) /* (A10) nRESETIN_OUT.nRESETIN_OUT */
                0x1c0 ( PIN_INPUT | MUX_MODE0 ) /* (B18) nNMI.nNMI */
            >;
        };
    
        mymdio1_pins_default: mymdio1_pins_default {
            pinctrl-single,pins = <
                0x14c ( PIN_OUTPUT | MUX_MODE0 ) /* (M18) mdio_clk.mdio_clk */
                0x148 ( PIN_INPUT | MUX_MODE0 ) /* (M17) mdio_data.mdio_data */
                0x11c ( PIN_OUTPUT_PULLUP | MUX_MODE7 ) /* (J18) gmii1_txd3.gpio0[16] */
            >;
        };
    
        myrmii1_pins_default: myrmii1_pins_default {
            pinctrl-single,pins = <
                0x10c ( PIN_INPUT | MUX_MODE1 ) /* (H17) gmii1_crs.rmii1_crs_dv */
                0x110 ( PIN_INPUT | MUX_MODE1 ) /* (J15) gmii1_rxer.rmii1_rxer */
                0x114 ( PIN_OUTPUT | MUX_MODE1 ) /* (J16) gmii1_txen.rmii1_txen */
                0x128 ( PIN_OUTPUT | MUX_MODE1 ) /* (K17) gmii1_txd0.rmii1_txd0 */
                0x124 ( PIN_OUTPUT | MUX_MODE1 ) /* (K16) gmii1_txd1.rmii1_txd1 */
                0x140 ( PIN_INPUT | MUX_MODE1 ) /* (M16) gmii1_rxd0.rmii1_rxd0 */
                0x13c ( PIN_INPUT | MUX_MODE1 ) /* (L15) gmii1_rxd1.rmii1_rxd1 */
                0x144 ( PIN_INPUT | MUX_MODE0 ) /* (H18) rmii1_refclk.rmii1_refclk */
            >;
        };
    
        mymmc1_pins_default: mymmc1_pins_default {
            pinctrl-single,pins = <
                0x100 ( PIN_INPUT | MUX_MODE0 ) /* (G17) mmc0_clk.mmc0_clk */
                0x104 ( PIN_INPUT | MUX_MODE0 ) /* (G18) mmc0_cmd.mmc0_cmd */
                0xfc ( PIN_INPUT | MUX_MODE0 ) /* (G16) mmc0_dat0.mmc0_dat0 */
                0xf8 ( PIN_INPUT | MUX_MODE0 ) /* (G15) mmc0_dat1.mmc0_dat1 */
                0xf4 ( PIN_INPUT | MUX_MODE0 ) /* (F18) mmc0_dat2.mmc0_dat2 */
                0xf0 ( PIN_INPUT | MUX_MODE0 ) /* (F17) mmc0_dat3.mmc0_dat3 */
                0x138 ( PIN_INPUT | MUX_MODE3 ) /* (L16) gmii1_rxd2.mmc0_dat4 */
                0x134 ( PIN_INPUT | MUX_MODE3 ) /* (L17) gmii1_rxd3.mmc0_dat5 */
                0x130 ( PIN_INPUT | MUX_MODE3 ) /* (L18) gmii1_rxclk.mmc0_dat6 */
                0x12c ( PIN_INPUT | MUX_MODE3 ) /* (K18) gmii1_txclk.mmc0_dat7 */
            >;
        };
    
        mymmc2_pins_default: mymmc2_pins_default {
            pinctrl-single,pins = <
                0x8c ( PIN_INPUT | MUX_MODE3 ) /* (V12) gpmc_clk.mmc2_clk */
                0x88 ( PIN_INPUT | MUX_MODE3 ) /* (T13) gpmc_csn3.mmc2_cmd */
                0x44 ( PIN_INPUT | MUX_MODE3 ) /* (V14) gpmc_a1.mmc2_dat0 */
                0x48 ( PIN_INPUT | MUX_MODE3 ) /* (U14) gpmc_a2.mmc2_dat1 */
                0x4c ( PIN_INPUT | MUX_MODE3 ) /* (T14) gpmc_a3.mmc2_dat2 */
                0x78 ( PIN_INPUT | MUX_MODE3 ) /* (U18) gpmc_be1n.mmc2_dat3 */
            >;
        };
    
        myi2c1_pins_default: myi2c1_pins_default {
            pinctrl-single,pins = <
                0x18c ( PIN_INPUT | MUX_MODE0 ) /* (C16) I2C0_SCL.I2C0_SCL */
                0x188 ( PIN_INPUT | MUX_MODE0 ) /* (C17) I2C0_SDA.I2C0_SDA */
            >;
        };
    
        myusb1_pins_default: myusb1_pins_default {
            pinctrl-single,pins = <
                0x21c ( PIN_OUTPUT | MUX_MODE0 ) /* (F16) USB0_DRVVBUS.USB0_DRVVBUS */
            >;
        };
    
        myspi1_pins_default: myspi1_pins_default {
            pinctrl-single,pins = <
                0x150 ( PIN_INPUT | MUX_MODE0 ) /* (A17) spi0_sclk.spi0_sclk */
                0x154 ( PIN_INPUT | MUX_MODE0 ) /* (B17) spi0_d0.spi0_d0 */
                0x158 ( PIN_INPUT | MUX_MODE0 ) /* (B16) spi0_d1.spi0_d1 */
                0x15c ( PIN_INPUT | MUX_MODE0 ) /* (A16) spi0_cs0.spi0_cs0 */
            >;
        };
    
        myuart1_pins_default: myuart1_pins_default {
            pinctrl-single,pins = <
                0x180 ( PIN_INPUT | MUX_MODE0 ) /* (D16) uart1_rxd.uart1_rxd */
                0x184 ( PIN_OUTPUT | MUX_MODE0 ) /* (D15) uart1_txd.uart1_txd */
                0x178 ( PIN_INPUT | MUX_MODE0 ) /* (D18) uart1_ctsn.uart1_ctsn */
                0x17c ( PIN_OUTPUT | MUX_MODE0 ) /* (D17) uart1_rtsn.uart1_rtsn */
            >;
        };
    
        myuart2_pins_default: myuart2_pins_default {
            pinctrl-single,pins = <
                0x170 ( PIN_INPUT | MUX_MODE0 ) /* (E15) uart0_rxd.uart0_rxd */
                0x174 ( PIN_OUTPUT | MUX_MODE0 ) /* (E16) uart0_txd.uart0_txd */
            >;
        };
    
    };
    
    &uart1 {
        pinctrl-names = "default";
        pinctrl-0 = <&myuart1_pins_default>;
    
        status = "okay";
    };
    
    &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&myuart2_pins_default>;
    
        status = "okay";
    };
    
    &i2c0 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&myi2c1_pins_default>;
        clock-frequency = <400000>;
        #address-cells = <1>;
        #size-cells = <0>;
    
    };
    
    
    &spi0 {
        pinctrl-names = "default";
        pinctrl-0 = <&myspi1_pins_default>;
        status = "okay";
        flash: mx25u12835f@0 {
            #address-cells = <1>;
            #size-cells = <1>;
            compatible = "macronix,mx25u12835f", "jedec,spi-nor";
            spi-max-frequency = <66000000>;
            reg = <0>;
    
            partitions {
                compatible = "fixed-partitions";
                #address-cells = <1>;
                #size-cells = <1>;
                /* 0x00000->0x0ffff    spl 1 64KiB NLO */
                spl@0 {
                    reg = <0x0 0x10000>;
                };
                /* 0x10000->0x8ffff    u-boot uboot.img 512KB */
                u-boot@10000 {
                    reg = <0x10000 0x80000>;
                };
                /* 0x90000->0x10ffff    u-boot1 uboot.img 512KB */
                u-boot1@90000 {
                    reg = <0x90000 0x80000>;
                };
                /* 0x110000->0x12ffff    env1 128KB */
                u-boot-env1@110000 {
                    reg = <0x110000 0x20000>;
                };
                /* 0x130000->0x14ffff    env2 128KB */
                u-boot-env2@130000 {
                    reg = <0x130000 0x20000>;
                };
                /* 0x150000->0x15ffff    key  64KB      */
                key@150000 {
                    reg = <0x150000 0x10000>;
                };
                /* 0x160000->0x16ffff    oemkey  64KB     */
                oemkey@160000 {
                    reg = <0x160000 0x10000>;
                };
                /* 0x170000 ->0x96ffff emmc.img.gz 8MB  */
                emmcimggz@170000 {
                    reg = <0x170000 0x800000>;
                };
                /* 0x970000 ->0xffffff   empty   */
                empty@970000 {
                    reg = <0x900000 0x700000>;
                };
    
            };
        };
    };
    
    &usb {
        status = "okay";
    };
    
    &usb_ctrl_mod {
        status = "okay";
    };
    
    &usb0_phy {
        status = "okay";
    };
    
    &usb0 {
        status = "okay";
        dr_mode = "host";
        /* maximum-speed = "full-speed"; */
    };
    
    &cppi41dma {
        status = "okay";
        };
    
    &mmc3 {
        pinctrl-names = "default";
        pinctrl-0 = <&mymmc2_pins_default &wlan_disc_1_pins>;
        vmmc-supply = <&wlan_1_en_reg>;
        bus-width = <4>;
        status = "okay";
        ti,non-removable;
        ti,needs-special-hs-handling;
        cap-power-off-card;
        keep-power-in-suspend;
    
        #address-cells = <1>;
        #size-cells = <0>;
        wlcore@2 {
            compatible = "ti,wl1831";
            reg = <2>;
            interrupt-parent = <&gpio1>;
            interrupts = <6 IRQ_TYPE_EDGE_RISING>;
        };
    };
    
    &mmc1 {
        pinctrl-names = "default";
        pinctrl-0 = <&mymmc1_pins_default>;
        ti,non-removable;
        bus-width = <8>;
        status = "okay";
        vmmc-supply = <&vmmcsd_fixed>;
    };
    
    &davinci_mdio {
        pinctrl-names = "default";
        pintctrl-0 = <&mymdio1_pins_default>;
        status = "okay";
    };
    
    &cpsw_emac0 {
        phy_id = <&davinci_mdio>, <0>;
        phy-mode = "rmii";
        reset-gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
    };
    
    &phy_sel {
        rmii-clock-ext;
    };
    
    &mac {
        pinctrl-names = "default";
        pinctrl-0 = <&myrmii1_pins_default>;
        status = "okay";
    };
    
    &rtc {
        status = "disabled";
    };
    

  • Bill,

    I see the following error in your original log:

    [    1.578472] omap_hsmmc 47810000.mmc: RX DMA channel request failed

    You need the associated crossbar mapping.  Here's an excerpt from am335x-evm.dts:

    &mmc3 {

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

               xbar-event-map element */

            dmas = <&edma_xbar 12 0 1

                    &edma_xbar 13 0 2>;

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

            status = "okay";

            vmmc-supply = <&wlan_en_reg>;

            bus-width = <4>;

            pinctrl-names = "default";

            pinctrl-0 = <&mmc3_pins &wlan_pins>;

    Best regards,
    Brad

  • Thanks for the help Brad!