diff mbox series

mtd: spi-nor: winbond: Add support for w25q512jv

Message ID 20201111014556.6579-1-shuhao.mai.1990@gmail.com
State Changes Requested
Delegated to: Ambarus Tudor
Headers show
Series mtd: spi-nor: winbond: Add support for w25q512jv | expand

Commit Message

Shuhao Mai Nov. 11, 2020, 1:45 a.m. UTC
Add support for w25q512jv. This is of the same series chip with
w25q256jv, which is already supported, but with size doubled and
different JEDEC ID.

Signed-off-by: Shuhao Mai <shuhao.mai.1990@gmail.com>
---
 drivers/mtd/spi-nor/winbond.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Tudor Ambarus Jan. 4, 2021, 8:58 a.m. UTC | #1
Hi, Shuhao,

On 11/11/20 3:45 AM, Shuhao Mai wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Add support for w25q512jv. This is of the same series chip with
> w25q256jv, which is already supported, but with size doubled and
> different JEDEC ID.

Where and how was this tested? Please add this info in the commit
message.

> 
> Signed-off-by: Shuhao Mai <shuhao.mai.1990@gmail.com>
> ---
>  drivers/mtd/spi-nor/winbond.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c
> index e5dfa786f190..beaa6389e2dc 100644
> --- a/drivers/mtd/spi-nor/winbond.c
> +++ b/drivers/mtd/spi-nor/winbond.c
> @@ -97,6 +97,8 @@ static const struct flash_info winbond_parts[] = {
>                              SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
>         { "w25m512jv", INFO(0xef7119, 0, 64 * 1024, 1024,
>                             SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_DUAL_READ) },
> +       { "w25q512jv", INFO(0xef4020, 0, 64 * 1024, 1024,

We should name it "w25q512jvq" in order to differentiate it to the
"M" version: https://www.winbond.com/resource-files/W25Q512JV%20DTR%20RevD%2006292020%20133.pdf

The flash supports BP locking and we can enable it if you can test 
the locking with mtd-utils. Not mandatory though.

Cheers,
ta
> +                           SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_DUAL_READ) },
>  };
> 
>  /**
> --
> 2.20.1
>
Shuhao Mai Jan. 7, 2021, 11:35 a.m. UTC | #2
On Mon, Jan 04, 2021 at 08:58:26AM +0000, Tudor.Ambarus@microchip.com wrote:
> Hi, Shuhao,
> 
> On 11/11/20 3:45 AM, Shuhao Mai wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> > 
> > Add support for w25q512jv. This is of the same series chip with
> > w25q256jv, which is already supported, but with size doubled and
> > different JEDEC ID.
> 
> Where and how was this tested? Please add this info in the commit
> message.
>

Will add it in next version.

> > 
> > Signed-off-by: Shuhao Mai <shuhao.mai.1990@gmail.com>
> > ---
> >  drivers/mtd/spi-nor/winbond.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c
> > index e5dfa786f190..beaa6389e2dc 100644
> > --- a/drivers/mtd/spi-nor/winbond.c
> > +++ b/drivers/mtd/spi-nor/winbond.c
> > @@ -97,6 +97,8 @@ static const struct flash_info winbond_parts[] = {
> >                              SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
> >         { "w25m512jv", INFO(0xef7119, 0, 64 * 1024, 1024,
> >                             SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_DUAL_READ) },
> > +       { "w25q512jv", INFO(0xef4020, 0, 64 * 1024, 1024,
> 
> We should name it "w25q512jvq" in order to differentiate it to the
> "M" version: https://www.winbond.com/resource-files/W25Q512JV%20DTR%20RevD%2006292020%20133.pdf
> 
> The flash supports BP locking and we can enable it if you can test 
> the locking with mtd-utils. Not mandatory though.
> 
> Cheers,
> ta

I tried flash lock on my test enviorment, but it doesn't work. I think I'll
only update the flash name in next version, and submit a new patch when I
have answer to it.

Best,
Shuhao

> > +                           SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_DUAL_READ) },
> >  };
> > 
> >  /**
> > --
> > 2.20.1
> > 
>
diff mbox series

Patch

diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c
index e5dfa786f190..beaa6389e2dc 100644
--- a/drivers/mtd/spi-nor/winbond.c
+++ b/drivers/mtd/spi-nor/winbond.c
@@ -97,6 +97,8 @@  static const struct flash_info winbond_parts[] = {
 			     SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
 	{ "w25m512jv", INFO(0xef7119, 0, 64 * 1024, 1024,
 			    SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_DUAL_READ) },
+	{ "w25q512jv", INFO(0xef4020, 0, 64 * 1024, 1024,
+			    SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_DUAL_READ) },
 };
 
 /**