[PATCH v8 4/8] mtd: spi-nor: sfdp: expose the SFDP as a read-only NVMEM device
Miquel Raynal
miquel.raynal at bootlin.com
Wed Oct 14 01:38:42 PDT 2026
On 14/10/2026 at 12:10:08 +0530, Manikandan Muralidharan <manikandan.m at microchip.com> wrote:
> The SPI NOR core already reads the SFDP tables during enumeration and
> caches them in nor->sfdp->dwords (see spi_nor_parse_sfdp()). Re-expose
> that cached data as a read-only NVMEM device, in on-flash byte order,
> rooted at the flash's SFDP child node (compatible "jedec,sfdp").
>
> This lets NVMEM cells reference any SFDP data: a fixed-layout for
> parameters at a known offset, or an nvmem-layout parser for vendor data
> whose location must be discovered at runtime. The device is only registered
> when an "sfdp" node is present in the device tree.
>
> Signed-off-by: Manikandan Muralidharan <manikandan.m at microchip.com>
Reviewed-by: Miquel Raynal <miquel.raynal at bootlin.com>
More information about the linux-arm-kernel
mailing list