[PATCH v2 1/4] mmc: sdhci-cadence: add PHY settle after tuning for SD6HC
From: tze . yee . ng
Date: Thu Oct 08 2026 - 22:16:14 EST
From: Tze Yee Ng <tze.yee.ng@xxxxxxxxxx>
On SD6HC the first command after tuning may be an R1b busy command (e.g.
the HS200->HS CMD6 during HS400 selection) that can time out on some eMMC
unless the PHY is given a brief settle after the final tap and DLL
re-lock.
Add a single 5 to 5.5 ms settle at the end of the SD6HC tuning path,
after the winning tap is applied, rather than on every set_tune_val()
call in the scan.
Signed-off-by: Tze Yee Ng <tze.yee.ng@xxxxxxxxxx>
---
Changes in v2:
- Moved the 5ms PHY settle out of the per-tap tuning loop to a single
settle after the winning tap, on the success path only.
(Adrian Hunter, Tanmay Kathpalia)
- Rewrote the comment to explain this specific call site.
(Tanmay Kathpalia)
---
drivers/mmc/host/sdhci-cadence-core.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-cadence-core.c b/drivers/mmc/host/sdhci-cadence-core.c
index 745455743b01..c25b235ee909 100644
--- a/drivers/mmc/host/sdhci-cadence-core.c
+++ b/drivers/mmc/host/sdhci-cadence-core.c
@@ -7,6 +7,7 @@
#include <linux/bitfield.h>
#include <linux/bits.h>
+#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/iopoll.h>
#include <linux/module.h>
@@ -352,8 +353,11 @@ static int sdhci_cdns_execute_tuning(struct sdhci_host *host, u32 opcode)
return ret;
/* Block gap tuning is only required for SD4HC, not for SD6HC */
- if (host->version >= SDHCI_SPEC_420)
+ if (host->version >= SDHCI_SPEC_420) {
+ /* Let the PHY settle after the final tap and DLL re-lock. */
+ usleep_range(5000, 5500);
return 0;
+ }
return sdhci_cdns_tune_blkgap(host->mmc);
}
--
2.43.7