[PATCH v2] mtd: spi-nor: infineon: add Cypress (Ramtron) CY15B102Q F-RAM support

A. Sverdlin alexander.sverdlin at siemens.com
Wed Sep 25 05:25:45 PDT 2024


From: Alexander Sverdlin <alexander.sverdlin at siemens.com>

First chip that requires 9-byte Device ID, but at least in the proper
order.

Link: https://www.infineon.com/dgdl/Infineon-CY15B102Q_2-Mbit_(256_K_8)_Serial_(SPI)_Automotive_F-RAM-DataSheet-v07_00-EN.pdf?fileId=8ac78c8c7d0d8da4017d0ecf5fe049d3
Signed-off-by: Alexander Sverdlin <alexander.sverdlin at siemens.com>
---
Changes in v2:
* set SPI_NOR_MAX_ID_LEN to 9

 drivers/mtd/spi-nor/core.h     | 2 +-
 drivers/mtd/spi-nor/spansion.c | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
index 1516b6d0dc37a..fa6007ac36e14 100644
--- a/drivers/mtd/spi-nor/core.h
+++ b/drivers/mtd/spi-nor/core.h
@@ -9,7 +9,7 @@
 
 #include "sfdp.h"
 
-#define SPI_NOR_MAX_ID_LEN	6
+#define SPI_NOR_MAX_ID_LEN	9
 /*
  * 256 bytes is a sane default for most older flashes. Newer flashes will
  * have the page size defined within their SFDP tables.
diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
index 6356da2cb0be2..38b68a62b31d9 100644
--- a/drivers/mtd/spi-nor/spansion.c
+++ b/drivers/mtd/spi-nor/spansion.c
@@ -987,6 +987,12 @@ static const struct flash_info spansion_nor_parts[] = {
 		.name = "s28hs02gt",
 		.mfr_flags = USE_CLPEF,
 		.fixups = &s28hx_t_fixups,
+	}, {
+		.id = SNOR_ID(0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0xc2, 0x25, 0xc8),
+		.name = "cy15b102q",
+		.size = SZ_256K,
+		.sector_size = SZ_256K,
+		.flags = SPI_NOR_NO_ERASE,
 	}, {
 		.id = SNOR_ID(0xef, 0x40, 0x13),
 		.name = "s25fl004k",
-- 
2.46.1




More information about the linux-mtd mailing list