Skip to contentSkip to conversation

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

PATCH In review Witold Sadowski 2 participants 2 messages Mar 28, 2024 – Apr 2, 2024

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

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

The Macronix mx25um51245g is a 1.8V, 512Mbit (64MB) device that supports x1, or x8 operation.

Tested on Marvell Octeon SoC hardware with a Cadence xSPI controller.

---
 drivers/mtd/spi-nor/macronix.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/mtd/spi-nor/macronix.c +6 -0
index ea6be95e75a5..f5fbdb7912e0 100644
@@ -182,6 +182,12 @@ static const struct flash_info macronix_nor_parts[] = {
 		.name = "mx25l3255e",
 		.size = SZ_4M,
 		.no_sfdp_flags = SECT_4K,
+	}, {
+                .id = SNOR_ID(0xc2, 0x80, 0x3a),
+                .name = "mx25um51245g",
+                .size = SZ_64M,
+                .no_sfdp_flags = SECT_4K,
+                .fixup_flags = SPI_NOR_4B_OPCODES,
 	}
 };
 
Signature · 1 line
2.17.1
maintainer
#1 lore raw

[+ linux-mtd ]

Hi,

Quoted 6 lines · Witold Sadowski

The Macronix mx25um51245g is a 1.8V, 512Mbit (64MB) device that supports x1, or x8 operation.

Tested on Marvell Octeon SoC hardware with a Cadence xSPI controller.

You haven't CC'ed the correct list, therefore it's unlikely this will get a proper review/getting merged at all.

As Krzysztof already pointed out on another series of yours, please read submitting-patches.rst.

For nor flash related submissions please also read:
https://docs.kernel.org/driver-api/mtd/spi-nor.html

Quoted 9 lines
---
 drivers/mtd/spi-nor/macronix.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/mtd/spi-nor/macronix.c +0 -0
index ea6be95e75a5..f5fbdb7912e0 100644

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

Quoted 5 lines
drivers/mtd/spi-nor/macronix.c +2 -0
@@ -182,6 +182,12 @@ static const struct flash_info macronix_nor_parts[] = {
 		.name = "mx25l3255e",
 		.size = SZ_4M,
 		.no_sfdp_flags = SECT_4K,
+	}, {
+                .id = SNOR_ID(0xc2, 0x80, 0x3a),

Wrong indentation?. Please use checkpatch.pl.

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

Quoted 1 line
drivers/mtd/spi-nor/macronix.c +1 -0
+                .name = "mx25um51245g",

drop the name.

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

Quoted 1 line
drivers/mtd/spi-nor/macronix.c +1 -0
+                .size = SZ_64M,

This is also autodetected. Drop it.

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

Quoted 1 line
drivers/mtd/spi-nor/macronix.c +1 -0
+                .no_sfdp_flags = SECT_4K,

No "no_sfdp_flags" for SFDP capable flashes. Drop it.

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

Quoted 1 line
drivers/mtd/spi-nor/macronix.c +1 -0
+                .fixup_flags = SPI_NOR_4B_OPCODES,

Doesn't the flash have proper a 4BAIT table?

-michael