RE: [PATCH V4] mtd: spi-nor: winbond: Add support for winbond chip

From: Sajida Bhanu (Temp) (QUIC)
Date: Mon Jan 24 2022 - 02:31:08 EST


Hi,

Thanks for the review.

Please find the inline comments.

Thanks,
Sajida

-----Original Message-----
From: Pratyush Yadav <p.yadav@xxxxxx>
Sent: Thursday, January 20, 2022 3:42 PM
To: Sajida Bhanu (Temp) (QUIC) <quic_c_sbhanu@xxxxxxxxxxx>
Cc: dianders@xxxxxxxxxxxx; tudor.ambarus@xxxxxxxxxxxxx; michael@xxxxxxxx; miquel.raynal@xxxxxxxxxxx; richard@xxxxxx; vigneshr@xxxxxx; linux-mtd@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; stummala@xxxxxxxxxxxxxx; vbadigan@xxxxxxxxxxxxxx; Ram Prakash Gupta (QUIC) <quic_rampraka@xxxxxxxxxxx>; Pradeep Pragallapati (QUIC) <quic_pragalla@xxxxxxxxxxx>; sartgarg@xxxxxxxxxxxxxx
Subject: Re: [PATCH V4] mtd: spi-nor: winbond: Add support for winbond chip

Hi,

On 20/01/22 03:24PM, Shaik Sajida Bhanu wrote:
> Add support for winbond W25Q512NW-IM chip.
>
> Signed-off-by: Shaik Sajida Bhanu <quic_c_sbhanu@xxxxxxxxxxx>
> Reviewed-by: Doug Anderson <dianders@xxxxxxxxxxxx>
> ---
>
> Changes since V1:
> - Added space before name of the flash part as suggested by Doug.
>
> Changes since V2:
> - Updated chip name as w25q512nwm as suggested by Doug.
>
> Changes since V3:
> - Updated flash_info flags passing according to below patch
> https://lore.kernel.org/all/20211207140254.87681-7-tudor.ambarus@xxxxxxxxxxxxx/
> As suggested by Tudor Ambarus.
> ---
> drivers/mtd/spi-nor/winbond.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mtd/spi-nor/winbond.c
> b/drivers/mtd/spi-nor/winbond.c index 675f32c..c4be225 100644
> --- a/drivers/mtd/spi-nor/winbond.c
> +++ b/drivers/mtd/spi-nor/winbond.c
> @@ -124,6 +124,10 @@ static const struct flash_info winbond_parts[] = {
> { "w25m512jv", INFO(0xef7119, 0, 64 * 1024, 1024)
> NO_SFDP_FLAGS(SECT_4K | SPI_NOR_QUAD_READ |
> SPI_NOR_DUAL_READ) },
> + { "w25q512nwm", INFO(0xef8020, 0, 64 * 1024, 1024)
> + FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
> + NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
> + SPI_NOR_QUAD_READ) },

This way is for "legacy" flash code and is not recommended anymore. Does the flash support SFDP? In that case just add PARSE_SFDP and let the SFDP parser discover these capabilities. You can keep the "FLAGS" part since those are not discoverable via SFDP.

>>>>>>>Yes this flash supports SFDP, sure will pass PARSE_SFDP.

> { "w25q512jvq", INFO(0xef4020, 0, 64 * 1024, 1024)
> NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
> SPI_NOR_QUAD_READ) },
> --
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a
> member of Code Aurora Forum, hosted by The Linux Foundation
>

--
Regards,
Pratyush Yadav
Texas Instruments Inc.