From: Chris Morgan <macroalpha82@gmail.com>
To: u-boot@lists.denx.de
Cc: jagan@amarulasolutions.com, miquel.raynal@bootlin.com,
wd@denx.de, sjg@chromium.org,
Chris Morgan <macromorgan@hotmail.com>
Subject: [PATCH v4 3/3] mtd: Add pairing info for Hynix H27UCG8T2ETR NAND
Date: Thu, 16 Dec 2021 12:44:48 -0600 [thread overview]
Message-ID: <20211216184448.27193-4-macroalpha82@gmail.com> (raw)
In-Reply-To: <20211216184448.27193-1-macroalpha82@gmail.com>
From: Chris Morgan <macromorgan@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@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
next prev parent reply other threads:[~2021-12-16 18:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-16 18:44 [PATCH v4 0/3] mtd: Support slc-mode for NTC CHIP Chris Morgan
2021-12-16 18:44 ` [PATCH v4 1/3] mtd: Add support for Linux slc-mode for MLC NAND Chris Morgan
2021-12-16 18:44 ` [PATCH v4 2/3] mtd: Add pairing info for Toshiba TC58TEG5DCLTA00 NAND Chris Morgan
2021-12-16 18:44 ` Chris Morgan [this message]
2022-01-20 13:14 ` [PATCH v4 0/3] mtd: Support slc-mode for NTC CHIP Jagan Teki
2022-03-10 12:00 ` Jagan Teki
2022-03-10 15:27 ` Chris Morgan
2022-03-11 19:32 ` Jagan Teki
2022-03-28 21:32 ` Chris Morgan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211216184448.27193-4-macroalpha82@gmail.com \
--to=macroalpha82@gmail.com \
--cc=jagan@amarulasolutions.com \
--cc=macromorgan@hotmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
--cc=wd@denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox