From: Angelo Compagnucci <angelo.compagnucci@gmail.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
Angelo Compagnucci <angelo.compagnucci@gmail.com>
Subject: [PATCH 1/2] mtd: spinand: gigadevice: add support for GD5F4GM7UExxG
Date: Mon, 16 Nov 2026 16:28:46 +0100 [thread overview]
Message-ID: <20261116152847.3658486-2-angelo.compagnucci@gmail.com> (raw)
In-Reply-To: <20261116152847.3658486-1-angelo.compagnucci@gmail.com>
Add the GigaDevice GD5F4GM7UExxG. It is a 4Gbit 3.3V SPI NAND with
4096 byte pages and 256 byte OOB.
The ECC status works like on the GD5F4GM8. With ECC enabled, only the
first 128 OOB bytes are free. The other 128 hold the ECC parity, like
on the GD5F4GQ4xC. The Quad IO read needs two dummy bytes, like on the
GD5F1GQ5.
The values come from the GigaDevice datasheet DS-01326, Rev 1.0.
Tested on an STM32MP133 board with UBI and UBIFS.
Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
---
drivers/mtd/nand/spi/gigadevice.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/mtd/nand/spi/gigadevice.c b/drivers/mtd/nand/spi/gigadevice.c
index a6d6d6e0c..990f2d271 100644
--- a/drivers/mtd/nand/spi/gigadevice.c
+++ b/drivers/mtd/nand/spi/gigadevice.c
@@ -564,6 +564,16 @@ static const struct spinand_info gigadevice_spinand_table[] = {
SPINAND_HAS_QE_BIT,
SPINAND_ECCINFO(&gd5fxgqx_variant2_ooblayout,
gd5fxgq4uexxg_ecc_get_status)),
+ SPINAND_INFO("GD5F4GM7UExxG",
+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x94),
+ NAND_MEMORG(1, 4096, 256, 64, 2048, 40, 1, 1, 1),
+ NAND_ECCREQ(8, 512),
+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants_1gq5,
+ &write_cache_variants,
+ &update_cache_variants),
+ SPINAND_HAS_QE_BIT,
+ SPINAND_ECCINFO(&gd5fxgq4xc_oob_256_ops,
+ gd5fxgq4uexxg_ecc_get_status)),
SPINAND_INFO("GD5F4GM8UExxG",
SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x95),
NAND_MEMORG(1, 2048, 128, 64, 4096, 80, 1, 1, 1),
--
2.53.0
next prev parent reply other threads:[~2026-11-16 15:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 15:28 [PATCH 0/2] mtd: spinand: add GD5F4GM7UExxG and XT26G04C Angelo Compagnucci
2026-11-16 15:28 ` Angelo Compagnucci [this message]
2026-11-16 15:28 ` [PATCH 2/2] mtd: spinand: xtx: add support for XT26G04C Angelo Compagnucci
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=20261116152847.3658486-2-angelo.compagnucci@gmail.com \
--to=angelo.compagnucci@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=vigneshr@ti.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®