Skip to contentSkip to conversation

mtd: spi-nor: macronix: mx25l51245g, mx66l51235l and mx66l51235f

PATCH Applied Tudor Ambarus 3 participants 7 messages Apr 2, 2021 – Jun 11, 2021

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

cover mtd: spi-nor: macronix: mx25l51245g, mx66l51235l and mx66l51235f

mx25l51245g and mx66l51235l have the same flash ID. The flash detection returns the first entry in the flash_info array that matches the flash ID that was read, thus for the 0xc2201a ID, mx25l51245g was always hit, introducing a regression for mx66l51235l. Revert mx25l51245g addition. A solution for these flashes to coexist was proposed.

According to macronix website, there is no mx66l51235l part number. Rename the part to mx66l51235f.

The difference betwenn mx25l51245g and mx66l51235f flash_info entries was that mx25l51245g also set SECT_4K. Both flashes support 4K erases, but the 4K erase should be discovered when parsing BFPT, so there's no need to set the explicit SECT_4K flag.

Tudor Ambarus (2):
Revert "mtd: spi-nor: macronix: Add support for mx25l51245g"
mtd: spi-nor: macronix: Fix name for mx66l51235f

 drivers/mtd/spi-nor/macronix.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/2 Revert "mtd: spi-nor: macronix: Add support for mx25l51245g"

This reverts commit 04b8edad262eec0d153005973dfbdd83423c0dcb.

mx25l51245g and mx66l51235l have the same flash ID. The flash detection returns the first entry in the flash_info array that matches the flash ID that was read, thus for the 0xc2201a ID, mx25l51245g was always hit, introducing a regression for mx66l51235l.

If one wants to differentiate the flash names, a better fix would be to differentiate between the two at run-time, depending on SFDP, and choose the correct name from a list of flash names, depending on the SFDP differentiator.

Fixes 04b8edad262e ("mtd: spi-nor: macronix: Add support for mx25l51245g")
---
 drivers/mtd/spi-nor/macronix.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/mtd/spi-nor/macronix.c +0 -3
index 6c2680b4cdad..42c2cf31702e 100644
@@ -72,9 +72,6 @@ static const struct flash_info macronix_parts[] = {
 			      SECT_4K | SPI_NOR_DUAL_READ |
 			      SPI_NOR_QUAD_READ) },
 	{ "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) },
-	{ "mx25l51245g", INFO(0xc2201a, 0, 64 * 1024, 1024,
-			      SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
-			      SPI_NOR_4B_OPCODES) },
 	{ "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024,
 			      SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
 			      SPI_NOR_4B_OPCODES) },
Signature · 1 line
2.25.1
Acked-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] Revert "mtd: spi-nor: macronix: Add support for mx25l51245g"

Quoted 8 lines · Tudor Ambarus

This reverts commit 04b8edad262eec0d153005973dfbdd83423c0dcb.

mx25l51245g and mx66l51235l have the same flash ID. The flash detection returns the first entry in the flash_info array that matches the flash ID that was read, thus for the 0xc2201a ID, mx25l51245g was always hit, introducing a regression for mx66l51235l.

Quoted 8 lines

If one wants to differentiate the flash names, a better fix would be to differentiate between the two at run-time, depending on SFDP, and choose the correct name from a list of flash names, depending on the SFDP differentiator.

Fixes 04b8edad262e ("mtd: spi-nor: macronix: Add support for mx25l51245g")
Quoted 21 lines
---
 drivers/mtd/spi-nor/macronix.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/mtd/spi-nor/macronix.c +0 -3
index 6c2680b4cdad..42c2cf31702e 100644
@@ -72,9 +72,6 @@ static const struct flash_info macronix_parts[] = {
 			      SECT_4K | SPI_NOR_DUAL_READ |
 			      SPI_NOR_QUAD_READ) },
 	{ "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) },
-	{ "mx25l51245g", INFO(0xc2201a, 0, 64 * 1024, 1024,
-			      SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
-			      SPI_NOR_4B_OPCODES) },
 	{ "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024,
 			      SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
 			      SPI_NOR_4B_OPCODES) },
Signature · 1 line
2.25.1
Signature · 3 lines
Regards,
Pratyush Yadav
Texas Instruments Inc.
#3 lore raw

PATCH 2/2 mtd: spi-nor: macronix: Fix name for mx66l51235f

