Re: [PATCH v2] mtd: spi-nor: Correct flags for Winbond w25q128

From: Linus Walleij
Date: Tue Jul 18 2023 - 07:58:18 EST


On Tue, Jul 18, 2023 at 11:47 AM Tudor Ambarus <tudor.ambarus@xxxxxxxxxx> wrote:

> Hi, Linus,
>
> On 7/18/23 09:32, Michael Walle wrote:
> > FWIW, I'm fine with the removed no_sfdp_flags if INFO(, 0, 0, 0).
>
> We'll need a v5 where you test again the flash with mtd_utils,
> as we want to get rid of n_sectors and sectors_size and instead
> determine them from SFDP. We agreed that the flash entry should
> be defined with the following params:
>
> { "w25q128", INFO(0xef4018, 0, 0, 0)
> PARSE_SFDP
> FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
> },

Roger that!

I sent a v5 which does this, tested by taking the reported
size in dmesg and divide by reported (correct) eraseblock size and
it results in the same number of sectors as well.

I put the details into the commit message.

Yours,
Linus Walleij