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.

Configuring WL1271 for a 3.13 kernel (devicetree)

Other Parts Discussed in Thread: WL1271

We are using (planning to, at least, we have a prototype board) with a wl1271 chip connected to the SDIO interface of a Zynq processor.


The wl12xx drivers are present in the 3.13 mainline kernel, and compile fine.


However, I cannot find any information on how to configure the module. There appear to be no device tree binding descriptions for this driver.


Anyone who can explain how to do this? Or pointers to some documentation on this?

  • Hi Mike,

    We don't have a version of wl12xx drivers that supports kernel 3.13 (device tree). There is a version that supports wl18xx.

    Please check the below link:
    http://processors.wiki.ti.com/index.php/WiLink8_Release_Notes/R8.3SP1#WLAN_SW_components.C2.A0with_Linux_Kernel_3.8_.28.22device-tree.22_support.29


    Regards,
    Gigi Joseph.

  • Then how do I configure the wl12xx drivers?

  • Hi Mike,

    I'm sorry, but we don't support WL6 with kernel version above 3.2 as it is being replaced by WL8. However you can modify the driver by following the below porting guide (may not help you with the device tree though):

    http://processors.wiki.ti.com/index.php/WL127x_Porting_Guide

    Regards,
    Gigi Joseph.

  • I tried to get the driver to give any sign of life at all, but I can't get it to actually "probe".


    I've added a board file, with the following code to register the platform data:

    #include <linux/wl12xx.h>
    ...

    struct wl12xx_platform_data wlan_pdata = {
        .irq = 0,
        .board_ref_clock = WL12XX_REFCLOCK_38_XTAL, /* 38.4Mhz */
    };
    ...

        if (wl12xx_set_platform_data(&wlan_pdata))
            pr_err("error setting wl12xx data\n");    

    This appears to run OK. I have also added the WL1271 and WL1271_SDIO items to the kernel configuration. I've added the IO that controls power as a regulator control, and enabled the SDIO controller in the devicetree.

            /* SD 1 for WiFi card */
            reg_sd1: regulator_sd1 {
                compatible = "regulator-fixed";
                regulator-name = "wl-wifi";
                regulator-min-microvolt = <3300000>; /* Actually 1.8V, but this keeps the driver happy */
                regulator-max-microvolt = <3300000>;
                vin-supply = <&R600A_reg>; /* Bank IO power from LTC */
                gpio = <&gpio 58 0>;
                enable-active-high;
                startup-delay-us = <70000>;
            };
            reg_bt: regulator_bt {
                compatible = "regulator-fixed";
                regulator-name = "wl-bt";
                regulator-min-microvolt = <1800000>;
                regulator-max-microvolt = <1800000>;
                vin-supply = <&R600A_reg>; /* Bank IO power from LTC */
                gpio = <&gpio 59 0>;
                enable-active-high;
                startup-delay-us = <70000>; /* TODO: Check datasheet */
            };
            sdhci1: sdhci@e0101000 {
                compatible = "xlnx,ps7-sdio-1.00.a", "arasan,sdhci-8.9a";
                reg = <0xe0101000 0x1000>;
                interrupts = <0 47 4>;
                interrupt-parent = <&gic>;
                clock-names = "clk_xin", "clk_ahb";
                clocks = <&clkc 22>, <&clkc 33>;
                clock-frequency = <25000000>;
                disable-wp;
                non-removable;
                vmmc-supply = <&reg_sd1>;
                bus-width = <4>;
                cap-power-off-card;
            };


    I can see that the driver is present, the directory

    /sys/bus/sdio/drivers/wl1271_sdio/

    exists. But the device does not get instantiated. What am I missing? (All wifi components are present, inserting a USB wifi stick with an atheros chipset works just fine).

    I added "printk" statements to various probe and config methods in the wl12xx drivers, but they never get called.


    Please advise.

  • Patches like these seem to suggest someone is implementing support for the wl12xx chips in newer kernels, however, these never made it into mainline apparently, despite being over half a year old:

    https://lkml.org/lkml/2013/7/31/211



  • Mike,

         Did you ever make any progress on this?  We're attempting to do the same thing (wl12xx on TI-provided 3.12)

    -c

  • Yes.

    We removed the 1271 chip and bought a module from another manufacturer.


    I suggest you do the same.

  • Mike,

       thanks for the reply - I'm coming to the same conclusion.  Could you let me know which module you went with?  We're thinking about wilink8 but the cost is significantly more than the 12xx, and we're are concerned about driver compatibility given TIs support of older chipsets on its newest kernel.

    thanks,

    chris

  • I don't consider it appropriate to discuss alternate vendors on a TI forum. You can contact me at mike dot looijmans at topic dot nl for more information.

  • Okay, it seems there are apparently more guys working on this. How is it possible noone has got this running yet? We're stuck at the EXACT same point.

    Appreciate any input.

    Stephan...

  • yeah I've managed to get bluetooth working, but not wifi :(

  • Yeah we are stuck as well using a beaglebone-black-derived am335x design with wl1271.  I followed the wlink8 instructions at http://processors.wiki.ti.com/index.php?title=WL18xx_AMxxx_platform_integration_guide hoping that perhaps that would work, but no dice.

    We are going to try with wilink8 and if that doesn't work use a non TI part.  

    It's really disappointing that TI does not support or plan to support their own very popular wl12xx chipset with the official am335x SDK 7.

  • Hi,

    it turns out that even getting the secondary SDIO running is a much bigger problem than I initially thought. So we decided to go step by step, by wiring a normal SD Card to the EMIO SDIO (First the Feedback Clock has to be routed internally). Now we detect the SD Card but it returns errors, when it switched to to the 25MHz frequency.

    Do you guys have any idea what I am missing? This is the bootlog:

    mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
    mmc1: new SD card at address e624
    mmcblk1: mmc1:e624 SU02G 1.84 GiB 
    mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0xb00
    mmcblk1: retrying using single block read
    mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0x0
    end_request: I/O error, dev mmcblk1, sector 0
    Buffer I/O error on device mmcblk1, logical block 0
    mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0xb00
    mmcblk1: retrying using single block read
    mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0x0
    end_request: I/O error, dev mmcblk1, sector 0
    Buffer I/O error on device mmcblk1, logical block 0
    mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0xb00
    mmcblk1: retrying using single block read
    mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0x0
    end_request: I/O error, dev mmcblk1, sector 0
    Buffer I/O error on device mmcblk1, logical block 0
     mmcblk1: unable to read partition table
    

    I can't seem to find the problem. Thanks in advance.

  • That's more something you should ask Xilinx about, create a webcase with them or ask on the Xilinx forums.