Skip to main content
Lmoio.1
Senior
October 27, 2021
Question

MicroSD initialization timeout. When inserting the sd card, dmseg shows "mmc0: error -110 whilst initialising SD card" With some logs, i see that mmc_send_app_op_cond is the function that timeouts.

  • October 27, 2021
  • 4 replies
  • 1604 views

My device tree is the following:

&sdmmc1 {
	pinctrl-names = "default", "opendrain", "sleep";
	pinctrl-0 = <&sdmmc1_b4_pins_a>;
	pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
	cd-gpios = <&gpiog 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
	disable-wp;
	cd-debounce-delay-ms = <500>;
	no-1-8-v;
	max-frequency = <1000000>;
	//st,sig-dir;
	//st,neg-edge;
	//st,use-ckin;
	bus-width = <4>;
	vmmc-supply = <&vdd_sd>;
	//vqmmc-supply = <&sd_switch>;
	sd-uhs-sdr12;
	sd-uhs-sdr25;
	sd-uhs-sdr50;
	sd-uhs-ddr50;
	status = "okay";
};

Sd schematics is the following:

0693W00000FDx2HQAT.png

This topic has been closed for replies.

4 replies

PatrickF
ST Employee
October 29, 2021

Hi,

I copy below the STM32MP157F-DK2 Device tree portion which could help.

&sdmmc1 {
	pinctrl-names = "default", "opendrain", "sleep";
	pinctrl-0 = <&sdmmc1_b4_pins_a>;
	pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
	cd-gpios = <&gpiob 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
	disable-wp;
	st,neg-edge;
	bus-width = <4>;
	vmmc-supply = <&v3v3>;
	status = "okay";
};

please remove all the sd-uhs-***; which refer to 1.8V signalling not supported with your HW.

please add st,neg-edge;

not sure max-frequency = ; is needed. please refer also to this article in case of issue about SDMMC frequencies: https://community.st.com/s/article/FAQ-STM32MP1-how-to-setup-the-SDMMC-CK-clock-frequency-in-Linux

Regards.

In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
Lmoio.1
Lmoio.1Author
Senior
October 29, 2021

Hi @PatrickF​

removing the st,* and all the sd-uhs* properties was not enough, I had to add 

/delete-property/ st,sig-dir;
	/delete-property/ st,use-ckin;	
 /delete-property/ sd-uhs-sdr12;
	/delete-property/ sd-uhs-sdr25;
	/delete-property/ sd-uhs-sdr50;
	/delete-property/ sd-uhs-ddr50;

now I can see the SD.

At times, i see still the error after removing the card:

[ 64.185572] mmc0: new high speed SDHC card at address e624
[ 64.199567] mmcblk0: mmc0:e624 SS16G 14.8 GiB
[ 64.209597] mmcblk0: p1
[ 65.218871] mmc0: card e624 removed
[ 65.338268] mmc0: error -110 whilst initialising SD card

thanks

Lmoio.1
Lmoio.1Author
Senior
October 29, 2021

Maybe this is resolved by adding   cd-debounce-delay-ms = <>;