Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: spi-nor: winbond: add w25q01jv flash chip
@ 2024-12-16 11:26 Wilken Gottwalt
  2024-12-16 13:03 ` Pratyush Yadav
  2024-12-16 13:22 ` David Malcolm
  0 siblings, 2 replies; 5+ messages in thread
From: Wilken Gottwalt @ 2024-12-16 11:26 UTC (permalink / raw)
  To: gcc-patches
  Cc: linux-mtd, Tudor Ambarus, Pratyush Yadav, Michael Walle,
	Miquel Raynal, Richard Weinberger, Vignesh Raghavendra

Add Winbond W25Q01JV 128 MiB SPI NOR flash chip, verified working on the
Zynq-7000 platform QSPI controller. The flash chip has quite high read
speeds (about 60+ MiB/s), but erasing is very slow. The slow erasing is
by design.

Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
---
 drivers/mtd/spi-nor/winbond.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c
index 8d0a00d69e12..e2caf299d19a 100644
--- a/drivers/mtd/spi-nor/winbond.c
+++ b/drivers/mtd/spi-nor/winbond.c
@@ -146,6 +146,12 @@ static const struct flash_info winbond_nor_parts[] = {
 		.name = "w25q512jvq",
 		.size = SZ_64M,
 		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
+	}, {
+		.id = SNOR_ID(0xef, 0x40, 0x21),
+		.name = "w25q01jv",
+		.size = SZ_128M,
+		.flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
+		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
 	}, {
 		.id = SNOR_ID(0xef, 0x50, 0x12),
 		.name = "w25q20bw",
-- 
2.47.1


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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] mtd: spi-nor: winbond: add w25q01jv flash chip
  2024-12-16 11:26 [PATCH] mtd: spi-nor: winbond: add w25q01jv flash chip Wilken Gottwalt
@ 2024-12-16 13:03 ` Pratyush Yadav
  2024-12-16 16:28   ` Wilken Gottwalt
  2024-12-16 13:22 ` David Malcolm
  1 sibling, 1 reply; 5+ messages in thread
From: Pratyush Yadav @ 2024-12-16 13:03 UTC (permalink / raw)
  To: Wilken Gottwalt
  Cc: gcc-patches, linux-mtd, Tudor Ambarus, Pratyush Yadav,
	Michael Walle, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra

Hi Wilken,

On Mon, Dec 16 2024, Wilken Gottwalt wrote:

> Add Winbond W25Q01JV 128 MiB SPI NOR flash chip, verified working on the
> Zynq-7000 platform QSPI controller. The flash chip has quite high read
> speeds (about 60+ MiB/s), but erasing is very slow. The slow erasing is
> by design.

Does the flash have support SFDP? If so, you likely don't need specify
the no_sfdp_flags, name, or size. Try the entry only with ID and flags,
and see if the flash continues to work fine for you.

Also see [0] for additional testing requirements.

[0] https://docs.kernel.org/driver-api/mtd/spi-nor.html

>
> Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
> ---
>  drivers/mtd/spi-nor/winbond.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c
> index 8d0a00d69e12..e2caf299d19a 100644
> --- a/drivers/mtd/spi-nor/winbond.c
> +++ b/drivers/mtd/spi-nor/winbond.c
> @@ -146,6 +146,12 @@ static const struct flash_info winbond_nor_parts[] = {
>  		.name = "w25q512jvq",
>  		.size = SZ_64M,
>  		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
> +	}, {
> +		.id = SNOR_ID(0xef, 0x40, 0x21),
> +		.name = "w25q01jv",
> +		.size = SZ_128M,
> +		.flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
> +		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
>  	}, {
>  		.id = SNOR_ID(0xef, 0x50, 0x12),
>  		.name = "w25q20bw",

-- 
Regards,
Pratyush Yadav

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mtd: spi-nor: winbond: add w25q01jv flash chip
  2024-12-16 11:26 [PATCH] mtd: spi-nor: winbond: add w25q01jv flash chip Wilken Gottwalt
  2024-12-16 13:03 ` Pratyush Yadav
@ 2024-12-16 13:22 ` David Malcolm
  2024-12-16 16:24   ` Wilken Gottwalt
  1 sibling, 1 reply; 5+ messages in thread
From: David Malcolm @ 2024-12-16 13:22 UTC (permalink / raw)
  To: Wilken Gottwalt, gcc-patches
  Cc: linux-mtd, Tudor Ambarus, Pratyush Yadav, Michael Walle,
	Miquel Raynal, Richard Weinberger, Vignesh Raghavendra

