linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] mmc: meson-gx-mmc: add delay during poweroff
@ 2025-06-28  1:53 Da Xue
  2025-07-01  9:59 ` Anand Moon
  0 siblings, 1 reply; 10+ messages in thread
From: Da Xue @ 2025-06-28  1:53 UTC (permalink / raw)
  To: Ulf Hansson, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl
  Cc: Da Xue, linux-mmc, linux-arm-kernel, linux-amlogic, linux-kernel

Regulators controlling the SD card power need some settling time for SD
cards to fully reset from UHS modes. The regulator framework seems to
ignore falling times set in the device tree causing a few boards with the
same hardware implementation to hang on reboot because the SD card still
had some voltage and did not reset properly to be initialized again.

Add a delay sufficiently long for the voltage to drop so that the SD card
can reset properly. Otherwise the reboot will hang at missing SD card
especially with Samsung cards.

Signed-off-by: Da Xue <da@libre.computer>
---
 drivers/mmc/host/meson-gx-mmc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 694bb443d5f3..a39906079d29 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -605,6 +605,7 @@ static void meson_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	case MMC_POWER_OFF:
 		mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0);
 		mmc_regulator_disable_vqmmc(mmc);
+		msleep(50);
 
 		break;
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-07-03 11:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-28  1:53 [RFC] mmc: meson-gx-mmc: add delay during poweroff Da Xue
2025-07-01  9:59 ` Anand Moon
2025-07-02 16:27   ` Martin Blumenstingl
2025-07-02 17:07     ` Jerome Brunet
2025-07-02 17:22       ` Da Xue
2025-07-02 18:40         ` Martin Blumenstingl
2025-07-02 19:07           ` Da Xue
2025-07-02 20:57             ` Martin Blumenstingl
2025-07-02 21:04               ` Da Xue
2025-07-03 11:59                 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).