* [PATCH] mmc: add support for JESD84-B51B with CSD_REV 9
@ 2026-01-30 9:35 Gregory Baudet
2026-02-03 13:37 ` Peng Fan
0 siblings, 1 reply; 2+ messages in thread
From: Gregory Baudet @ 2026-01-30 9:35 UTC (permalink / raw)
To: u-boot; +Cc: Gregory Baudet, Peng Fang, Jaehoon Chung
This patch allows correct version detection for newer eMMC devices
following the 5.1B version of the standard. This new version of the
standard introduces CSD revision 9, and a new decoding rule of the MDT
field in CID register.
Signed-off-by: Gregory Baudet <Gregory.B.dev@gmail.com>
Cc: Peng Fang <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
---
drivers/mmc/mmc.c | 3 ++-
include/mmc.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 7dadff27abe..d9e6860bc74 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -2343,7 +2343,8 @@ static int mmc_startup_v4(struct mmc *mmc)
MMC_VERSION_4_41,
MMC_VERSION_4_5,
MMC_VERSION_5_0,
- MMC_VERSION_5_1
+ MMC_VERSION_5_1,
+ MMC_VERSION_5_1B
};
#if CONFIG_IS_ENABLED(MMC_TINY)
diff --git a/include/mmc.h b/include/mmc.h
index 51d3f2f8dd5..47b0f11877d 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -54,6 +54,7 @@ struct bd_info;
#define MMC_VERSION_4_5 MAKE_MMC_VERSION(4, 5, 0)
#define MMC_VERSION_5_0 MAKE_MMC_VERSION(5, 0, 0)
#define MMC_VERSION_5_1 MAKE_MMC_VERSION(5, 1, 0)
+#define MMC_VERSION_5_1B MAKE_MMC_VERSION(5, 1, 1)
#define MMC_CAP(mode) (1 << mode)
#define MMC_MODE_HS (MMC_CAP(MMC_HS) | MMC_CAP(SD_HS))
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: add support for JESD84-B51B with CSD_REV 9
2026-01-30 9:35 [PATCH] mmc: add support for JESD84-B51B with CSD_REV 9 Gregory Baudet
@ 2026-02-03 13:37 ` Peng Fan
0 siblings, 0 replies; 2+ messages in thread
From: Peng Fan @ 2026-02-03 13:37 UTC (permalink / raw)
To: Gregory Baudet; +Cc: u-boot, Peng Fang, Jaehoon Chung
On Fri, Jan 30, 2026 at 10:35:39AM +0100, Gregory Baudet wrote:
>This patch allows correct version detection for newer eMMC devices
>following the 5.1B version of the standard. This new version of the
>standard introduces CSD revision 9, and a new decoding rule of the MDT
>field in CID register.
>
>Signed-off-by: Gregory Baudet <Gregory.B.dev@gmail.com>
>Cc: Peng Fang <peng.fan@nxp.com>
>Cc: Jaehoon Chung <jh80.chung@samsung.com>
>---
> drivers/mmc/mmc.c | 3 ++-
> include/mmc.h | 1 +
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
>index 7dadff27abe..d9e6860bc74 100644
>--- a/drivers/mmc/mmc.c
>+++ b/drivers/mmc/mmc.c
>@@ -2343,7 +2343,8 @@ static int mmc_startup_v4(struct mmc *mmc)
> MMC_VERSION_4_41,
> MMC_VERSION_4_5,
> MMC_VERSION_5_0,
>- MMC_VERSION_5_1
>+ MMC_VERSION_5_1,
>+ MMC_VERSION_5_1B
> };
>
> #if CONFIG_IS_ENABLED(MMC_TINY)
>diff --git a/include/mmc.h b/include/mmc.h
>index 51d3f2f8dd5..47b0f11877d 100644
>--- a/include/mmc.h
>+++ b/include/mmc.h
>@@ -54,6 +54,7 @@ struct bd_info;
> #define MMC_VERSION_4_5 MAKE_MMC_VERSION(4, 5, 0)
> #define MMC_VERSION_5_0 MAKE_MMC_VERSION(5, 0, 0)
> #define MMC_VERSION_5_1 MAKE_MMC_VERSION(5, 1, 0)
>+#define MMC_VERSION_5_1B MAKE_MMC_VERSION(5, 1, 1)
>
> #define MMC_CAP(mode) (1 << mode)
> #define MMC_MODE_HS (MMC_CAP(MMC_HS) | MMC_CAP(SD_HS))
The changes looks good to me. But I would see whether this has been
tested on real devices.
Thanks,
Peng
>--
>2.51.0
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-03 12:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-30 9:35 [PATCH] mmc: add support for JESD84-B51B with CSD_REV 9 Gregory Baudet
2026-02-03 13:37 ` Peng Fan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox