AnsweredAssumed Answered

Unable to use UHS SDcard in imx6

Question asked by Bala Subramaniyam on Dec 16, 2018
Latest reply on Jan 13, 2019 by Joan Xie

Hi,

I am usig i.MX6 Processor with customize board which can support Ultra High Speed SDcard in USDHC2.

UHS-I tested in L4.9.11 kernel with Poky-Morty binaries.

 

supporting SDR104 in imx6 board by yocto 

From the above link I made the changes in device tree to support Ultra High Speed, but while booting SDcard failed in initialising and USDHC2 got CMD timeout error.

 

Changes:

&usdhc2 {
     pinctrl-names = "default", "state_100mhz", "state_200mhz";
     pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
     pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
     pinctrl-2 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
     cd-gpios = <&gpio4 25 GPIO_ACTIVE_LOW>;
     vmmc-supply = <&reg_sd2_vmmc>;
     keep-power-in-suspend;
     /* no-1-8-v; */
     enable-sdio-wakeup;
     status = "okay";
};

 

reg_sd2_vmmc: regulator@6 {
    compatible = "regulator-fixed";
     regulator-name = "P3V3_SDa_SWITCHED";
     regulator-min-microvolt = <3300000>;
     regulator-max-microvolt = <3300000>;

     /* GPIO to toggle 3.3V and 1.8V to SDcard */
     gpio = <&gpio6 11 GPIO_ACTIVE_HIGH>;
     enable-active-high;
     off-on-delay = <20000>;
};

 

pinctrl_usdhc2: usdhc2grp {
     fsl,pins = <
     MX6QDL_PAD_SD2_CMD__SD2_CMD 0x1F079
     MX6QDL_PAD_SD2_CLK__SD2_CLK 0x1F079
     MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x1F079
     MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x1F079
    MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x1F079
     MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x1F079
     >;
};

 

pinctrl_usdhc2_100mhz: usdhc2grp_100mhz {
     fsl,pins = <
     MX6QDL_PAD_SD2_CMD__SD2_CMD 0x1F079
     MX6QDL_PAD_SD2_CLK__SD2_CLK 0x1F079
     MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x1F079
     MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x1F079
     MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x1F079
    MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x1F079
     >;
};

 

pinctrl_usdhc2_200mhz: usdhc2grp_200mhz {
     fsl,pins = <
     MX6QDL_PAD_SD2_CMD__SD2_CMD 0x1F079
     MX6QDL_PAD_SD2_CLK__SD2_CLK 0x1F079
     MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x1F079
     MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x1F079
     MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x1F079
     MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x1F079
     >;
};

 

pinctrl_usdhc2_gpio: usdhc2_gpiogrp {
     fsl,pins = <
     MX6QDL_PAD_NANDF_CS0__GPIO6_IO11 0x1F088 /* PDn */
>;
};

 

Error log:

    

 sdhci-esdhc-imx 2194000.usdhc: Got CD GPIO
 sdhci-esdhc-imx 2194000.usdhc: change pinctrl state for uhs 0
 sdhci-esdhc-imx 2194000.usdhc: change pinctrl state for uhs 0
 mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
 sdhci-esdhc-imx 2194000.usdhc: change pinctrl state for uhs 0
 sdhci-esdhc-imx 2194000.usdhc: change pinctrl state for uhs 0
 sdhci-esdhc-imx 2194000.usdhc: change pinctrl state for uhs 0
 mmc1: error -110 whilst initialising SD card

 

Did I miss any entry in device tree to support Ultra high speed mode or anything?

 

Hoping for the better guidance.

 

Thanks and Regards,

Bala

Outcomes