mtd: spinand: macronix: Add support for serial NAND flash
authorJaimeLiao <jaimeliao.tw@gmail.com>
Thu, 8 Jun 2023 05:21:14 +0000 (13:21 +0800)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 9 Jun 2023 15:21:17 +0000 (17:21 +0200)
MX31LF2GE4BC and MX31UF2GE4BC are Macroninx SPI NAND flash
with 8-bit on-die ECC.

Validated via normal(default) and QUAD mode by read ,read back,
on Xilinx Zynq PicoZed FPGA which include Macronix
SPI Host(drivers/spi/spi-mxic.c)

Signed-off-by: JaimeLiao <jaimeliao.tw@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230608052114.20454-1-jaimeliao.tw@gmail.com
drivers/mtd/nand/spi/macronix.c

index 722a9738ba370f1ff70922e710cbf8375adf5e4e..3dfc7e1e52410272753436074053cae2383f08fe 100644 (file)
@@ -299,6 +299,26 @@ static const struct spinand_info macronix_spinand_table[] = {
                     SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout,
                                     mx35lf1ge4ab_ecc_get_status)),
 
+       SPINAND_INFO("MX31LF2GE4BC",
+                    SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x2e),
+                    NAND_MEMORG(1, 2048, 64, 64, 2048, 40, 1, 1, 1),
+                    NAND_ECCREQ(8, 512),
+                    SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
+                                             &write_cache_variants,
+                                             &update_cache_variants),
+                    SPINAND_HAS_QE_BIT,
+                    SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout,
+                                    mx35lf1ge4ab_ecc_get_status)),
+       SPINAND_INFO("MX3UF2GE4BC",
+                    SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xae),
+                    NAND_MEMORG(1, 2048, 64, 64, 2048, 40, 1, 1, 1),
+                    NAND_ECCREQ(8, 512),
+                    SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
+                                             &write_cache_variants,
+                                             &update_cache_variants),
+                    SPINAND_HAS_QE_BIT,
+                    SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout,
+                                    mx35lf1ge4ab_ecc_get_status)),
 };
 
 static const struct spinand_manufacturer_ops macronix_spinand_manuf_ops = {