public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Chris Morgan <macroalpha82@gmail.com>
To: u-boot@lists.denx.de
Cc: sjg@chromium.org, miquel.raynal@bootlin.com,
	jagan@amarulasolutions.com, marek.behun@nic.cz,
	farhan.ali@broadcom.com, xypron.glpk@gmx.de,
	Chris Morgan <macromorgan@hotmail.com>
Subject: [RFC 2/2] mtd: Add pairing info for Toshiba TC58TEG5DCLTA00 NAND
Date: Fri, 17 Sep 2021 13:12:34 -0500	[thread overview]
Message-ID: <20210917181234.20088-3-macroalpha82@gmail.com> (raw)
In-Reply-To: <20210917181234.20088-1-macroalpha82@gmail.com>

From: Chris Morgan <macromorgan@hotmail.com>

Add pairing info for the Toshiba TC58TEG5DCLTA00 NAND so that we may
utilize slc-mode emulation for enhanced reliability and compatibility
with upstream Linux.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 drivers/mtd/nand/raw/nand_base.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index 845bf57c53..ac5b17af70 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -4549,6 +4549,15 @@ ident_done:
 			break;
 	}
 
+	/* Special handling for TC58TEG5DCLTA00 to match upstream Linux */
+	if (id_data[0] == NAND_MFR_TOSHIBA && id_data[1] == 0xd7
+	    && id_data[2] == 0x84 && id_data[3] == 0x93
+	    && id_data[4] == 0x72 && id_data[5] == 0x51
+	    && id_data[6] == 0x08 && id_data[7] == 0x04) {
+		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


      parent reply	other threads:[~2021-09-17 18:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17 18:12 [RFC 0/2] mtd: Support slc-mode for Toshiba TC58TEG5DCLTA00 Chris Morgan
2021-09-17 18:12 ` [RFC 1/2] mtd: Add partial support for Linux slc-mode for MLC NAND Chris Morgan
2021-09-17 18:12 ` Chris Morgan [this message]

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=20210917181234.20088-3-macroalpha82@gmail.com \
    --to=macroalpha82@gmail.com \
    --cc=farhan.ali@broadcom.com \
    --cc=jagan@amarulasolutions.com \
    --cc=macromorgan@hotmail.com \
    --cc=marek.behun@nic.cz \
    --cc=miquel.raynal@bootlin.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.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