From: Da Xue <da@libre.computer>
To: Ulf Hansson <ulf.hansson@linaro.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Da Xue <da@libre.computer>,
linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [RFC] mmc: meson-gx-mmc: add delay during poweroff
Date: Fri, 27 Jun 2025 21:53:28 -0400 [thread overview]
Message-ID: <20250628015328.249637-1-da@libre.computer> (raw)
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
next reply other threads:[~2025-06-28 1:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-28 1:53 Da Xue [this message]
2025-07-01 9:59 ` [RFC] mmc: meson-gx-mmc: add delay during poweroff 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250628015328.249637-1-da@libre.computer \
--to=da@libre.computer \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox