From: "Michael Walle" <mwalle@kernel.org>
To: "Rob Herring" <robh@kernel.org>,
"Takahiro Kuwano" <tkuw584924@gmail.com>
Cc: "Tudor Ambarus" <tudor.ambarus@linaro.org>,
"Pratyush Yadav" <pratyush@kernel.org>,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"Richard Weinberger" <richard@nod.at>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
<linux-mtd@lists.infradead.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
"Bacem Daassi" <Bacem.Daassi@infineon.com>,
"Takahiro Kuwano" <Takahiro.Kuwano@infineon.com>
Subject: Re: [PATCH 2/3] mtd: spi-nor: use rdid-dummy-ncycles DT property
Date: Thu, 20 Mar 2025 08:30:43 +0100 [thread overview]
Message-ID: <D8KX1NO755U3.2HC0O2OX5MJUL@kernel.org> (raw)
In-Reply-To: <20250319233024.GA2625856-robh@kernel.org>
On Thu Mar 20, 2025 at 12:30 AM CET, Rob Herring wrote:
> On Wed, Mar 19, 2025 at 06:47:44PM +0900, Takahiro Kuwano wrote:
> > There are infineon flashes [1] that require 8 dummy cycles for the
> > 1-1-1 Read ID command. Since the command is not covered by JESD216
> > or any other standard, get the number of dummy cycles from DT and use
> > them to correctly identify the flash.
>
> If Read ID fails, then couldn't you just retry with dummy cycles? Or
> would unconditionally adding dummy cycles adversely affect other chips?
Yes exactly. IIUC, the first byte of the auto discovery (RDID
command) would return random data, because the output driver of the
flash is disabled. The second byte would then return the
manufacturer id and third and fourth the device id. This makes auto
discovery fundamentally broken with this chip as the first byte
might randomly match any manufacturer within our database.
Takahiro, if you can reach designer of this chip, you might tell
them, that this was not the greatest idea :o
> Otherwise, add a specific compatible to imply this requirement. Adding
> quirk properties doesn't scale.
Since auto discovery doesn't work at all, you might just add,
"infineon,cyrs17b512" *instead of* "jedec,spi-nor" (because it doesn't
support the usual RDID command").
Alternatively, we could introduce a "generic" compatible which just
uses the standard RDSFDP command instead of RDID for discovery. Rob?
Then we'd need some SFDP fingerprinting mechanism to match the SFDP
to a particular flash type.
-michael
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2025-03-20 7:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-19 9:47 [PATCH 0/3] mtd: spi-nor: introduce optional rdid-dummy-ncycles DT property Takahiro Kuwano
2025-03-19 9:47 ` [PATCH 1/3] dt-bindings: mtd: jedec,spi-nor: add optional rdid-dummy-ncycles Takahiro Kuwano
2025-03-19 9:47 ` [PATCH 2/3] mtd: spi-nor: use rdid-dummy-ncycles DT property Takahiro Kuwano
2025-03-19 23:30 ` Rob Herring
2025-03-20 7:30 ` Michael Walle [this message]
2025-03-20 7:44 ` Tudor Ambarus
2025-03-20 14:06 ` Rob Herring
2025-03-20 15:45 ` Tudor Ambarus
2025-03-21 8:00 ` Michael Walle
2025-03-26 14:44 ` Tudor Ambarus
2025-03-27 10:43 ` Takahiro Kuwano
2025-03-21 8:55 ` Takahiro Kuwano
2025-03-19 9:47 ` [PATCH 3/3] mtd: spi-nor: spansion: add support for CYRS17B512 Takahiro Kuwano
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=D8KX1NO755U3.2HC0O2OX5MJUL@kernel.org \
--to=mwalle@kernel.org \
--cc=Bacem.Daassi@infineon.com \
--cc=Takahiro.Kuwano@infineon.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=pratyush@kernel.org \
--cc=richard@nod.at \
--cc=robh@kernel.org \
--cc=tkuw584924@gmail.com \
--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