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 = <®_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 = <®_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 = <®_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