From: <Tudor.Ambarus@microchip.com>
To: <michael@walle.cc>
Cc: richard@nod.at, miquel.raynal@bootlin.com,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
vigneshr@ti.com
Subject: Re: [PATCH] mtd: spi-nor: Add support for w25qNNjwim
Date: Sun, 19 Jan 2020 07:13:48 +0000 [thread overview]
Message-ID: <8021667.67K7kvUAe6@192.168.0.113> (raw)
In-Reply-To: <8ce5f803c9a59a1ebd55ae287fa2e6a9@walle.cc>
On Monday, January 13, 2020 3:15:15 PM EET Michael Walle wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
>
> Hi Tudor,
Hi, Michael,
>
> Am 2020-01-13 11:07, schrieb Michael Walle:
> >>> Btw. is renaming the flashes also considered a backwards incomaptible
> >>> change?
> >>
> >> No, we can fix the names.
> >>
> >>> And can there be two flashes with the same name? Because IMHO it
> >>> would
> >>> be
> >>
> >> I would prefer that we don't. Why would you have two different
> >> jedec-ids with
> >> the same name?
> >
> > Because as pointed out in the Winbond example you cannot distiguish
> > between
> > W25Q32DW and W25Q32JWIQ; and in the Macronix example between MX25L8005
> > and
> > MX25L8006E. Thus my reasoning was to show only the common part, ie
> > W25Q32
> > or MX25L80 which should be the same for this particular ID. Like I
> > said, I'd
> > prefer showing an ambiguous name instead of a wrong one. But then you
> > may
> > have different IDs with the same ambiguous name.
>
> Another solution would be to have the device tree provide a hint for the
> actual flash chip. There would be multiple entries in the spi_nor_ids
> with the
> same flash id. By default the first one is used (keeping the current
> behaviour). If there is for example
>
> compatible = "jedec,spi-nor", "w25q32jwq";
>
> the flash_info for the w25q32jwq will be chosen.
This won't work for plug-able flashes. You will influence the name in dt to be
chosen as w25q32jwq, and if you change w25q32jwq with w25q32dw you will end up
with a wrong name for w25q32dw, thus the same problem.
If the flashes are identical but differ just in terms of name, we can rename
the flash to "w25q32jwq (w25q32dw)". I haven't studied the differences between
these flashes; if you want to fix them, send a patch and I'll try to help.
Cheers,
ta
>
> I know this will conflict with the new rule that there should only be
>
> compatible = "jedec,spi-nor";
>
> without the actual flash chip. But it seems that it is not always
> possible
> to just use the jedec id to match the correct chip.
>
> Also see for example mx25l25635_post_bfpt_fixups() which tries to figure
> out different behaviour by looking at "some" SFDP data. In this case we
> might have been lucky, but I fear that this won't work in all cases and
> for older flashes it won't work at all.
>
> BTW I do not suggest to add the strings to the the spi_nor_dev_ids[].
>
> I guess that would be a less invasive way to fix different flashes with
> same jedec ids.
>
> -michael
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2020-01-19 7:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-03 22:34 [PATCH] mtd: spi-nor: Add support for w25qNNjwim Michael Walle
2020-01-11 14:19 ` Tudor.Ambarus
2020-01-11 23:16 ` Michael Walle
2020-01-13 9:06 ` Tudor.Ambarus
2020-01-13 10:07 ` Michael Walle
2020-01-13 13:15 ` Michael Walle
2020-01-19 7:13 ` Tudor.Ambarus [this message]
2020-01-19 22:24 ` Michael Walle
2020-01-20 11:03 ` Tudor.Ambarus
2020-01-20 15:55 ` Michael Walle
2020-01-21 18:40 ` Tudor.Ambarus
2020-01-21 23:28 ` Michael Walle
2020-01-22 6:48 ` Tudor.Ambarus
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=8021667.67K7kvUAe6@192.168.0.113 \
--to=tudor.ambarus@microchip.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=michael@walle.cc \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--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).