[PATCH v4 3/3] mtd: Add pairing info for Hynix H27UCG8T2ETR NAND
Chris Morgan
macroalpha82 at gmail.com
Thu Dec 16 19:44:48 CET 2021
From: Chris Morgan <macromorgan at hotmail.com>
Add pairing info for the Hynix H27UCG8T2ETR NAND so that we may utilize
slc-mode emulation for enhanced reliability and compatibility with
upstream Linux.
I have checked with the team at #mtd and they can confirm based on
a cursory reading of the datasheet for this flash chip it appears to
use the same dist3 pairing scheme used by the Toshiba NAND which
already supports dist3 today in mainline Linux.
Signed-off-by: Chris Morgan <macromorgan at hotmail.com>
---
drivers/mtd/nand/raw/nand_base.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index 7fdb08e4df..20f54444ef 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -4551,6 +4551,14 @@ ident_done:
mtd_set_pairing_scheme(mtd, &dist3_pairing_scheme);
}
+ /* Enable slc-mode on H27UCG8T2ETR to enable upstream Linux */
+ if (id_data[0] == NAND_MFR_HYNIX && id_data[1] == 0xde
+ && id_data[2] == 0x14 && id_data[3] == 0xa7
+ && id_data[4] == 0x42 && id_data[5] == 0x4a) {
+ chip->options |= NAND_NEED_SCRAMBLING;
+ mtd_set_pairing_scheme(mtd, &dist3_pairing_scheme);
+ }
+
if (chip->options & NAND_BUSWIDTH_AUTO) {
WARN_ON(chip->options & NAND_BUSWIDTH_16);
chip->options |= busw;
--
2.30.2
More information about the U-Boot
mailing list