AnsweredAssumed Answered

SD card in SDR104 mode fails

Question asked by Christophe Cholet on Mar 5, 2019
Latest reply on Mar 6, 2019 by Christophe Cholet

Hi all,

 

On a custom board with an imx6QP, i want to use usdhc2 port in SDR104 mode, for SD card access. I've a SD card that supports this rate (checked under windows). The linux is Nxp's 4.1.15.

I've read several posts like supporting SDR104 in imx6 board by yocto.

But at the end, it doesn't correctly works.

From hardware side, my board is wired as in MX6 Sabre AI board (27142), but for ushc2 instead of usdhc3. ADG849 switch for 1,8/3,3V is present, and drived by SD2_VSELECT.

 

Here's the dts:

&usdhc2 {
    pinctrl-names = "default", "state_100mhz", "state_200mhz";
    pinctrl-0 = <&pinctrl_usdhc2>;
    pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
    pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
    bus-width = <4>;
    cd-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
//  wp-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;       // Managed by appli
    keep-power-in-suspend;
    enable-sdio-wakeup;
    status = "okay";
};

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

 

        pinctrl_usdhc2_100mhz: usdhc2grp100mhz {
            fsl,pins = <
                MX6QDL_PAD_SD2_CMD__SD2_CMD            0x170B9
                MX6QDL_PAD_SD2_CLK__SD2_CLK            0x100B9
                MX6QDL_PAD_SD2_DAT0__SD2_DATA0        0x170B9
                MX6QDL_PAD_SD2_DAT1__SD2_DATA1        0x170B9
                MX6QDL_PAD_SD2_DAT2__SD2_DATA2        0x170B9
                MX6QDL_PAD_SD2_DAT3__SD2_DATA3        0x170B9
                MX6QDL_PAD_KEY_ROW2__SD2_VSELECT  0x170B9
            >;
        };

 

        pinctrl_usdhc2_200mhz: usdhc2grp200mhz {
            fsl,pins = <
                MX6QDL_PAD_SD2_CMD__SD2_CMD            0x170F9
                MX6QDL_PAD_SD2_CLK__SD2_CLK            0x100F9
                MX6QDL_PAD_SD2_DAT0__SD2_DATA0        0x170F9
                MX6QDL_PAD_SD2_DAT1__SD2_DATA1        0x170F9
                MX6QDL_PAD_SD2_DAT2__SD2_DATA2        0x170F9
                MX6QDL_PAD_SD2_DAT3__SD2_DATA3        0x170F9
                MX6QDL_PAD_KEY_ROW2__SD2_VSELECT  0x170F9
            >;
        };

 

And now, the behaviour:

 

1- When sd card is inserted, it seems correct:

 

2- Then hdparm gives an expected reading rate value (>70 Mo/s):

 

3- But when accessed in writing:

 

4- And after, the reading rate has dropped:

 

I don't understand what the problem is, but it's the same problem than at the end of supporting SDR104 in imx6 board by yocto.

 

Actually, i wonder if SDR104 mode is really working with sd port other than uhcsd3 ou 4 ? Can you confirm SDR104 mode is fully operationnal with 4 bits SD cards and not only with MMC ?

 

BR,

Christophe

Outcomes