From: Teng Wu <gigadevice2025@gmail.com>
To: linux-mtd@lists.infradead.org
Cc: miquel.raynal@bootlin.com, vigneshr@ti.com, richard@nod.at,
linux-kernel@vger.kernel.org, teng.wu@gigadevice.com,
weijie.huang@gigadevice.com
Subject: [PATCH] mtd: rawnand: Skip timing mode readback check for GigaDevice NAND
Date: Tue, 24 Nov 2026 21:06:21 +0800 [thread overview]
Message-ID: <awWLzWDg-m9VBZVr@Fantast-WT.localdomain> (raw)
GigaDevice raw NAND chips (manufacturer ID 0xC8) support the timing
modes advertised in their ONFI parameter page, so there is no need to
verify or enforce the timing mode switch on them. The supported set
depends on the supply voltage: 3.3V parts (e.g. GD9FU2G8F3A, DID DAh)
report modes 0-5 (3Fh in byte 129-130 of the parameter page), while
1.8V parts (e.g. GD9FS2G8F3A, DID AAh) report modes 0-4 (1Fh). The
highest supported mode is already picked automatically from the
parameter page by nand_choose_best_sdr_timings(), so the only thing
getting in the way is the readback check.
The GET_FEATURE timing mode readback on these chips does not reflect
the mode selected through SET_FEATURE. The strict check in
nand_setup_interface() therefore misdetects the chip as not
acknowledging the requested timing mode, printing "timing mode N not
acknowledged by the NAND chip" and falling back to a slower mode for
no reason.
Skip the readback check for GigaDevice chips while keeping it for all
other vendors, and go straight to updating the interface
configuration.
Signed-off-by: Teng Wu <gigadevice2025@gmail.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 a225b10f8145..8d77ebac4939 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -890,6 +890,15 @@ static int nand_setup_interface(struct nand_chip *chip, int chipnr)
goto err_reset_chip;
if (request != tmode_param[0]) {
+ /*
+ * GigaDevice raw NAND chips (manufacturer ID 0xC8) support
+ * the timing modes advertised in their ONFI parameter page.
+ * Skip the strict ack check; keep it for other vendors.
+ */
+ if (chip->id.data[0] == 0xC8) {
+ goto update_interface_config;
+ }
+
pr_warn("%s timing mode %d not acknowledged by the NAND chip\n",
nand_interface_is_nvddr(chip->best_interface_config) ? "NV-DDR" : "SDR",
chip->best_interface_config->timings.mode);
--
2.43.0
next reply other threads:[~2026-11-24 13:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 13:06 Teng Wu [this message]
2026-11-24 13:40 ` Miquel Raynal
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=awWLzWDg-m9VBZVr@Fantast-WT.localdomain \
--to=gigadevice2025@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=teng.wu@gigadevice.com \
--cc=vigneshr@ti.com \
--cc=weijie.huang@gigadevice.com \
/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
all inboxes | Powered by JetHome®