developer | 41370d5 | 2022-03-16 16:01:59 +0800 | [diff] [blame] | 1 | From 051e070d0a019df6be9e21be1fb63352e4c4412e Mon Sep 17 00:00:00 2001 |
| 2 | From: YouChing Lin <ycllin@mxic.com.tw> |
| 3 | Date: Wed, 22 Jul 2020 16:02:57 +0800 |
| 4 | Subject: [PATCH] mtd: spinand: macronix: Add support for MX31LF1GE4BC |
| 5 | |
| 6 | The Macronix MX31LF1GE4BC is a 3V, 1Gbit (128MB) serial |
| 7 | NAND flash device. |
| 8 | |
| 9 | Validated by read, erase, read back, write and read back |
| 10 | on Xilinx Zynq PicoZed FPGA board which included |
| 11 | Macronix SPI Host (driver/spi/spi-mxic.c). |
| 12 | |
| 13 | Signed-off-by: YouChing Lin <ycllin@mxic.com.tw> |
| 14 | Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> |
| 15 | Link: https://lore.kernel.org/linux-mtd/1595404978-31079-2-git-send-email-ycllin@mxic.com.tw |
| 16 | --- |
| 17 | drivers/mtd/nand/spi/macronix.c | 10 ++++++++++ |
| 18 | 1 file changed, 10 insertions(+) |
| 19 | |
| 20 | diff --git a/drivers/mtd/nand/spi/macronix.c b/drivers/mtd/nand/spi/macronix.c |
| 21 | index 9ff8debd599418..9ae48ce1c46f91 100644 |
| 22 | --- a/drivers/mtd/nand/spi/macronix.c |
| 23 | +++ b/drivers/mtd/nand/spi/macronix.c |
| 24 | @@ -119,6 +119,16 @@ static const struct spinand_info macronix_spinand_table[] = { |
| 25 | &update_cache_variants), |
| 26 | SPINAND_HAS_QE_BIT, |
| 27 | SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, NULL)), |
| 28 | + SPINAND_INFO("MX31LF1GE4BC", |
| 29 | + SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x1e), |
| 30 | + NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1), |
| 31 | + NAND_ECCREQ(8, 512), |
| 32 | + SPINAND_INFO_OP_VARIANTS(&read_cache_variants, |
| 33 | + &write_cache_variants, |
| 34 | + &update_cache_variants), |
| 35 | + 0 /*SPINAND_HAS_QE_BIT*/, |
| 36 | + SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, |
| 37 | + mx35lf1ge4ab_ecc_get_status)), |
| 38 | }; |
| 39 | |
| 40 | static const struct spinand_manufacturer_ops macronix_spinand_manuf_ops = { |