lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DBIMSXRWMT9X.1030Q3NLFE83Y@kernel.org>
Date: Tue, 22 Jul 2025 15:51:44 +0200
From: "Michael Walle" <mwalle@...nel.org>
To: "Tudor Ambarus" <tudor.ambarus@...aro.org>, "Marek Vasut"
 <marek.vasut+renesas@...lbox.org>
Cc: <linux-mtd@...ts.infradead.org>, "Miquel Raynal"
 <miquel.raynal@...tlin.com>, "Pratyush Yadav" <pratyush@...nel.org>,
 "Richard Weinberger" <richard@....at>, "Vignesh Raghavendra"
 <vigneshr@...com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] mtd: spi-nor: winbond: Add support for W77Q51NW

On Tue Jul 22, 2025 at 11:37 AM CEST, Tudor Ambarus wrote:
>
>
> On 7/22/25 9:43 AM, Michael Walle wrote:
> > Hi Marek,
> > 
> >> --- a/drivers/mtd/spi-nor/winbond.c
> >> +++ b/drivers/mtd/spi-nor/winbond.c
> >> @@ -343,6 +343,10 @@ static const struct flash_info winbond_nor_parts[] = {
> >>          .id = SNOR_ID(0xef, 0x80, 0x20),
> >>          .name = "w25q512nwm",
> >>          .otp = SNOR_OTP(256, 3, 0x1000, 0x1000),
> >> +    }, {
> >> +        /* W77Q51NW */
> >> +        .id = SNOR_ID(0xef, 0x8a, 0x1a),
> >> +        .otp = SNOR_OTP(256, 3, 0x1000, 0x1000),
> > 
> > Did you also test the OTP read and write? I'd guess so, because otherwise
>
> Any of you interested in adding testing requirements and examples for otp?

Let's add this to my pile of "things to do when I'm having time
again" :)

>
> > you wouldn't need that entry at all, right? Or is it because of the
> > winbond_nor_late_init() which will be called as a manufacturer fixup?
>
> M,
>
> the overwrite of set_4byte_addr_mode in winbond_nor_late_init() seems a
> little trashy, we assume that winbond will always use
> spi_nor_set_4byte_addr_mode_en4b_ex4b(), apart of the extra ops that we're
> doing there. Aren't we better without this generalization?

Not sure where that comes from originally. But we are overwriting
what SFDP is figuring out, correct? Maybe we should do the same as
in macronix.c; just set it when it is not set. If the SFDP doesn't
specify the method, I'd say it is a fair assumption that any (older)
winbond flash use that stateful method to enter 4 byte addressing
mode. Newer flashes probably features SFDP.

For the extra ops.. I'm not sure if that is/was just a quirk for
that particular flash or if any winbond flash has that problem.

-michael

>
> > In that case we could do the same as in commit afe1ea1344bb ("mtd: spi-nor:
> > add support for Macronix Octal flash").
> > 
> > -michael


Download attachment "signature.asc" of type "application/pgp-signature" (298 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