I cannot Interface SD card

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

I cannot Interface SD card

跳至解决方案
1,731 次查看
karthikeyanraju
Contributor III

Hi All,

My board is based on sabresd imx6qdl platform. I made the following changes in imx6qdl-sabresd.dtsi

@@ -868,6 +868,7 @@
MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17059
+ MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000
>;
};
/*
@@ -1095,13 +1096,9 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc2>;
bus-width = <4>;
- cd-gpios = <&gpio2 2 0>;
- wp-gpios = <&gpio2 3 0>;
+ cd-gpios = <&gpio1 26 1>;
no-1-8-v;
- wifi-host;
- pm-ignore-notify;
keep-power-in-suspend;
- enable-sdio-wakeup;
status = "okay";
};

Whenever I removed and inserted the SD card in my Board, I am getting the following logs,

root@sabresd_6dq:/ #  mmc_gpio_cd_irqt : mmc1 Entered

 mmc_gpio_cd_irqt : mmc1 Entered
mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
mmc1: mmc_rescan_try_freq: trying to init card at 300000 Hz
mmc1: mmc_rescan_try_freq: trying to init card at 200000 Hz
mmc1: mmc_rescan_try_freq: trying to init card at 100000 Hz

root@sabresd_6dq:/ #

Can anyone help me to resolve this issue ?

0 项奖励
回复
1 解答
1,404 次查看
karthikeyanraju
Contributor III

SD card has been detected with the Hardware change along with my Current Software changes.

Thank you.

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,405 次查看
karthikeyanraju
Contributor III

SD card has been detected with the Hardware change along with my Current Software changes.

Thank you.

0 项奖励
回复
1,404 次查看
karthikeyanraju
Contributor III

Hi igorpadykov,

Thanks for your reply.

I tested the SD CLK line by probe. I am getting sudden clock pulse for a fraction of second at boot time. Once the board booted, there is no clock pulse in that pin.

And According to that new added pin (SD detect) ,  I changed the value of this pin,

cd-gpios = <&gpio1 26 0>;

Whenever SD card present in slot, pin is 0

Removing the card result in 1.

Any suggestion according to these analysis ?

0 项奖励
回复
1,404 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Karthikeyan

one can recheck dts usage using sect.32.3.3 Devicetree Binding

attached Linux Manual.

Best regards
igor

0 项奖励
回复
1,404 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Karthikeyan

one can test sd signals with oscilloscope, and check voltage

on new added line, if it is the same as for other lines.

Also please check if it is used for other purposes in dts file.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复