On Mon, 2024-12-16 at 11:26 +0000, Wilken Gottwalt wrote:
> Add Winbond W25Q01JV 128 MiB SPI NOR flash chip, verified working on
> the
> Zynq-7000 platform QSPI controller. The flash chip has quite high
> read
> speeds (about 60+ MiB/s), but erasing is very slow. The slow erasing
> is
> by design.
> 
> Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
> ---
>  drivers/mtd/spi-nor/winbond.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
Did you mean to send this to gcc-patches@gcc.gnu.org?  This appears to
be a patch for the kernel.

Dave


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mtd: spi-nor: winbond: add w25q01jv flash chip
  2024-12-16 13:22 ` David Malcolm
@ 2024-12-16 16:24   ` Wilken Gottwalt
  0 siblings, 0 replies; 5+ messages in thread
From: Wilken Gottwalt @ 2024-12-16 16:24 UTC (permalink / raw)
  To: David Malcolm
  Cc: gcc-patches, linux-mtd, Tudor Ambarus, Pratyush Yadav,
	Michael Walle, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra

On Mon, 16 Dec 2024 08:22:45 -0500
David Malcolm <dmalcolm@redhat.com> wrote:

> On Mon, 2024-12-16 at 11:26 +0000, Wilken Gottwalt wrote:
> > Add Winbond W25Q01JV 128 MiB SPI NOR flash chip, verified working on
> > the
> > Zynq-7000 platform QSPI controller. The flash chip has quite high
> > read
> > speeds (about 60+ MiB/s), but erasing is very slow. The slow erasing
> > is
> > by design.
> > 
> > Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
> > ---
> >  drivers/mtd/spi-nor/winbond.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> Did you mean to send this to gcc-patches@gcc.gnu.org?  This appears to
> be a patch for the kernel.

Ah well, this is a good example why you should not stick to copy&paste while
being ill. My fault.

greetings,
Wilken

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mtd: spi-nor: winbond: add w25q01jv flash chip
  2024-12-16 13:03 ` Pratyush Yadav
@ 2024-12-16 16:28   ` Wilken Gottwalt
  0 siblings, 0 replies; 5+ messages in thread
From: Wilken Gottwalt @ 2024-12-16 16:28 UTC (permalink / raw)
  To: Pratyush Yadav
  Cc: linux-mtd, Tudor Ambarus, Michael Walle, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra

On Mon, 16 Dec 2024 13:03:53 +0000
Pratyush Yadav <pratyush@kernel.org> wrote:

> Hi Wilken,
> 
> On Mon, Dec 16 2024, Wilken Gottwalt wrote:
> 
> > Add Winbond W25Q01JV 128 MiB SPI NOR flash chip, verified working on the
> > Zynq-7000 platform QSPI controller. The flash chip has quite high read
> > speeds (about 60+ MiB/s), but erasing is very slow. The slow erasing is
> > by design.
> 
> Does the flash have support SFDP? If so, you likely don't need specify
> the no_sfdp_flags, name, or size. Try the entry only with ID and flags,
> and see if the flash continues to work fine for you.
> 
> Also see [0] for additional testing requirements.
> 
> [0] https://docs.kernel.org/driver-api/mtd/spi-nor.html

We use this flash in that way in production systems for a while now. But yeah,
you are right. I will do the checks, but it may take a while. Currently I'm at
vaccation and have no access to this machine until January.

> >
> > Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
> > ---
> >  drivers/mtd/spi-nor/winbond.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c
> > index 8d0a00d69e12..e2caf299d19a 100644
> > --- a/drivers/mtd/spi-nor/winbond.c
> > +++ b/drivers/mtd/spi-nor/winbond.c
> > @@ -146,6 +146,12 @@ static const struct flash_info winbond_nor_parts[] = {
> >  		.name = "w25q512jvq",
> >  		.size = SZ_64M,
> >  		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
> > +	}, {
> > +		.id = SNOR_ID(0xef, 0x40, 0x21),
> > +		.name = "w25q01jv",
> > +		.size = SZ_128M,
> > +		.flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
> > +		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
> >  	}, {
> >  		.id = SNOR_ID(0xef, 0x50, 0x12),
> >  		.name = "w25q20bw",
> 


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-12-16 16:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-16 11:26 [PATCH] mtd: spi-nor: winbond: add w25q01jv flash chip Wilken Gottwalt
2024-12-16 13:03 ` Pratyush Yadav
2024-12-16 16:28   ` Wilken Gottwalt
2024-12-16 13:22 ` David Malcolm
2024-12-16 16:24   ` Wilken Gottwalt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox