|
Takashi Iwai |
2e5e58 |
From a1149a6c06ee094a6e62886b0c0e8e66967a728a Mon Sep 17 00:00:00 2001
|
|
Takashi Iwai |
2e5e58 |
From: Daniel Beer <dlbeer@gmail.com>
|
|
Takashi Iwai |
2e5e58 |
Date: Sat, 24 Apr 2021 20:16:52 +1200
|
|
Takashi Iwai |
2e5e58 |
Subject: [PATCH] mmc: sdhci-pci-gli: increase 1.8V regulator wait
|
|
Takashi Iwai |
2e5e58 |
Git-commit: a1149a6c06ee094a6e62886b0c0e8e66967a728a
|
|
Takashi Iwai |
2e5e58 |
Patch-mainline: v5.13-rc3
|
|
Takashi Iwai |
2e5e58 |
References: git-fixes
|
|
Takashi Iwai |
2e5e58 |
|
|
Takashi Iwai |
2e5e58 |
Inserting an SD-card on an Intel NUC10i3FNK4 (which contains a GL9755)
|
|
Takashi Iwai |
2e5e58 |
results in the message:
|
|
Takashi Iwai |
2e5e58 |
|
|
Takashi Iwai |
2e5e58 |
mmc0: 1.8V regulator output did not become stable
|
|
Takashi Iwai |
2e5e58 |
|
|
Takashi Iwai |
2e5e58 |
Following this message, some cards work (sometimes), but most cards fail
|
|
Takashi Iwai |
2e5e58 |
with EILSEQ. This behaviour is observed on Debian 10 running kernel
|
|
Takashi Iwai |
2e5e58 |
4.19.188, but also with 5.8.18 and 5.11.15.
|
|
Takashi Iwai |
2e5e58 |
|
|
Takashi Iwai |
2e5e58 |
The driver currently waits 5ms after switching on the 1.8V regulator for
|
|
Takashi Iwai |
2e5e58 |
it to become stable. Increasing this to 10ms gets rid of the warning
|
|
Takashi Iwai |
2e5e58 |
about stability, but most cards still fail. Increasing it to 20ms gets
|
|
Takashi Iwai |
2e5e58 |
some cards working (a 32GB Samsung micro SD works, a 128GB ADATA
|
|
Takashi Iwai |
2e5e58 |
doesn't). At 50ms, the ADATA works most of the time, and at 100ms both
|
|
Takashi Iwai |
2e5e58 |
cards work reliably.
|
|
Takashi Iwai |
2e5e58 |
|
|
Takashi Iwai |
2e5e58 |
Signed-off-by: Daniel Beer <dlbeer@gmail.com>
|
|
Takashi Iwai |
2e5e58 |
Acked-by: Ben Chuang <benchuanggli@gmail.com>
|
|
Takashi Iwai |
2e5e58 |
Fixes: e51df6ce668a ("mmc: host: sdhci-pci: Add Genesys Logic GL975x support")
|
|
Takashi Iwai |
2e5e58 |
Cc: stable@vger.kernel.org
|
|
Takashi Iwai |
2e5e58 |
Link: https://lore.kernel.org/r/20210424081652.GA16047@nyquist.nev
|
|
Takashi Iwai |
2e5e58 |
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
|
|
Takashi Iwai |
2e5e58 |
Acked-by: Takashi Iwai <tiwai@suse.de>
|
|
Takashi Iwai |
2e5e58 |
|
|
Takashi Iwai |
2e5e58 |
---
|
|
Takashi Iwai |
2e5e58 |
drivers/mmc/host/sdhci-pci-gli.c | 7 ++++++-
|
|
Takashi Iwai |
2e5e58 |
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
Takashi Iwai |
2e5e58 |
|
|
Takashi Iwai |
2e5e58 |
diff --git a/drivers/mmc/host/sdhci-pci-gli.c b/drivers/mmc/host/sdhci-pci-gli.c
|
|
Takashi Iwai |
2e5e58 |
index 592d79082f58..061618aa247f 100644
|
|
Takashi Iwai |
2e5e58 |
--- a/drivers/mmc/host/sdhci-pci-gli.c
|
|
Takashi Iwai |
2e5e58 |
+++ b/drivers/mmc/host/sdhci-pci-gli.c
|
|
Takashi Iwai |
2e5e58 |
@@ -627,8 +627,13 @@ static void sdhci_gli_voltage_switch(struct sdhci_host *host)
|
|
Takashi Iwai |
2e5e58 |
*
|
|
Takashi Iwai |
2e5e58 |
* Wait 5ms after set 1.8V signal enable in Host Control 2 register
|
|
Takashi Iwai |
2e5e58 |
* to ensure 1.8V signal enable bit is set by GL9750/GL9755.
|
|
Takashi Iwai |
2e5e58 |
+ *
|
|
Takashi Iwai |
2e5e58 |
+ * ...however, the controller in the NUC10i3FNK4 (a 9755) requires
|
|
Takashi Iwai |
2e5e58 |
+ * slightly longer than 5ms before the control register reports that
|
|
Takashi Iwai |
2e5e58 |
+ * 1.8V is ready, and far longer still before the card will actually
|
|
Takashi Iwai |
2e5e58 |
+ * work reliably.
|
|
Takashi Iwai |
2e5e58 |
*/
|
|
Takashi Iwai |
2e5e58 |
- usleep_range(5000, 5500);
|
|
Takashi Iwai |
2e5e58 |
+ usleep_range(100000, 110000);
|
|
Takashi Iwai |
2e5e58 |
}
|
|
Takashi Iwai |
2e5e58 |
|
|
Takashi Iwai |
2e5e58 |
static void sdhci_gl9750_reset(struct sdhci_host *host, u8 mask)
|
|
Takashi Iwai |
2e5e58 |
--
|
|
Takashi Iwai |
2e5e58 |
2.26.2
|
|
Takashi Iwai |
2e5e58 |
|