[PATCH] mmc: dw_mmc-rockchip: fix training on devices with internal phases
Alexis Bauvin
alexis at bauvin.com
Tue Nov 10 12:00:46 PST 2026
Controllers with internal phases don't need the "ciu-drive" and
"ciu-sample" clocks, and recent versions don't have them at all. Tuning
expects those clocks to be filled when it is not necessary, and fails on
devices which don't need them.
Fixes eMMC training on such device by not requiring the clocks when they
are internal to the controller, as they are not populated anymore on
devices using the RK3576 compatible strings.
This has been tested on an RK3506 on the 6.12 branch from
linux-rockchip.
Fixes: 73abb1f16e ("mmc: dw_mmc-rockchip: Add support for rk3576 SoCs")
Signed-off-by: Alexis Bauvin <alexis at bauvin.com>
---
drivers/mmc/host/dw_mmc-rockchip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
index a134be59601d..d3158ab05aa1 100644
--- a/drivers/mmc/host/dw_mmc-rockchip.c
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
@@ -354,7 +354,7 @@ static int dw_mci_rk3288_execute_tuning(struct dw_mci_slot *slot, u32 opcode)
int middle_phase;
int phase;
- if (IS_ERR(priv->sample_clk)) {
+ if (IS_ERR(priv->sample_clk) && !priv->internal_phase) {
dev_err(host->dev, "Tuning clock (sample_clk) not defined.\n");
return -EIO;
}
--
2.56.0
More information about the Linux-rockchip
mailing list