Colibri iMX6ULL UHS-I Support

Hi,

I’m trying to get a UHS-I microSD card detected by the kernel. I have successfully deployed a device tree with SD_1_8 defined as suggested:

/* The define SD_1_8 allows to use the SD interface at a higher speed mode
 * if the card supports it. For this the signaling voltage is switched from
 * 3.3V to 1.8V under the usdhc1's drivers control.
 */
#define SD_1_8
&usdhc1 {
#ifdef SD_1_8
	pinctrl-names = "default", "state_100mhz", "state_200mhz";
	pinctrl-0 = <&pinctrl_usdhc1 &pinctrl_snvs_cd_usdhc1>;
	pinctrl-1 = <&pinctrl_usdhc1_100mhz &pinctrl_snvs_cd_usdhc1>;
	pinctrl-2 = <&pinctrl_usdhc1_200mhz &pinctrl_snvs_cd_usdhc1>;
	vqmmc-supply = <&reg_sd1_vmmc>;
#else
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc1 &pinctrl_snvs_cd_usdhc1>;
	no-1-8-v;
#endif
	cd-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
	sd-uhs-sdr12;
	sd-uhs-sdr25;
	sd-uhs-sdr50;
	sd-uhs-sdr104;
	disable-wp;
	enable-sdio-wakeup;
	keep-power-in-suspend;
	status = "okay";
	vmmc-supply = <&reg_3v3>;
};

The pinctrl for the SDIO interface:

pinctrl_usdhc1: usdhc1grp {
			fsl,pins = <
				MX6UL_PAD_SD1_CLK__USDHC1_CLK		0x17059 /* SOM_SD_1_CLK -- SODIMM 47 */
				MX6UL_PAD_SD1_CMD__USDHC1_CMD		0x17059 /* SOM_SD_1_CMD -- SODIMM 190 */
				MX6UL_PAD_SD1_DATA0__USDHC1_DATA0	0x17059 /* SOM_SD_1_DATA0 -- SODIMM 192 */
				MX6UL_PAD_SD1_DATA1__USDHC1_DATA1	0x17059 /* SOM_SD_1_DATA1 -- SODIMM 49 */
				MX6UL_PAD_SD1_DATA2__USDHC1_DATA2	0x17059 /* SOM_SD_1_DATA2 -- SODIMM 51 */
				MX6UL_PAD_SD1_DATA3__USDHC1_DATA3	0x17059 /* SOM_SD_1_DATA3 -- SODIMM 53 */
			>;
		};

		pinctrl_usdhc1_100mhz: usdhc1grp_100mhz {
			fsl,pins = <
				MX6UL_PAD_SD1_CLK__USDHC1_CLK		0x170b9
				MX6UL_PAD_SD1_CMD__USDHC1_CMD		0x170b9
				MX6UL_PAD_SD1_DATA0__USDHC1_DATA0	0x170b9
				MX6UL_PAD_SD1_DATA1__USDHC1_DATA1	0x170b9
				MX6UL_PAD_SD1_DATA2__USDHC1_DATA2	0x170b9
				MX6UL_PAD_SD1_DATA3__USDHC1_DATA3	0x170b9
			>;
		};

		pinctrl_usdhc1_200mhz: usdhc1grp_200mhz {
			fsl,pins = <
				MX6UL_PAD_SD1_CLK__USDHC1_CLK		0x170f9
				MX6UL_PAD_SD1_CMD__USDHC1_CMD		0x170f9
				MX6UL_PAD_SD1_DATA0__USDHC1_DATA0	0x170b9
				MX6UL_PAD_SD1_DATA1__USDHC1_DATA1	0x170b9
				MX6UL_PAD_SD1_DATA2__USDHC1_DATA2	0x170b9
				MX6UL_PAD_SD1_DATA3__USDHC1_DATA3	0x170b9
			>;
		};

The 3.3V-1.8V switch regulator:

reg_sd1_vmmc: regulator@1 {
		compatible = "regulator-gpio";
		gpio = <&gpio5 9 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_snvs_reg_sd>;
		regulator-always-on;
		regulator-name = "V3.3_1.8_SD";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <3300000>;
		states = <1800000 0x1 3300000 0x0>;
		vin-supply = <&reg_module_3v3>;
	};

Lastly, the pinctrl for the regulator:

pinctrl_snvs_reg_sd: snvs-reg-sd-grp {
			fsl,pins = <
				MX6ULL_PAD_SNVS_TAMPER9__GPIO5_IO09	0x4001b8b0
			>;
		};

Also, following the instructions in High performance, low power Embedded Computing Systems | Toradex Developer Center, I have removed the 3.3V pullups on the DATA[3:0], CMD, and CLK pins on the evaluation board.

Sadly, with these device tree configurations, the SD card fails to initialize. Here’s the kernel output during boot:

[    1.776837] mmc0: error -110 whilst initialising SD card

