[PATCH 1/2] mmc: Imply HS200 cap with mmc-hs400 prop to match linux

Jonas Karlman jonas at kwiboo.se
Mon Apr 8 23:06:15 CEST 2024


eMMC nodes in linux device tree files typically only contain a mmc-hs400
prop to signal support for both HS400 and HS200. However, U-Boot require
an explicit mmc-hs200 prop to signal support for the HS200 mode.

Fix this by follow linux and imply HS200 cap when HS400 cap is signaled
using a mmc-hs400 prop.

Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
---
This fixes booting from eMMC on nanopc-t6-rk3588 and quartzpro64-rk3588
that probably broke with commit 6de9d7b2f13c ("rockchip: rk35xx: Enable
eMMC HS200 mode by default").
---
 drivers/mmc/mmc-uclass.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index 328456831dd2..1349da72b102 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -251,9 +251,9 @@ int mmc_of_parse(struct udevice *dev, struct mmc_config *cfg)
 	if (dev_read_bool(dev, "mmc-hs200-1_2v"))
 		cfg->host_caps |= MMC_CAP(MMC_HS_200);
 	if (dev_read_bool(dev, "mmc-hs400-1_8v"))
-		cfg->host_caps |= MMC_CAP(MMC_HS_400);
+		cfg->host_caps |= MMC_CAP(MMC_HS_400) | MMC_CAP(MMC_HS_200);
 	if (dev_read_bool(dev, "mmc-hs400-1_2v"))
-		cfg->host_caps |= MMC_CAP(MMC_HS_400);
+		cfg->host_caps |= MMC_CAP(MMC_HS_400) | MMC_CAP(MMC_HS_200);
 	if (dev_read_bool(dev, "mmc-hs400-enhanced-strobe"))
 		cfg->host_caps |= MMC_CAP(MMC_HS_400_ES);
 
-- 
2.43.2



More information about the U-Boot mailing list