Skip to contentSkip to conversation

mtd: spi-nor: Add Winbond w25q16jv support

PATCH Superseded Robert Marko 2 participants 4 messages Feb 14, 2019 – Jun 13, 2019

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: spi-nor: Add Winbond w25q16jv support

Datasheet: https://www.winbond.com/resource-files/w25q16jv%20spi%20revg%2003222018%20plus.pdf

Testing done on Mikrotik Routerboard RB450Gx4 board under 4.19.19 kernel.

Test board does not support Dual or Quad modes.

---
 drivers/mtd/spi-nor/spi-nor.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/mtd/spi-nor/spi-nor.c +5 -0
index 6e13bbd1aaa5..0e958f48db1b 100644
@@ -1975,6 +1975,11 @@ static const struct flash_info spi_nor_ids[] = {
 			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
 			SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
 	},
+	{
+		"w25q16jv", INFO(0xef7015, 0, 64 * 1024,  32,
+			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
+			SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
+	},
 	{ "w25x32", INFO(0xef3016, 0, 64 * 1024,  64, SECT_4K) },
 	{ "w25q20cl", INFO(0xef4012, 0, 64 * 1024,  4, SECT_4K) },
 	{ "w25q20bw", INFO(0xef5012, 0, 64 * 1024,  4, SECT_4K) },
Signature · 1 line
2.20.1
#1 lore raw

Hi, Robert,

Quoted 3 lines · Robert Marko

Datasheet: https://www.winbond.com/resource-files/w25q16jv%20spi%20revg%2003222018%20plus.pdf

Testing done on Mikrotik Routerboard RB450Gx4 board under 4.19.19 kernel.

It is preferable to do the test on spi-nor/next

Quoted 13 lines

Test board does not support Dual or Quad modes.

---
 drivers/mtd/spi-nor/spi-nor.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/mtd/spi-nor/spi-nor.c +0 -0
index 6e13bbd1aaa5..0e958f48db1b 100644

drivers/mtd/spi-nor/spi-nor.c static const struct flash_info spi_nor_ids[] = { · line 1981

Quoted 7 lines
drivers/mtd/spi-nor/spi-nor.c +4 -0
@@ -1975,6 +1975,11 @@ static const struct flash_info spi_nor_ids[] = {
 			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
 			SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
 	},
+	{
+		"w25q16jv", INFO(0xef7015, 0, 64 * 1024,  32,
+			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
+			SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)

You'll need a way to differentiate between W25Q16JV-IQ/JQ and W25Q16JV-IM/JM.

And I would prefer to have the new entries ordered alphabetically as much as possible. This one should fit just before w25q20cl. Manufacturers are naming flashes based on a product identification system. The flashes are presented in alphabetical order, we should do the same.

Cheers,
ta

#2 lore raw

On Wed, 20 Feb 2019 at 21:29, <[email protected]> wrote:>>
Hi, Robert,>> On 02/14/2019 10:57 PM, Robert Marko wrote:> >
Datasheet: https://www.winbond.com/resource-files/w25q16jv%20spi%20revg%2003222018%20plus.pdf>

Quoted 1 line
Quoted 1 line
Quoted 1 line

Testing done on Mikrotik Routerboard RB450Gx4 board under 4.19.19

kernel.>> It is preferable to do the test on spi-nor/nextUnfortunately I cant do that as OpenWrt has a considerable amount of patches that would need to be ported and we are only moving from LTS to LTS version and we are currently on 4.19.

Quoted 8 lines
Quoted 8 lines

Test board does not support Dual or Quad modes.

---
 drivers/mtd/spi-nor/spi-nor.c | 5 +++++
 1 file changed, 5 insertions(+)
Quoted 14 lines

drivers/mtd/spi-nor/spi-nor.c static const struct flash_info spi_nor_ids[] = { · line 1981

Quoted 12 lines
drivers/mtd/spi-nor/spi-nor.c +4 -0
index 6e13bbd1aaa5..0e958f48db1b 100644
@@ -1975,6 +1975,11 @@ static const struct flash_info spi_nor_ids[] = {
                      SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
                      SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
      },
+     {
+             "w25q16jv", INFO(0xef7015, 0, 64 * 1024,  32,
+                     SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
+                     SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)

You'll need a way to differentiate between W25Q16JV-IQ/JQ and W25Q16JV-IM/JM.

Hm, from what I understood JV is the series and suffix only indictes the package.
They should all have the same JEDEC ID and features.

Quoted 5 lines

And I would prefer to have the new entries ordered alphabetically as much as possible. This one should fit just before w25q20cl. Manufacturers are naming flashes based on a product identification system. The flashes are presented in alphabetical order, we should do the same.

I agree, will reorder and send a v2.

Quoted 3 lines

Cheers,
ta

#3 lore raw

Hi, Robert,

Quoted 30 lines · Robert Marko

On Wed, 20 Feb 2019 at 21:29, <[email protected]> wrote:>>
Hi, Robert,>> On 02/14/2019 10:57 PM, Robert Marko wrote:> >
Datasheet: https://www.winbond.com/resource-files/w25q16jv%20spi%20revg%2003222018%20plus.pdf>

Quoted 1 line
Quoted 1 line
Quoted 1 line

Testing done on Mikrotik Routerboard RB450Gx4 board under 4.19.19

kernel.>> It is preferable to do the test on spi-nor/nextUnfortunately I cant do that as OpenWrt has a considerable amount of patches that would need to be ported and we are only moving from LTS to LTS version and we are currently on 4.19.

Quoted 8 lines
Quoted 8 lines

Test board does not support Dual or Quad modes.

---
 drivers/mtd/spi-nor/spi-nor.c | 5 +++++
 1 file changed, 5 insertions(+)
Quoted 14 lines

drivers/mtd/spi-nor/spi-nor.c static const struct flash_info spi_nor_ids[] = { · line 1981

Quoted 12 lines
drivers/mtd/spi-nor/spi-nor.c +4 -0
index 6e13bbd1aaa5..0e958f48db1b 100644
@@ -1975,6 +1975,11 @@ static const struct flash_info spi_nor_ids[] = {
                      SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
                      SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
      },
+     {
+             "w25q16jv", INFO(0xef7015, 0, 64 * 1024,  32,
+                     SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
+                     SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)

You'll need a way to differentiate between W25Q16JV-IQ/JQ and W25Q16JV-IM/JM.

Quoted 4 lines

Hm, from what I understood JV is the series and suffix only indictes the package.
They should all have the same JEDEC ID and features.

Quoted 1 line

W25Q16JV-IQ/JQ and W25Q16JV-IM/JM have different jedec ids, see table "9.1.1 Manufacturer and Device Identification" from the datasheet that you indicated in the commit message.

Looking at "12. ORDERING INFORMATION", I see that:
- Q version has QE = 1 (fixed) and it's backward compatible to FV family
- M version has QE = 0 (programmable) and has a new device ID
The same is described in "8. QUAD ENABLE (QE) – Volatile/Non-Volatile Writable".

I would suggest to name the flash "w25q16jv-im/jm".

What do you think?
ta
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/