linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Walle" <mwalle@kernel.org>
To: "Tudor Ambarus" <tudor.ambarus@linaro.org>,
	"Marek Vasut" <marek.vasut+renesas@mailbox.org>
Cc: <linux-mtd@lists.infradead.org>,
	"Miquel Raynal" <miquel.raynal@bootlin.com>,
	"Pratyush Yadav" <pratyush@kernel.org>,
	"Richard Weinberger" <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] mtd: spi-nor: winbond: Add support for W77Q51NW
Date: Tue, 22 Jul 2025 15:51:44 +0200	[thread overview]
Message-ID: <DBIMSXRWMT9X.1030Q3NLFE83Y@kernel.org> (raw)
In-Reply-To: <c13f39b5-020d-4553-a79f-e22a0cbd1dfa@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 2002 bytes --]

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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]

  reply	other threads:[~2025-07-22 13:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-21 20:22 [PATCH v2] mtd: spi-nor: winbond: Add support for W77Q51NW Marek Vasut
2025-07-22  8:25 ` Tudor Ambarus
2025-07-22  8:43 ` Michael Walle
2025-07-22  9:37   ` Tudor Ambarus
2025-07-22 13:51     ` Michael Walle [this message]
2025-07-22 14:28   ` Marek Vasut
2025-07-23  6:36     ` Michael Walle
2025-07-27 20:26       ` Marek Vasut
2025-07-28  6:32         ` Michael Walle
2025-07-29  3:51           ` Marek Vasut
2025-07-29  8:48             ` Michael Walle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DBIMSXRWMT9X.1030Q3NLFE83Y@kernel.org \
    --to=mwalle@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --cc=tudor.ambarus@linaro.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).