[PATCH v2 02/16] board: am64x: Define capsule update firmware info

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Apr 9 06:31:02 CEST 2024


On 4/9/24 00:31, Jonathan Humphreys wrote:
> Define the firmwares updatable via EFI capsule update.

Nits:

%s/firmwares/firmware/ (firmware is uncountable).

>
> Signed-off-by: Jonathan Humphreys <j-humphreys at ti.com>
> ---
>   board/ti/am64x/evm.c | 33 +++++++++++++++++++++++++++++++++
>   1 file changed, 33 insertions(+)
>
> diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c
> index b8de69da06c..876c5c25d42 100644
> --- a/board/ti/am64x/evm.c
> +++ b/board/ti/am64x/evm.c
> @@ -7,6 +7,7 @@
>    *
>    */
>
> +#include <efi_loader.h>
>   #include <asm/io.h>
>   #include <dm/uclass.h>
>   #include <k3-ddrss.h>
> @@ -27,6 +28,38 @@
>
>   DECLARE_GLOBAL_DATA_PTR;
>
> +#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)
> +struct efi_fw_image fw_images[] = {
> +	{
> +		.image_type_id = K3_TIBOOT3_IMAGE_GUID,
> +		.fw_name = u"K3_TIBOOT3",
> +		.image_index = 1,
> +	},
> +	{
> +		.image_type_id = K3_SPL_IMAGE_GUID,
> +		.fw_name = u"K3_SPL",
> +		.image_index = 2,
> +	},
> +	{
> +		.image_type_id = K3_UBOOT_IMAGE_GUID,
> +		.fw_name = u"K3_UBOOT",
> +		.image_index = 3,
> +	}
> +};
> +
> +struct efi_capsule_update_info update_info = {
> +	.dfu_string = "sf 0:0=tiboot3.bin raw 0 100000;tispl.bin raw 100000 200000;u-boot.img raw 300000 400000",

Is TI using other addresses than Phytec?

doc/board/phytec/phycore-am64x.rst:

   fatload mmc 1 ${loadaddr} tiboot3.bin
   sf update $loadaddr 0x0 $filesize
   fatload mmc 1 ${loadaddr} tispl.bin
   sf update $loadaddr 0x80000 $filesize
   fatload mmc 1 ${loadaddr} u-boot.img
   sf update $loadaddr 0x280000 $filesize

Please, add documentation in doc/board/ for all boards in the series
specifying the location of the firmware in flash memory and how to
update it(cf. section OSPI in doc/board/ti/am65x_evm.rst).

> +	.num_images = ARRAY_SIZE(fw_images),
> +	.images = fw_images,
> +};

The series has been assigned to me in Patchwork.

But changes should be tested and reviewed by the respective board
maintainers (Vignesh, Tom for AM64x) as I have no access to TI boards.

Best regards

Heinrich

> +
> +void set_dfu_alt_info(char *interface, char *devstr)
> +{
> +	env_set("dfu_alt_info", update_info.dfu_string);
> +}
> +
> +#endif /* EFI_HAVE_CAPSULE_SUPPORT */
> +
>   int board_init(void)
>   {
>   	return 0;



More information about the U-Boot mailing list