public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 1/2] mmc: Imply HS200 cap with mmc-hs400 prop to match linux
@ 2024-04-08 21:06 Jonas Karlman
  2024-04-08 21:06 ` [PATCH 2/2] mmc: Add support for the no-mmc-hs400 prop Jonas Karlman
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Jonas Karlman @ 2024-04-08 21:06 UTC (permalink / raw)
  To: Peng Fan, Jaehoon Chung, Tom Rini; +Cc: Jonas Karlman, u-boot

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@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


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-04-17  1:28 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-08 21:06 [PATCH 1/2] mmc: Imply HS200 cap with mmc-hs400 prop to match linux Jonas Karlman
2024-04-08 21:06 ` [PATCH 2/2] mmc: Add support for the no-mmc-hs400 prop Jonas Karlman
2024-04-08 21:17   ` Dragan Simic
2024-04-16 23:34   ` Jaehoon Chung
2024-04-08 21:17 ` [PATCH 1/2] mmc: Imply HS200 cap with mmc-hs400 prop to match linux Dragan Simic
2024-04-09 15:27 ` Quentin Schulz
2024-04-09 15:58   ` Jonas Karlman
2024-04-09 16:02     ` Quentin Schulz
2024-04-09 16:30       ` Jonas Karlman
2024-04-09 19:30         ` Dragan Simic
2024-04-10  8:47           ` Quentin Schulz
2024-04-10  9:24             ` Dragan Simic
2024-04-09 19:28       ` Dragan Simic
2024-04-10  8:56         ` Quentin Schulz
2024-04-10  9:22           ` Dragan Simic
2024-04-16 23:33           ` Jaehoon Chung
2024-04-17  1:28             ` Dragan Simic
2024-04-16 23:23   ` Jaehoon Chung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox