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.

WiLink support for Freescale iMX6 Yocto-based Linux 3.10.17

Other Parts Discussed in Thread: WL1835MOD, WL1835

Hi There, 

I'm working on adding support for Wifi and BT (WL1835MOD) on our SabreSD-like board running Linux 3.10.17. I found promising-looking patches here

http://e2e.ti.com/support/wireless_connectivity/f/307/t/361507

However, it appears the patches are to be applied after another set of patches, because its referencing 0001-Add-DT-support-for-wilink-8.patch in the linux-imx_3.10.17.bb recipe, which I do not have. 

Any ideas on where to find this ?

Thanks, 

/Otto 

btw, we are using the imx_3.10.17_1.0.0_ga version 

 

 

  • Hi,

    The patches required on out plat prom are mentioned here processors.wiki.ti.com/.../WL18xx_AMxxx_Platform_Integration_Guide

    are you referring to the Device tree, kernel 3.10 should already have this support and you should be having the DTS files as part of the kernel build.
  • Hi Sundeep,

    Thanks for the quick response, however I cant make sense of the bluetooth-patch I mentioned in the original post. 

    ------

    From 2c73765a07904420fb698c89be0c81bb53a06374 Mon Sep 17 00:00:00 2001

    From: Iain Hunter <i-hunter1@ti.com>
    Date: Fri, 27 Jun 2014 15:14:13 +0100
    Subject: [PATCH] 2

    ---
    .../recipes-kernel/linux/linux-imx_3.10.17.bb | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    diff --git a/imx/meta-fsl-arm/recipes-kernel/linux/linux-imx_3.10.17.bb b/imx/meta-fsl-arm/recipes-kernel/linux/linux-imx_3.10.17.bb
    index ac5e3ff..968b33d 100644
    --- a/imx/meta-fsl-arm/recipes-kernel/linux/linux-imx_3.10.17.bb
    +++ b/imx/meta-fsl-arm/recipes-kernel/linux/linux-imx_3.10.17.bb
    @@ -10,7 +10,9 @@ COMPATIBLE_MACHINE = "(mx6)"

    SRC_URI = "git://${FSL_ARM_GIT_SERVER}/linux-2.6-imx.git;protocol=git;branch=imx_3.10.17_1.0.0_ga \
    file://0001-Add-DT-support-for-wilink-8.patch \
    - file://0002-Patching-the-imx_v7_defconfig-for-Wilink-8-support.patch"
    + file://0002-Patching-the-imx_v7_defconfig-for-Wilink-8-support.patch \
    + file://0003-add-bth-support-to-dts.patch \
    + file://0004-add-dt-support-to-uart-kim.patch"

    -----

    This patch uses appears to be applied to the same version I'm using (imx_3.10.17_1.0.0_ga) and created after this version was released (Released May 2014), yet you say the 3.10.17 version already has support for the Wilink DT ? 

    Another customer had the same problem, but unfortunately the TI rep chose to send a personal email instead of sharing the solution with everybody -

    e2e.ti.com/.../1376625

    Any help is appreciated, 

    /Otto

  • Hi,

    could you please provided your email id?
  • Hi Sundeep !

    Not sure what you need. Email ID ? Is that something TI uses on the forums ?

    Thanks, 

    /Otto

  • Hi,

    I hope below are the patchs you are looking for
    gforge.ti.com/.../imx-patch-wifi-bt-v1.10.tar.gz
  • Thats it. Thanks a lot Sundeep !
  • Hi Sundeep Mandava,


    we done all the patches in our code which u mentioned above. Below i have mentioned the error which we are getting after loading this files.
    we couldn't understand why we are getting this error.



    ERROR: ExpansionError during parsing /home/user/vf/sources/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-wl18xx_r8.a9.14.bb: Failure expanding variable S: ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev} which triggered exception FetchError: Fetcher failure: SRCREV was used yet no valid SCM was found in SRC_URI



    Thanks,
    Sivakumar
  • Siva,
    The reason is that this tar file was done a while ago and was integrated with the R8.3 Wi-Fi release (a8.08). The recipe included in patch sets in the file hostap.inc the path for SRC_URI
    +SRC_URI = "git://github.com/TI-OpenLink/hostap.git;protocol=git \
    This git does not have an a9.14 tag and so you can't merge changes into your existing a9.14 bb files

    From the R8.4 release we moved the git to git.ti.com/.../hostap which I suspect you were using before.

    So you can use this tar file to pick up all the kernel changes and build an R8.3 Wi-fi release but not the R8.4 or R8.5 Wi-Fi releases.
    Iain
  • Hi Iain,

     

    If the build is from the latest release R8.5, the patches we applied for ST_KIM and other sections are proper then what would be the other possibilities for getting a timeout. 

     From the LA captures the RTS and CTS lines are proper with both the signals pulled low signifying that communication channel is open. 

     

    thanks,

  • Siva,
    Most likely the BT_EN signal has not been driven high after the clock and voltages have stabilised (this assumes the UART is wired correctly).
    In this case you would see no activity from the HCI_TX line to acknowledge the first block of the firmware written.
    Iain
  • Hi lain,

    Yes your correct. Our IO voltage of wifi module is changing to 2.5 Volt from 1.8V after loading the wifi dirver in kernal. This voltages generated from the PMIC (MMPF0100).
    But in u-boot we are getting the 1.8V as per the setting done in the PMIC. whereas Really we didn't understand why there is a change in voltage after loading the driver.
    Note : During the kernel boot we are not changing the PMIC settings(verified).


    Thanks,
    Sivakumar
  • Siva,
    What is the IO voltage you expect on the GPIO of the i.Mx for the gpios connected to BT_EN, WL_EN and WL_IRQ and SDIO?
    WL18xx has 1.8V IOs so if you have 3.3V IO then you need level shifters to WL18xx.

    If Wifi works ok then perhaps BT_EN is the only one with a voltage difference.
    Iain
  • Hi lain,

    Our IO voltage of the GPIO is 1.8V of the iMX. processor. But there are option we have all GPIOs in iMX6SL that are configured for 1.8V and 3.15V. But all the wifi and bluetooth pins in the iMX are configured for 1.8V. Whenever i have enabled the wifi driver using "ifup wlan0" command in kernal, our 1.8V rail changed to 2.5V.

    Please suggest me if any modification needed in kernal.





    Thanks,
    Sivakumar
  • Hi Siva,

    I think the debug for this is a hw investigation first. My understanding of your problem statement is that when WL_EN is driven high the 1.8V power rail is raised to 2.5V.

    All the IO's on WL18xx are 1.8V so that should not be driving this voltage. So initial thoughts are that you have either a pull up somewhere around the WL18xx to a different 3.15V rail or you are driving 3.15V from WL_EN. Finding the source of this is the first step.

    Iain

  • Siva,
    It looks as though there is a problem with the Freescale SDIO driver that means it only outputs 3.3V on the SDIO bus.
    See www.spinics.net/.../msg30765.html for more details. It is fixed in later kernels but you will need to backport to 3.10.
    Iain
  • Hi lain,

    this is the log file which i am getting while loading the kernal. we already using the same patch which you already sent in previous reply.



    Kernel log:
    mmc1: Switching to 3.3V signalling voltage failed
    mmc1: SDHCI controller on 2198000.usdhc [2198000.usdhc] using DMA
    mmc1: Switching to 3.3V signalling voltage failed
    mmc1: card claims to support voltages below the defined range. These will be ignored.
    mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
    mmc1: new high speed SDIO card at address 0001
    mmc1: Switching to 3.3V signalling voltage failed
    mmc1: Switching to 3.3V signalling voltage failed
    mmc1: Switching to 3.3V signalling voltage failed
    mmc1: Switching to 3.3V signalling voltage failed
    mmc1: Switching to 3.3V signalling voltage failed
    mmc1: Switching to 3.3V signalling voltage failed
    mmc1: Switching to 3.3V signalling voltage failed

    DTS settings:

    wlan_en_reg: fixedregulator {
    compatible = "regulator-fixed";
    regulator-name = "wlan-en-regulator";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;

    gpio = <&gpio1 19 1>; /* WiFi SD EN */

    enable-active-high;
    regulator-always-on;
    };

    reg_1p8v: 1p8v {
    compatible = "regulator-fixed";
    regulator-name = "1p8v";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    };

    &usdhc3 {
    status = "okay";
    #vmmc-supply = <&wlan_en_reg>;
    #vqmmc-supply = <&vgen4_reg>;
    vmmc-supply = <&wlan_en_reg>;
    vqmmc-supply = <&reg_1p8v>;
    voltage-ranges = <1800 1800>;
    bus-width = <4>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_usdhc3>;
    non-removable;
    ti,needs-special-hs-handling;
    cap-power-off-card;
    keep-power-in-suspend;
    enable-sdio-wakeup;
    #address-cells = <1>;
    #size-cells = <0>;

    wlcore: wlcore@0{
    compatible = "ti,wlcore";
    reg = <2>;
    interrupt-parent = <&gpio1>;
    interrupts = <30 0>;
    gpios = <&gpio1 30 1>;

    };

    };




    Thanks,
    Sivakumar
  • Hi lain,

    Please reply as soon as possible. Why i am getting this previous reply error?


    Thanks,
    Sivakumar
  • Hi Siva,
    Can you confirm if you have this patch git.ti.com/.../6e9e318b applied to the Freescale kernel. I can see you have the dts part of it, do you have the actual driver part. We think this patch from K3.12 is what you need to backport to Freescale kernel.

    Please bear in mind that we don't have any imx6 boards with 1.8V available to test with so this is only a suggestion from us. You could try asking Freescale how to enable 1.8V IO on MMC in their kernel.
    Iain
  • Hi lain,

    In our solo-lite processor we are having in SD3 interafce signals are below mentioned

    CLOCK
    CMD
    DATA0
    DATA1
    DATA2
    DATA3
    DATA4
    DATA5
    DATA6
    DATA7
    VSELECT
    RESET
    CD

    In above mentioned signals we used only ( CLOCK, CMD, DATA0, DATA1, DATA2,DATA3)
    remaining pins are i kept open. My doubt is

    What i have to do in all Unused pins of SDIO lines (DATA4,DATA5,DATA6,DATA7,VSELECT,RESET,CD) .?

    because in sololite processor all unused pins were we configured with 3.3V pull up.

    will you think , is it create problem in our boards?

    Thanks,
    Sivakumar
  • Hi Siva,

    That is something you will definitely need to ask Freescale about. We have no idea how they have designed the MMC to be used.

    Iain

  • Hi lain,

    below reply i got from freescale persons.



    """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
    The Linux OS contains an SD / MMC bus driver which implements the

    SD / MMC bus protocols. SDIO card functionality (say, Wi-Fi) requires

    additional specific driver. Manufacturers provide it, if there is no standard

    Linux support.



    Thank you for your interest in Freescale Semiconductor products and for the opportunity to serve you.



    """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

    Please tell our WIFI MODULE have any specific driver  is there?

    meanwhile i have asked the same doubt which i asked previously to you.


    Thanks,
    Sivakumar.

  • What question was that the answer to?
    They are correct the Wi-Fi driver sits on top of MMC/SDIO. You have that and we know it works on 3.3V IO

    Your question should be specific and ask how to handle unconnected MMC pins when you are configuring it for 1.8V operation.
    They may say 1.8V is not supported in 3.10.17 which is correct.

    My feeling is that 3.3V pull ups on unused pins when the rest are configured at 1.8V is not right. Try removing the pull ups and use internal ones instead.
  • hi lian,

    After long time, we got the correct patches from freescale to get the all voltage level for 1.8V. Now all the signals are toggling between 0V to 1.8V and Wifi working perfectly. Now we are facing the issues with Bluetooth. Below i have mentioned the same.




    We hen tried to enable the UART and the below is the responce,

    root@imx6slevk:~# echo 0 > /sys/class/gpio/gpio28/value root@imx6slevk:~# echo 1 > /sys/class/gpio/gpio28/value

    root@imx6slevk:~# hciattach -t 30 -s 115200 /dev/ttymxc3 texas 115200 flow Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/TIInit_11.8.32.bts Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1 Initialization timed out.

    root@imx6slevk:~# hciattach -t 30 -s 115200 /dev/ttymxc3 texas 115200 flow Initialization timed out.


    //Now reset and try again

    root@imx6slevk:~# echo 0 > /sys/class/gpio/gpio28/value root@imx6slevk:~# echo 1 > /sys/class/gpio/gpio28/value

    root@imx6slevk:~# hciattach -t 30 -s 115200 /dev/ttymxc3 texas 115200 flow Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/TIInit_11.8.32.bts Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1 Initialization timed out.

    I can also see transaction in Tx and Rx lines in the Oscilloscope till 15200 baud rate and then after setting to 3M no transactions. Since the capture depth required would be very high we are not able to hook up our LA.

    Hence,

    a. Is there any TIInit_11.8.32.bts which can work at 115200 baud rate to check the communication channel.

    b. Any idea on why there is no transactions at 3M with imx6SL platform.

    c. Can you please tell me, which is the latest driver for WL1835?


    Thanks,
    Sivakumar
  • Hi lain,

    Please reply for above message as soon as possible. We are struggling with Bluetooth communication.


    Thanks,
    Sivakumar
  • Hi,

    Are you using ST(Shared Transport). If not you would be using the SP from non_ST folder from here git.ti.com/.../master and this SP has a baud rate (3M) command at the starting which is been sent to the chip. I think this is the reason.

    If you are using ST then this 3M baud rate is set from either the board file
    struct ti_st_plat_data wilink_pdata = {
    .nshutdown_gpio = GPIO_TO_PIN(3, 21),
    .dev_name = "/dev/ttyO1",
    .flow_cntrl = 1,
    .baud_rate = 3000000,

    Or the DTS file
    kim {
    compatible = "kim";
    nshutdown_gpio = <117>; /* Bank3, pin21 */
    dev_name = "/dev/ttyO1";
    flow_cntrl = <1>;
    baud_rate = <3000000>;

    Depending on the SDK version. and you need to be using the SP from the root folder from here git.ti.com/.../master