[PATCH v1 8/8] mtd: spi-nor: rework flash parameter initialization

Takahiro.Kuwano at infineon.com Takahiro.Kuwano at infineon.com
Thu Jul 9 19:48:14 PDT 2026


Hi,

> Rework how the flash parameters are initialized. It used to make a
> difference whether a flash is in the in-kernel database, whether it
> supports multi I/O and so on. Recently, that makes more and more
> problems because flash IDs are reused among legacy flashes (w/o SFDP
> support) and newer flashes [1,2,3,4].
> 
> Simplify the whole parameter initialization, by starting with the
> parameters we have in the in-kernel database and the try to parse SFDP
> (and let it override any settings).
> 
> This has the consequence that all the flashes now get a RDSFPD opcode
> which might be an unknown opcode from the perspective of the flash. With
> the generic SPI NOR flash driver, this was already the case for any
> flashes not listed in the in-kernel database. So far, there was not a
> single complaint.
> 
> [1] https://lore.kernel.org/linux-mtd/CAAyq3SYX9UPwhC_Ume_S2yxhQwimRvB=Y6O_+FFqokhNmw7jQg@mail.gmail.com/
> [2] https://lore.kernel.org/linux-mtd/DGB4745HRCFI.1DRYTHXURWZJO@kernel.org/
> [3] https://lore.kernel.org/linux-mtd/DD10GE4EOCD7.CPTN7198QFUV@kernel.org/
> [4] https://lore.kernel.org/linux-mtd/DD6SI06QNEE4.2YCRTWJHEAAQM@kernel.org/
> 
> Signed-off-by: Michael Walle <mwalle at kernel.org>
> Tested-by: Cheng Ming Lin <chengminglin at mxic.com.tw>
> Tested-by: Miquel Raynal <miquel.raynal at bootlin.com> # w/ W25Q02JVFIM
> ---

Tested-by: Takahiro Kuwano <takahiro.kuwano at infineon.com>

Test log is here (I forgot a tag).
https://lore.kernel.org/linux-mtd/28461250e841436e98e67fd7b0d02313@infineon.com/




More information about the linux-mtd mailing list