SD card configuration on i.Mx7D

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SD card configuration on i.Mx7D

2,196 Views
sharmilad
Contributor II

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 = <&reg_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

0 Kudos
Reply
7 Replies

2,179 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply

2,174 Views
sharmilad
Contributor II

 

Hi,

    I have tried the above changes but I didn't  help.I am attaching dmesg Log FYR.

Thanks & Regards,

Sharmila

0 Kudos
Reply

2,169 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @sharmilad 

Can you please share schematic portion of SD card with microprocessor?

Thanks & Regards

Sanket Parekh

0 Kudos
Reply

2,159 Views
sharmilad
Contributor II

Attaching the files.

For an update, We have populated R441 and removed R425.

0 Kudos
Reply

2,140 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply

2,190 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply

2,186 Views
sharmilad
Contributor II

Hi,

I have tried removing that line but that didn't help. I am attaching my dmesg and dts file.

Thanks & Regards,

Sharmila

Tags (1)
0 Kudos
Reply