[PATCH v3] Add support for XM25LU64C

Ssunk ssunkkan at gmail.com
Mon Jul 7 05:14:28 PDT 2025


The device is produced by Wuhan Xinxin Semiconductor Manufacturing Corp. (XMC)
and found on some routers from Chinese manufactures.
We need to add this chip to google's AVL
The flash ID was incorrectly set to 0x16 0x41 0x17.
Update to 0x20 0x41 0x17 as per the datasheet.

The data sheet can be found here:
https://www.xmcwh.com/uploads/954/XM25LU64C_V1.5.pdf

Signed-off-by: Kankan Sun <ssunkkan at gmail.com>
---
Changes since v3:
  - Our xm25lu64c is not working properly with flashrom, we need to add the following SPI_NOR_HAS_LOCK, SPI_NOR_HAS_TB flags to make the flashrom work normally.
 v2->v3: Add SPI_NOR_HAS_LOCK, SPI_NOR_HAS_TB flags to make the flashrom work normally.
 v1->v2: Update the flash ID to 0x20 0x41 0x17 as per the datasheet.
 drivers/mtd/spi-nor/xmc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/mtd/spi-nor/xmc.c b/drivers/mtd/spi-nor/xmc.c
index d5a06054b0dd..f1f2a9ba353e 100644
--- a/drivers/mtd/spi-nor/xmc.c
+++ b/drivers/mtd/spi-nor/xmc.c
@@ -19,6 +19,12 @@ static const struct flash_info xmc_nor_parts[] = {
 		.name = "XM25QH128A",
 		.size = SZ_16M,
 		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
+	}, {
+		.id = SNOR_ID(0x20, 0x41, 0x17),
+		.name = "XM25LU64C",
+		.size = SZ_8M,
+		.flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
+		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
 	},
 };
 
-- 
2.34.1




More information about the linux-mtd mailing list