In reply to Tudor Ambarus

According to macronix website, there is no mx66l51235l part number. The chip detected as such is actually mx66l51235f. Rename the flash. Do not update the mx66l51235l name from the spi_nor_dev_ids[], since there are dt that are using this compatible.

---
 drivers/mtd/spi-nor/macronix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/spi-nor/macronix.c +1 -1
index 42c2cf31702e..c8167de55e55 100644
@@ -72,7 +72,7 @@ static const struct flash_info macronix_parts[] = {
 			      SECT_4K | SPI_NOR_DUAL_READ |
 			      SPI_NOR_QUAD_READ) },
 	{ "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) },
-	{ "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024,
+	{ "mx66l51235f", INFO(0xc2201a, 0, 64 * 1024, 1024,
 			      SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
 			      SPI_NOR_4B_OPCODES) },
 	{ "mx66u51235f", INFO(0xc2253a, 0, 64 * 1024, 1024,
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] mtd: spi-nor: macronix: Fix name for mx66l51235f

Quoted 7 lines · Tudor Ambarus

According to macronix website, there is no mx66l51235l part number. The chip detected as such is actually mx66l51235f. Rename the flash. Do not update the mx66l51235l name from the spi_nor_dev_ids[], since there are dt that are using this compatible.

---

Quoted 17 lines
 drivers/mtd/spi-nor/macronix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/spi-nor/macronix.c +1 -1
index 42c2cf31702e..c8167de55e55 100644
@@ -72,7 +72,7 @@ static const struct flash_info macronix_parts[] = {
 			      SECT_4K | SPI_NOR_DUAL_READ |
 			      SPI_NOR_QUAD_READ) },
 	{ "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) },
-	{ "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024,
+	{ "mx66l51235f", INFO(0xc2201a, 0, 64 * 1024, 1024,
 			      SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
 			      SPI_NOR_4B_OPCODES) },
 	{ "mx66u51235f", INFO(0xc2253a, 0, 64 * 1024, 1024,
maintainer Applied
#5 lore raw

Re: [PATCH 2/2] mtd: spi-nor: macronix: Fix name for mx66l51235f

In reply to Tudor Ambarus
Quoted 16 lines · Tudor Ambarus

According to macronix website, there is no mx66l51235l part number. The chip detected as such is actually mx66l51235f. Rename the flash. Do not update the mx66l51235l name from the spi_nor_dev_ids[], since there are dt that are using this compatible.

---
 drivers/mtd/spi-nor/macronix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/spi-nor/macronix.c +0 -0
index 42c2cf31702e..c8167de55e55 100644

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

Quoted 8 lines
drivers/mtd/spi-nor/macronix.c +1 -1
@@ -72,7 +72,7 @@ static const struct flash_info macronix_parts[] = {
 			      SECT_4K | SPI_NOR_DUAL_READ |
 			      SPI_NOR_QUAD_READ) },
 	{ "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) },
-	{ "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024,
+	{ "mx66l51235f", INFO(0xc2201a, 0, 64 * 1024, 1024,
 			      SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
 			      SPI_NOR_4B_OPCODES) },
 	{ "mx66u51235f", INFO(0xc2253a, 0, 64 * 1024, 1024,

Applied to spi-nor/next, thanks!
[2/2] mtd: spi-nor: macronix: Fix name for mx66l51235f

      https://git.kernel.org/mtd/c/d406f49b05

--
Regards
Vignesh

author Applied
#6 lore raw

Re: (subset)[PATCH 0/2] mtd: spi-nor: macronix: mx25l51245g, mx66l51235l and mx66l51235f

In reply to Tudor Ambarus
Quoted 8 lines · Tudor Ambarus

mx25l51245g and mx66l51235l have the same flash ID. The flash detection returns the first entry in the flash_info array that matches the flash ID that was read, thus for the 0xc2201a ID, mx25l51245g was always hit, introducing a regression for mx66l51235l. Revert mx25l51245g addition. A solution for these flashes to coexist was proposed.

[...]

Applied to spi-nor/next, thanks!

[1/2] Revert "mtd: spi-nor: macronix: Add support for mx25l51245g"

      https://git.kernel.org/mtd/c/46094049a49b

Best regards,

Signature · 1 line
Tudor Ambarus <[email protected]>