Re: [PATCH v2] nvmem: layouts: u-boot-env: add optional "env-size" property
From: Rob Herring (Arm)
Date: Sun Oct 26 2025 - 18:30:12 EST
On Thu, 23 Oct 2025 03:07:41 +0400, Jascha Sundaresan wrote:
> Some devices reserve a larger NVMEM region for the U-Boot environment
> than the actual environment data length used by U-Boot itself. The CRC32
> in the U-Boot header is calculated over the smaller data length, causing
> CRC validation to fail when Linux reads the full partition.
>
> Allow an optional device tree property "env-size" to specify the
> environment data size to use for CRC computation.
>
> v2: add missing $ref line to DT binding
>
> Signed-off-by: Jascha Sundaresan <flizarthanon@xxxxxxxxx>
> ---
> Changes in v2:
> - Added missing "$ref" line to schema for env-size
> - Confirmed dt_binding_check passes
>
> .../devicetree/bindings/nvmem/layouts/u-boot,env.yaml | 7 +++++++
> drivers/nvmem/layouts/u-boot-env.c | 4 +++-
> 2 files changed, 10 insertions(+), 1 deletion(-)
>
Reviewed-by: Rob Herring (Arm) <robh@xxxxxxxxxx>