Skip to contentSkip to conversation

mmc: Add support for eMMC 5.1B specification

PATCH Applied Han Xu 3 participants 5 messages Feb 25 – May 4 MMC, SD and SDIO

lore
Share & tools
lore

Han Xu

author
#0 lore raw

PATCH 1/1 mmc: Add support for eMMC 5.1B specification

Add support for eMMC specification version 5.1B by defining MMC_VERSION_5_1B and including it in the version array.

eMMC 5.1B (JESD84-B51B) is a minor revision of the 5.1 specification that primarily addresses MDT (Manufacturing Date) adjustment for dates beyond 2025. This aligns with the Linux kernel commit 9996707822f82 ("mmc: core: Adjust MDT beyond 2025").

Since the manufacturing date field is not currently used in U-Boot, this change has no functional impact beyond proper device recognition. It allows the driver to correctly identify and initialize eMMC devices that report version 5.1B in their Extended CSD register.

---
 drivers/mmc/mmc.c | 3 ++-
 include/mmc.h     | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/mmc/mmc.c +2 -1
index c5705f4f215..f0e38efb262 100644
@@ -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)
include/mmc.h +1 -0
index 51d3f2f8dd5..9509c9e9543 100644
@@ -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, 0xB)
 
 #define MMC_CAP(mode)		(1 << mode)
 #define MMC_MODE_HS		(MMC_CAP(MMC_HS) | MMC_CAP(SD_HS))
Signature · 1 line
2.34.1
#1 lore raw

Hi Han,

Quoted 42 lines

Subject: [PATCH] mmc: Add support for eMMC 5.1B specification

Add support for eMMC specification version 5.1B by defining MMC_VERSION_5_1B and including it in the version array.

eMMC 5.1B (JESD84-B51B) is a minor revision of the 5.1 specification that primarily addresses MDT (Manufacturing Date) adjustment for dates beyond 2025. This aligns with the Linux kernel commit 9996707822f82
("mmc: core: Adjust MDT beyond 2025").

Since the manufacturing date field is not currently used in U-Boot, this change has no functional impact beyond proper device recognition. It allows the driver to correctly identify and initialize eMMC devices that report version 5.1B in their Extended CSD register.

---
 drivers/mmc/mmc.c | 3 ++-
 include/mmc.h     | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/mmc/mmc.c index renamed from drivers/mmc/mmc.c +0 -0

c5705f4f215..f0e38efb262 100644

drivers/mmc/mmc.c +2 -1
@@ -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)

include/mmc.h index renamed from include/mmc.h +0 -0

51d3f2f8dd5..9509c9e9543 100644

include/mmc.h struct bd_info; · line 60

Quoted 7 lines
include/mmc.h +1 -0
@@ -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, 0xB)

https://lore.kernel.org/u-boot/[email protected]/

I have same question here.

Thanks,
Peng

Quoted 6 lines

#define MMC_CAP(mode) (1 << mode)
#define MMC_MODE_HS (MMC_CAP(MMC_HS) |
MMC_CAP(SD_HS))
--
2.34.1

author
#2 lore raw
Quoted 54 lines · Peng Fan (OSS)

Hi Han,

Quoted 42 lines

Subject: [PATCH] mmc: Add support for eMMC 5.1B specification

Add support for eMMC specification version 5.1B by defining MMC_VERSION_5_1B and including it in the version array.

eMMC 5.1B (JESD84-B51B) is a minor revision of the 5.1 specification that primarily addresses MDT (Manufacturing Date) adjustment for dates beyond 2025. This aligns with the Linux kernel commit 9996707822f82
("mmc: core: Adjust MDT beyond 2025").

Since the manufacturing date field is not currently used in U-Boot, this change has no functional impact beyond proper device recognition. It allows the driver to correctly identify and initialize eMMC devices that report version 5.1B in their Extended CSD register.

---
 drivers/mmc/mmc.c | 3 ++-
 include/mmc.h     | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/mmc/mmc.c index renamed from drivers/mmc/mmc.c +0 -0

c5705f4f215..f0e38efb262 100644

drivers/mmc/mmc.c +2 -1
@@ -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)

include/mmc.h index renamed from include/mmc.h +0 -0

51d3f2f8dd5..9509c9e9543 100644

include/mmc.h struct bd_info; · line 60

Quoted 7 lines
include/mmc.h +1 -0
@@ -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, 0xB)

https://lore.kernel.org/u-boot/[email protected]/

Quoted 4 lines

I have same question here.

Thanks,
Peng

Yes, I met the issue when testing Samsung KLMBG1REWF-B04Q eMMC, the mmc info command showed nothing and return error, because the mmc initialization failed at mmc_startup_v4() function when checking the version array.

With the code change, the mmc device can be recognized and worked properly.

u-boot=> mmc info
Device: FSL_SDHC
Manufacturer ID: 15
OEM: 0
Name: BRWF4R
Bus Speed: 200000000
Mode: HS400ES (200MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 29.8 GiB
Bus Width: 8-bit DDR
Erase Group Size: 512 KiB
HC WP Group Size: 16 MiB
User Capacity: 29.8 GiB WRREL
Boot Capacity: 31.9 MiB ENH
RPMB Capacity: 4 MiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected

Quoted 8 lines
Quoted 7 lines

#define MMC_CAP(mode) (1 << mode)
#define MMC_MODE_HS (MMC_CAP(MMC_HS) |
MMC_CAP(SD_HS))
--
2.34.1

#3 lore raw
In reply to Han Xu

From: Peng Fan <[email protected]>

Quoted 9 lines · Han Xu

Add support for eMMC specification version 5.1B by defining MMC_VERSION_5_1B and including it in the version array.

eMMC 5.1B (JESD84-B51B) is a minor revision of the 5.1 specification that primarily addresses MDT (Manufacturing Date) adjustment for dates beyond 2025. This aligns with the Linux kernel commit 9996707822f82 ("mmc: core: Adjust MDT beyond 2025").

[...]

Applied to mmc-next-2026-03-23, thanks!

[1/1] mmc: Add support for eMMC 5.1B specification

      commit: 67fc505228558efa19380542d801807fa9eee054

Best regards,

Signature · 1 line
Peng Fan <[email protected]>
#4 lore raw

Hi,

Quoted 13 lines · Peng Fan (OSS)

From: Peng Fan <[email protected]>

Quoted 8 lines · Han Xu

Add support for eMMC specification version 5.1B by defining MMC_VERSION_5_1B and including it in the version array.

eMMC 5.1B (JESD84-B51B) is a minor revision of the 5.1 specification that primarily addresses MDT (Manufacturing Date) adjustment for dates beyond 2025. This aligns with the Linux kernel commit 9996707822f82 ("mmc: core: Adjust MDT beyond 2025").

Quoted 7 lines
Quoted 1 line

[...]

Applied to mmc-next-2026-03-23, thanks!

[1/1] mmc: Add support for eMMC 5.1B specification

      commit: 67fc505228558efa19380542d801807fa9eee054

Oddly this commit (which looks fine to me) breaks beagleplay in my lab. There is no console output from SPL at all.

If I disable LTO it seems to work OK. So perhaps this is a 14.2 toolchain bug. I'm just posting here in case anyone else hits the same thing.

Regards,
Simon