Skip to contentSkip to conversation

drivers/spi-nor: add support for Winbond w25q01jv

PATCH In review Heyi Guo 2 participants 4 messages Jan 28, 2023 – Jan 31, 2023

Subsystems (2)
lore
Share & tools
lore

Heyi Guo

author
#0 lore raw

PATCH 1/1 drivers/spi-nor: add support for Winbond w25q01jv

Winbond W25Q01JV is a 128MB SPI-NOR flash chip.

--
Cc: Tudor Ambarus <[email protected]>
Cc: Pratyush Yadav <[email protected]>
Cc: Michael Walle <[email protected]>
Cc: Miquel Raynal <[email protected]>
Cc: Richard Weinberger <[email protected]>
Cc: Vignesh Raghavendra <[email protected]>
Cc: [email protected]

---
 drivers/mtd/spi-nor/winbond.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/mtd/spi-nor/winbond.c +3 -0
index ca39acf4112c8..0cd49f534bf8d 100644
@@ -142,6 +142,9 @@ static const struct flash_info winbond_nor_parts[] = {
 	{ "w25q512jvq", INFO(0xef4020, 0, 64 * 1024, 1024)
 		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
 			      SPI_NOR_QUAD_READ) },
+	{ "w25q01jv", INFO(0xef4021, 0, 64 * 1024, 2048)
+		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
+			      SPI_NOR_QUAD_READ) },
 };
 
 /**
Signature · 1 line
2.17.1
#1 lore raw

Hi,

Quoted 21 lines

Winbond W25Q01JV is a 128MB SPI-NOR flash chip.

--
Cc: Tudor Ambarus <[email protected]>
Cc: Pratyush Yadav <[email protected]>
Cc: Michael Walle <[email protected]>
Cc: Miquel Raynal <[email protected]>
Cc: Richard Weinberger <[email protected]>
Cc: Vignesh Raghavendra <[email protected]>
Cc: [email protected]

---
 drivers/mtd/spi-nor/winbond.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/mtd/spi-nor/winbond.c +0 -0
index ca39acf4112c8..0cd49f534bf8d 100644

drivers/mtd/spi-nor/winbond.c static const struct flash_info winbond_nor_parts[] · line 148

Quoted 7 lines
drivers/mtd/spi-nor/winbond.c +3 -0
@@ -142,6 +142,9 @@ static const struct flash_info winbond_nor_parts[] 
 = {
 	{ "w25q512jvq", INFO(0xef4020, 0, 64 * 1024, 1024)
 		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
 			      SPI_NOR_QUAD_READ) },
+	{ "w25q01jv", INFO(0xef4021, 0, 64 * 1024, 2048)
+		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
+			      SPI_NOR_QUAD_READ) },

I'd guess this flash has SFDP support, correct? In this case, could you please try the latest next (or -rc) kernel without this change? In the meantime we have a generic spi-nor driver [1] so you don't need a new entry in most cases.

Apart from that, it would be nice if you could dump the SFDP tables, see [2].

-michael

[1] https://elixir.bootlin.com/linux/v6.2-rc5/source/drivers/mtd/spi-nor/core.c#L1638
[2] https://lore.kernel.org/r/[email protected]/

author
#2 lore raw
Quoted 18 lines · Michael Walle

Hi,

Quoted 16 lines

Winbond W25Q01JV is a 128MB SPI-NOR flash chip.

Signature · 10 lines
Cc: Tudor Ambarus <[email protected]>
Cc: Pratyush Yadav <[email protected]>
Cc: Michael Walle <[email protected]>
Cc: Miquel Raynal <[email protected]>
Cc: Richard Weinberger <[email protected]>
Cc: Vignesh Raghavendra <[email protected]>
Cc: [email protected]
---
 drivers/mtd/spi-nor/winbond.c | 3 +++
 1 file changed, 3 insertions(+)
Quoted 14 lines
Quoted 7 lines
drivers/mtd/spi-nor/winbond.c +0 -0
index ca39acf4112c8..0cd49f534bf8d 100644
@@ -142,6 +142,9 @@ static const struct flash_info 
 winbond_nor_parts[] = {
      { "w25q512jvq", INFO(0xef4020, 0, 64 * 1024, 1024)
Quoted 5 lines

         NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
+    { "w25q01jv", INFO(0xef4021, 0, 64 * 1024, 2048) +        NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | +                  SPI_NOR_QUAD_READ) },

I'd guess this flash has SFDP support, correct?

Yes, the spec says it supports SFDP :)

Quoted 3 lines

In this case,
could you please try the latest next (or -rc) kernel without this change?

Is v6.2-rc3 OK for the test? If so, surely I can do that.

Thanks for your comments :)

Heyi

Quoted 10 lines

In the meantime we have a generic spi-nor driver [1] so you don't need a new entry in most cases.

Apart from that, it would be nice if you could dump the SFDP tables, see [2].

-michael

[1] https://elixir.bootlin.com/linux/v6.2-rc5/source/drivers/mtd/spi-nor/core.c#L1638
[2] https://lore.kernel.org/r/[email protected]/

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

#3 lore raw

Hi,

Quoted 1 line

Is v6.2-rc3 OK for the test? If so, surely I can do that.

Yes, that should already contain the generic driver.

-michael