[PATCH V2] nvmem: add explicit config option to read OF fixed cells

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Fri Feb 24 05:13:59 PST 2023

Il 24/02/23 08:29, Rafał Miłecki ha scritto:
> From: Rafał Miłecki <rafal at milecki.pl>
> NVMEM subsystem looks for fixed NVMEM cells (specified in DT) by
> default. This behaviour made sense in early days before adding support
> for dynamic cells.
> With every new supported NVMEM device with dynamic cells current
> behaviour becomes non-optimal. It results in unneeded iterating over DT
> nodes and may result in false discovery of cells (depending on used DT
> properties).
> This behaviour has actually caused a problem already with the MTD
> subsystem. MTD subpartitions were incorrectly treated as NVMEM cells.
> Also with upcoming support for NVMEM layouts no new binding or driver
> should support fixed cells defined in device node.
> Solve this by modifying drivers for bindings that support specifying
> fixed NVMEM cells in DT. Make them explicitly tell NVMEM subsystem to
> read cells from DT.
> It wasn't clear (to me) if rtc and w1 code actually uses fixed cells. I
> enabled them to don't risk any breakage.
> Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
> [for drivers/nvmem/meson-{efuse,mx-efuse}.c]
> Acked-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>

[for mtk-efuse.c, nvmem/core.c, nvmem-provider.h]
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>

[MT8192, MT8195 Chromebooks]
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>

More information about the linux-mtd mailing list