Skip to contentSkip to conversation

mtd: spi-nor: macronix: Add support for mx66u1g45g

PATCH Superseded Dinh Nguyen 2 participants 3 messages Nov 11, 2022 – Nov 20, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mtd: spi-nor: macronix: Add support for mx66u1g45g

The MX66U1G45G is the smaller sibling (128MB) of the MX66U2G45G (256MB) that is already supported.

Tested on Intel N5X socdk board,
- random data write, erase, read - verified erase operations
- random data write, read and compare - verified write/read operations

---
v2: fixed compile error by removing , after PARSE_SFDP

---
 drivers/mtd/spi-nor/macronix.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/mtd/spi-nor/macronix.c +4 -0
index d81a4cb2812b..07ace9da74b7 100644
@@ -97,6 +97,10 @@ static const struct flash_info macronix_nor_parts[] = {
 			      SPI_NOR_QUAD_READ) },
 	{ "mx66l1g55g",  INFO(0xc2261b, 0, 64 * 1024, 2048)
 		NO_SFDP_FLAGS(SPI_NOR_QUAD_READ) },
+	{ "mx66u1g45g",  INFO(0xc2253b, 0, 64 * 1024, 2048)
+		PARSE_SFDP
+		FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
+		FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },
 	{ "mx66u2g45g",	 INFO(0xc2253c, 0, 64 * 1024, 4096)
 		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
 		FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/1 mtd: spi-nor: macronix: Add support for mx66u1g45g

The MX66U1G45G is the smaller sibling (128MB) of the MX66U2G45G (256MB) that is already supported.

Tested on Intel N5X socdk board,
- random data write, erase, read - verified erase operations
- random data write, read and compare - verified write/read operations

---
v2: fixed compile error by removing , after PARSE_SFDP

---
 drivers/mtd/spi-nor/macronix.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/mtd/spi-nor/macronix.c +4 -0
index d81a4cb2812b..07ace9da74b7 100644
@@ -97,6 +97,10 @@ static const struct flash_info macronix_nor_parts[] = {
 			      SPI_NOR_QUAD_READ) },
 	{ "mx66l1g55g",  INFO(0xc2261b, 0, 64 * 1024, 2048)
 		NO_SFDP_FLAGS(SPI_NOR_QUAD_READ) },
+	{ "mx66u1g45g",  INFO(0xc2253b, 0, 64 * 1024, 2048)
+		PARSE_SFDP
+		FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
+		FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },
 	{ "mx66u2g45g",	 INFO(0xc2253c, 0, 64 * 1024, 4096)
 		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
 		FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },
Signature · 1 line
2.25.1
maintainer
#2 lore raw
In reply to Dinh Nguyen
Quoted 20 lines · Dinh Nguyen

The MX66U1G45G is the smaller sibling (128MB) of the MX66U2G45G (256MB) that is already supported.

Tested on Intel N5X socdk board,
- random data write, erase, read - verified erase operations
- random data write, read and compare - verified write/read operations

---
v2: fixed compile error by removing , after PARSE_SFDP

---
 drivers/mtd/spi-nor/macronix.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/mtd/spi-nor/macronix.c +0 -0
index d81a4cb2812b..07ace9da74b7 100644

drivers/mtd/spi-nor/macronix.c static const struct flash_info macronix_nor_parts[] = { · line 103

Quoted 7 lines
drivers/mtd/spi-nor/macronix.c +4 -0
@@ -97,6 +97,10 @@ static const struct flash_info macronix_nor_parts[] = {
 			      SPI_NOR_QUAD_READ) },
 	{ "mx66l1g55g",  INFO(0xc2261b, 0, 64 * 1024, 2048)
 		NO_SFDP_FLAGS(SPI_NOR_QUAD_READ) },
+	{ "mx66u1g45g",  INFO(0xc2253b, 0, 64 * 1024, 2048)
+		PARSE_SFDP
+		FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
+		FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },

Why do you need these extra flags? Can't they be discovered by parsing the SFDP? If they can't, then you should explain in your commit message why that is so.

I would suspect they can be, so perhaps you should try using your flash with just PARSE_SFDP and see if it works.

Quoted 6 lines
drivers/mtd/spi-nor/macronix.c +0 -0
 	{ "mx66u2g45g",	 INFO(0xc2253c, 0, 64 * 1024, 4096)
 		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
 		FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },
Signature · 1 line
2.25.1
Signature · 2 lines
Regards,
Pratyush Yadav