i.MX6UL USDHC2: Unexpected behaviour of CMD line

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX6UL USDHC2: Unexpected behaviour of CMD line

2,103 Views
philippbachmann
Contributor II

Hi,

 

We want to connect the Murata LBEE5KL1DX-TEMP-DS-SD EVK with a non-NXP evaluation kit based on the i.MX6UL, the phyBoard-Segin by Phytec (i.MX 6UL NXP ARM Cortex-A7 Single Board Computer | PHYTEC ). I've downloaded their yocto environment for the BSP-Yocto-Vendor-phyBOARD-Segin-PD17.1.2 based on NXP Tag rel_imx_4.1.15_2.1.0_ga (ftp://ftp.phytec.de/pub/Software/Linux/BSP-Yocto-i.MX6/BSP-Yocto-Vendor-phyBOARD-Segin-PD17.1.2/Rele...).

I adjusted my device tree according to the imx6ul EVK device tree "imx6ul-evk-btwifi.dtsi" to connect module on SD2 interface. My device tree is added at the end. During boot up the board seems to apply my changes:

...

[    1.749979] /soc/aips-bus@02100000/usdhc@02194000: voltage-ranges unspecified
[    1.760376] sdhci-esdhc-imx 2194000.usdhc: could not get ultra high speed state, work on normal mode
[    1.769805] sdhci-esdhc-imx 2194000.usdhc: assigned as wifi host
[    1.780510] sdhci-esdhc-imx 2194000.usdhc: No vmmc regulator found
[    1.788909] sdhci-esdhc-imx 2194000.usdhc: No vqmmc regulator found
[    1.833352] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.842911] mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
[    1.854506] mmc0: new high speed SDHC card at address 59b4

...

However, the module is not recognized. I measured the signals with and without the wifi module connected: VCC and WL_REG_ON are both ok. The CLK line is also fine, but the CMD line shows a weird behaviour. I've attached an image showing signals during boot (sorry for the low quality). Yellow is CLK, blue is CMD and purple is DATA0. During transmission the CMD line seems fine but before and after that it stays at around 0.6V. In my opinion the line should go back high to 3.3V.

When decrypting the pad characteristics of the CMD pin in the device tree, the value 0x17059 shows that 47k pull-up and CMOS output is enabled. But even when I attach an external 47k pull-up to VCC the CMD line does not go back high.

Can anybody help me with this problem?

Thanks and regards

Philipp

My device tree:

---------------------

/ {
    regulators {
        reg_wlan_en: regulator@100 {
            compatible = "regulator-fixed";
            regulator-name = "wlan_en";
            regulator-min-microvolt = <3300000>;
            regulator-max-microvolt = <3300000>;
            gpio = <&gpio5 9 GPIO_ACTIVE_HIGH>;
            startup-delay-us = <100>; /* card specific delay */
            enable-active-high;
            status = "okay";
        };
    };

    bcmdhd_wlan_0: bcmdhd_wlan@0 {
        compatible = "android,bcmdhd_wlan";
        wlreg_on-supply = <&reg_wlan_en>;
        gpios = <&gpio1 3 0>; //wifi_wake_host
    };
};

&iomuxc {
    imx6ul-phytec-peb-wlbt-01 {
        
        pinctrl_usdhc2_wlan: usdhc2grp_wlan {
            fsl,pins = <
                MX6UL_PAD_LCD_DATA18__USDHC2_CMD       0x17059
                MX6UL_PAD_LCD_DATA19__USDHC2_CLK         0x10059
                MX6UL_PAD_LCD_DATA20__USDHC2_DATA0    0x17059
                MX6UL_PAD_LCD_DATA21__USDHC2_DATA1    0x17059
                MX6UL_PAD_LCD_DATA22__USDHC2_DATA2    0x17059
                MX6UL_PAD_LCD_DATA23__USDHC2_DATA3    0x17059
            >;
        };

        pinctrl_wlan: wlangrp {
            fsl,pins = <
                /* WLAN ENABLE */
                MX6UL_PAD_SNVS_TAMPER9__GPIO5_IO09    0x80000000
                /* WLAN IRQ */
                MX6UL_PAD_GPIO1_IO03__GPIO1_IO03    0x80000000
            >;
        };
    };
};

/* SDHC2 on phyBOARD-Segin i.MX6UL */
&usdhc2 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_usdhc2_wlan>;
    non-removable;
    broken-cd;
    wifi-host; /* add hook for SD card detect mechanism for BCMDHD driver */

    keep-power-in-suspend;
    status = "okay";
};

Labels (2)
Tags (3)
4 Replies

1,550 Views
igorpadykov
NXP Employee
NXP Employee

Hi Philipp

CMD line is bidirectional and seems it is driven by wifi module. In general one

can look at supporting documentation on below link and ask additional vendor support

wireless.murata.com/eng/products/rf-modules-1/wi-fi-bluetooth-for-nxp-i-mx.html

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,550 Views
philippbachmann
Contributor II

Thanks Igor,

The waveforms in the image are measured when wifi module is not connected to the imx6ul board, but the same waveforms can be seen when the module is connected. Also no external pull-ups are attached. If I measure the CMD line of SD1 (which is used for micro SD card) the line goes high (VCC) after transmission, also without an SD card inserted. On the SD1 interface there are no external pull-ups either.

I'm reaching out in this forum because I think there is a misconfiguration on the imx6ul, do you agree?

Update:

I wanted to see if there is basically a problem with the pin itself.

  • I routed the CMD pin as normal GPIO and configured it as a output open drain and pull disabled (MX6UL_PAD_LCD_DATA18__USDHC2_CMD 0x00016899).
  • On the target, I confirmed the right pad configuration with devmem2 0x020E03EC and set the GPIO to input echo in > /sys/class/gpio/gpio87/direction
  • Then i attached an external 47k pull-up resistor between the pin and 3V3. The voltage still is around 0.6V and not 3.3V as expected.

When i do the same procedure above with GPIO05_IO09 (MX6UL_PAD_SNVS_TAMPER9__GPIO5_IO09  0x00016899) the voltage is 3.3V. Do I miss something here? Or maybe the pin/port is damaged?

Thanks and best regards

Philipp

0 Kudos
Reply

1,550 Views
igorpadykov
NXP Employee
NXP Employee

Hi Phillip

one can attach jtag and try to toggle pin, to verify that it is not damaged.

Also one can try to use uboot for that.

Best regards
igor

1,550 Views
philippbachmann
Contributor II

Hi Igor,

I've found the issue: Our imx6ul board uses the bootconfiguration pins which are shared with the SD2 lines. The lines are pulled down with a 10k resistor. The Murata 1DX does not drive them, therefore they have to be pulled up by the imx6ul externally or internally.

Thanks anyways for your help!

Best Regards

Philipp

0 Kudos
Reply