Hi,
We are using i.Mx7Dual processor for one of our custom product. We are planning to use SD card for storage purpose. I have configured usdhc in kernel device tree as shown below, I have kept the same configuration in uboot but in uboot sd card is detecting and I am getting the output as shown below .
=> mmc info
Device: FSL_SDHC
Manufacturer ID: 12
OEM: 3456
Name: SDBus Speed: 25000000
Mode : SD Legacy
Rd Block Len: 512
SD version 1.0
High Capacity: Yes
Capacity: 14.8 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
The dts file:
&usdhc2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc2>;
cd-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
vmmc-supply = <®_sd2_vmmc>;
tuning-step = <2>;
bus-width = <4>;
no-1-8-v;
status = "okay";
};
pinctrl_usdhc2: usdhc2grp { // SD card
fsl,pins = <
MX7D_PAD_SD2_CMD__SD2_CMD 0x59
MX7D_PAD_SD2_CLK__SD2_CLK 0x19
MX7D_PAD_SD2_DATA0__SD2_DATA0 0x59
MX7D_PAD_SD2_DATA1__SD2_DATA1 0x59
MX7D_PAD_SD2_DATA2__SD2_DATA2 0x59
MX7D_PAD_SD2_DATA3__SD2_DATA3 0x59
MX7D_PAD_SD2_CD_B__GPIO5_IO9 0x59
>;
};
But in kernel SD card is not detecting. I have added prints in the drivers and find out that driver is failing at mmc_send_app_op_cond() function.
Please help me to resolve the issue.
Thanks & Regards,
Sharmila D
Hi @sharmilad
I have identified few changes in pin-mux(Modify the Drive strength). Please change the code like below.
MX7D_PAD_SD2_CMD__SD2_CMD 0x59
MX7D_PAD_SD2_CLK__SD2_CLK 0x19
MX7D_PAD_SD2_DATA0__SD2_DATA0 0x59
MX7D_PAD_SD2_DATA1__SD2_DATA1 0x59
MX7D_PAD_SD2_DATA2__SD2_DATA2 0x59
MX7D_PAD_SD2_DATA3__SD2_DATA3 0x59
Modify the alias like below.
mmc0 = &usdhc1;
mmc1 = &usdhc2;
mmc2 = &usdhc3;
Thanks & Regards
Sanket Parekh
Hi @sharmilad
Can you please share schematic portion of SD card with microprocessor?
Thanks & Regards
Sanket Parekh
Hi @sharmilad
SD2_CD_B pin is active low pin, for card detection SD2_CD_B pin should be in low state. Is this SD2_CD_B pin going low? Can you check the same with the help of DMM?
Thanks & Regards
Sanket Parekh
Hi @sharmilad
I hope you are doing well.
Please remove line "tuning-step = <2>;" and share the dmesg logs and board DTS file.
Thanks & Regards
Sanket Parekh