Am I missing something? I also see this error when I plug in the SD card after boot has completed:

[   34.177917] mmc0: Switching to 3.3V signalling voltage failed    

Also, when I use a high speed card, there are no issues. Only UHS-I cards cause trouble. Does the Colibri iMX6ULL truly support this bus interface? Any guidance in resolving this issue would be greatly appreciated.

Thanks,

Jeff

What exact software versions of things are you talking about? Could you please also proved complete serial boot console log as a textual file?

Does Toradex Colibri iMX6ULL support 1.8V SDCARD IO level required for UHS-I? Sorry it appears to be unclear from datasheet

From the Toradex iMX6ULL datasheet page 45
Colibri iMX6 ULL datasheet Page 45
The Colibri iMX6ULL supports UHS-I which allows up to 104 Mbyte/s transfer speed on its standard SD card interface.
However, UHS-I requires 1.8V IO level, which is not in the Colibri module specification.
Since the 1.8V capability is not mandatory in the Colibri module specification, other modules may support only 3.3V logic level.
Pay attention to the SD card signal pull-up resistors on the carrier board.
If the interface is used in the 1.8V mode, it is recommended to remove the pull-up resistors on the carrier board.
The i.MX 6ULL features internal pull-up resistors, which can be used instead.

Does Toradex Colibri iMX6ULL support 1.8V SDCARD IO level required for UHS-I? Sorry it appears to be unclear from datasheet

Yes, it certainly optionally does properly support UHS-I and automatically does the required switching to 1.8 volt signaling.

Hi Marcel, sorry for the delayed response.

I’m using Linux BSP 2.8b4 for the iMX6ULL. Kernel boot log attached here.

Also, once the kernel has booted, the following kernel messages are shown when I remove the SD card and reinsert it a few times:

[  128.046183] mmc0: Switching to 3.3V signalling voltage failed
[  130.395801] mmc0: Switching to 3.3V signalling voltage failed
[  130.742595] mmc0: error -110 whilst initialising SD card
[  134.405350] mmc0: Switching to 3.3V signalling voltage failed
[  136.625113] mmc0: Switching to 3.3V signalling voltage failed
[  136.971926] mmc0: error -110 whilst initialising SD card

I have also now tried this with three different UHS-I SD cards and cannot get any of them to work unfortunately. Thanks for your assistance!

IMX6ULL sdcard UHS-I enable

-Colibri iMX6ULL 512MB Wi-Fi / Bluetooth Industrial Temperature (IT) module

-Colibri Evaluation Board

Stock Colibri Linux image

Directions from here
Build U-Boot and Linux Kernel from Source Code | Toradex Developer Center

git clone -b toradex_4.9-1.0.x-imx git://git.toradex.com/linux-toradex.git

UHS-I hardware changes

Remove 3.3V pull-up resistors CMD, DATA[3:0] lines on Colibri Evaluation Board

Enable UHS-I in Device Tree

uncomment /* #define SD_1_8 */ to

-#define SD_1_8

arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi

export ARCH=arm

export PATH=~/gcc-linaro/bin/:$PATH

export CROSS_COMPILE=arm-linux-gnueabihf-

make ARCH=arm colibri-imx6ull_defconfig

make -j3 2>&1 | tee build.log

Is something missing to get UHS supported? Any Linux device driver changes?

hi
Usually you don’t have to do anything. UHS-I SD are supported out of box. I tried two cards with iMX6ULL and they were working fine, how ever only in High speed mode. Could you first try our regular Bsp without any changes if the card is working.

Thanks and best regards, Jaski

Hi Jaski,

We have no trouble using UHS-I SD cards in High Speed mode using the regular Toradex BSP without any changes. Using this BSP, once we enable 1.8V support in the device tree for Ultra High Speed mode and remove pullups on the data and command lines, the errors from the original post above are shown.

Are you able to reproduce this on your end with the slight device tree and hardware modifications I have mentioned on the Colibri Evaluation Board?

Thank you!

Jeff

hi @jledin

I am working on this issue. I will come soon back to you.

Hi @jledin

I made the same hardware and device tree changes as you and I can reproduce the error. I opened a ticket internally and we will fix this issue in the next release.

Okay, I’ll be looking forward to the next release.

hi @jledin
Do you have a product planned using the UHS-I SD cards? What is your deadline?

Not currently. We investigated going down the UHS-I route, but our struggles led us to use a different interface. Please keep me posted though, as we could very well head down this route again for future products.

hi Thanks for your Information. Yeah, we will let you know once we have investigated more on this Issue.
Best regards, Jaski

@jledin

Hi Jeff

I believe I found the root cause for this in the wrong spelling of the device tree property.

http://git.toradex.com/cgit/linux-toradex.git/commit/?h=toradex_4.14-2.0.x-imx-next&id=7d0f5d6ad4350f0e1a3e10c4635f4bb20c1e63f9

Max