Hi Simon,

On 2025-02-09 22:14, Simon Glass wrote:
> Add bootstd information for VBE. Put it in a separate file to avoid
> cluttering the main one.
> 
> Signed-off-by: Simon Glass <s...@chromium.org>
> ---
> 
> Changes in v2:
> - Move VPL things into a separate file
> 
>  arch/arm/dts/rockchip-u-boot.dtsi     |  4 ++++
>  arch/arm/dts/rockchip-vpl-u-boot.dtsi | 31 +++++++++++++++++++++++++++
>  2 files changed, 35 insertions(+)
>  create mode 100644 arch/arm/dts/rockchip-vpl-u-boot.dtsi
> 
> diff --git a/arch/arm/dts/rockchip-u-boot.dtsi 
> b/arch/arm/dts/rockchip-u-boot.dtsi
> index c899e8e6005..10563e273a9 100644
> --- a/arch/arm/dts/rockchip-u-boot.dtsi
> +++ b/arch/arm/dts/rockchip-u-boot.dtsi
> @@ -224,3 +224,7 @@
>  #endif /* CONFIG_ROCKCHIP_SPI_IMAGE */
>  };
>  #endif /* CONFIG_SPL */
> +
> +#ifdef CONFIG_VPL
> +#include "rockchip-vpl-u-boot.dtsi"
> +#endif
> diff --git a/arch/arm/dts/rockchip-vpl-u-boot.dtsi 
> b/arch/arm/dts/rockchip-vpl-u-boot.dtsi
> new file mode 100644
> index 00000000000..26b77e67c80
> --- /dev/null
> +++ b/arch/arm/dts/rockchip-vpl-u-boot.dtsi
> @@ -0,0 +1,31 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright (C) 2019 Jagan Teki <ja...@amarulasolutions.com>
> + */
> +
> +/ {
> +     bootstd {
> +             bootph-verify;
> +             compatible = "u-boot,boot-std";
> +
> +             /*
> +              * This is used for the VBE OS-request tests. A FAT filesystem
> +              * created in a partition with the VBE information appearing
> +              * before the partition starts.
> +              *
> +              * Offsets are aligned to the media block-size, typically 0x200
> +              */
> +             firmware0 {
> +                     bootph-verify;
> +                     compatible = "fwupd,vbe-abrec";
> +                     storage = "mmc0";

This is probably board specific and can mean either emmc or sd-card in
Linux depending on the DT for the board. U-Boot will for most Rockchip
SoCs always treat mmc0 as emmc and mmc1 as sd-card thanks to override
in <soc>-u-boot.dtsi and/or driver code.

> +                     skip-offset = <0x8000>;
> +                     area-start = <CONFIG_SPL_PAD_TO>;

SPL_PAD_TO is defined as "Image offset to which the SPL should be padded
before appending the SPL payload." so should probably not be used to
declare offset in storage.

> +                     area-size = <0x800000>;
> +                     state-offset = <(CONFIG_SPL_PAD_TO - 0x400)>;
> +                     state-size = <0x40>;
> +                     version-offset = <(CONFIG_SPL_PAD_TO - 0x200)>;
> +                     version-size = <0x100>;

All these offsets and sizes seem a bit arbitrary without any context.
Please add more details about the layout used in a comment and/or commit
message.

Regards,
Jonas

> +             };
> +     };
> +};

Reply via email to