EFI: ti: Enable EFI capsule updates
cover EFI: ti: Enable EFI capsule updates
Enable on disk capsule updates, which includes defining the firmware components (tiboot3, spl, u-boot) and enabling processing of raw capsule updates.
This is enabled for several TI SoC based platforms: AM64, AM62, AM62p, BeaglePlay, J7, and BeagleboneAI.
This series also includes enabling seral flash DFU for AM62 and MMC DFU for beagleplay, and adding the sysreset controller node for AM62 to enable system reset.
Jonathan Humphreys (16):
board: Define GUIDs for firmware images
board: am64x: Define capsule update firmware info
configs: am64x: Enable EFI capsule update
board: j721e: Define capsule update firmware info
configs: j721e: Enable EFI capsule update
board: beagleplay: Define capsule update firmware info
configs: beagleplay: Enable DFU for MMC
configs: beagleplay: Enable EFI capsule update
board: am62px: Define capsule update firmware info
configs: am62px: Enable EFI capsule update
configs: am62x: Enable serial flash DFU
arm: dts: k3-am625-sk-u-boot: Add sysreset-controller node
board: am62x: Define capsule update firmware info
configs: am62x: Enable EFI capsule update
board: beagleboneai64: Define capsule update firmware info
configs: beagleboneai64: Enable EFI capsule update
arch/arm/dts/k3-am625-sk-u-boot.dtsi | 9 +++++ board/beagle/beagleboneai64/beagleboneai64.c | 33 +++++++++++++++++ board/beagle/beagleplay/beagleplay.c | 33 +++++++++++++++++ board/ti/am62px/evm.c | 32 +++++++++++++++++ board/ti/am62x/evm.c | 32 +++++++++++++++++ board/ti/am64x/evm.c | 33 +++++++++++++++++ board/ti/j721e/evm.c | 38 ++++++++++++++++++++ configs/am62px_evm_a53_defconfig | 2 ++ configs/am62x_beagleplay_a53_defconfig | 5 +++ configs/am62x_evm_a53_defconfig | 3 ++ configs/am64x_evm_a53_defconfig | 2 ++ configs/j721e_beagleboneai64_a72_defconfig | 2 ++ configs/j721e_evm_a72_defconfig | 2 ++ include/configs/ti_armv7_common.h | 17 +++++++++ 14 files changed, 243 insertions(+)
Signature · 1 line
2.34.1
PATCH 1/16 board: Define GUIDs for firmware images
Define GUIDs for the different firmware images (tiboot3.bin, tispl.bin, u-boot.img, sysfw).
--- include/configs/ti_armv7_common.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
include/configs/ti_armv7_common.h +17 -0
@@ -16,6 +16,23 @@#ifndef __CONFIG_TI_ARMV7_COMMON_H__#define __CONFIG_TI_ARMV7_COMMON_H__ +/* GUIDs for capsule updatable firmware images */ +#define K3_TIBOOT3_IMAGE_GUID \ + EFI_GUID(0xe672b518, 0x7cd7, 0x4014, 0xbd, 0x8d, \ + 0x40, 0x72, 0x4d, 0x0a, 0xd4, 0xdc) + +#define K3_SPL_IMAGE_GUID \ + EFI_GUID(0x86f710ad, 0x10cf, 0x46ea, 0xac, 0x67, \ + 0x85, 0x6a, 0xe0, 0x6e, 0xfa, 0xd2) + +#define K3_UBOOT_IMAGE_GUID \ + EFI_GUID(0x81b58fb0, 0x3b00, 0x4add, 0xa2, 0x0a, \ + 0xc1, 0x85, 0xbb, 0xac, 0xa1, 0xed) + +#define K3_SYSFW_IMAGE_GUID \ + EFI_GUID(0x6fd10680, 0x361b, 0x431f, 0x80, 0xaa, \ + 0x89, 0x94, 0x55, 0x81, 0x9e, 0x11) +/* * We setup defaults based on constraints from the Linux kernel, which should * also be safe elsewhere. We have the default load at 32MB into DDR (for
Signature · 1 line
2.34.1
PATCH 2/16 board: am64x: Define capsule update firmware info
In reply to Jonathan HumphreysDefine the firmwares updatable via EFI capsule update.
--- board/ti/am64x/evm.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
board/ti/am64x/evm.c +33 -0
@@ -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" , + .num_images =ARRAY_SIZE (fw_images), + .images = fw_images, +}; + +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 ;
Signature · 1 line
2.34.1
PATCH 3/16 configs: am64x: Enable EFI capsule update
In reply to Jonathan Humphreys--- configs/am64x_evm_a53_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/am64x_evm_a53_defconfig +2 -0
@@ -177,3 +177,5 @@ CONFIG_USB_FUNCTION_MASS_STORAGE=y CONFIG_SPL_DFU=y CONFIG_FS_FAT_MAX_CLUSTSIZE=16384 CONFIG_EFI_SET_TIME=y +CONFIG_EFI_CAPSULE_ON_DISK=y +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
Signature · 1 line
2.34.1
PATCH 4/16 board: j721e: Define capsule update firmware info
In reply to Jonathan Humphreys--- board/ti/j721e/evm.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)
board/ti/j721e/evm.c +38 -0
@@ -7,6 +7,7 @@* */ +#include <efi_loader.h> #include <generic-phy.h> #include <image.h> #include <net.h>
@@ -32,6 +33,43 @@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 , + }, + { + .image_type_id =K3_SYSFW_IMAGE_GUID , + .fw_name =u"K3_SYSFW" , + .image_index =4 , + }, +}; + +struct efi_capsule_update_info update_info = { + .dfu_string ="sf 0:0=tiboot3.bin raw 0 80000;tispl.bin raw 80000 200000;u-boot.img raw 280000 400000;sysfw.itb raw 6C0000 100000" , + .num_images =ARRAY_SIZE (fw_images), + .images = fw_images, +}; + +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 ;
Signature · 1 line
2.34.1
PATCH 5/16 configs: j721e: Enable EFI capsule update
In reply to Jonathan Humphreys--- configs/j721e_evm_a72_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/j721e_evm_a72_defconfig +2 -0
@@ -210,3 +210,5 @@ CONFIG_UFS=y CONFIG_CADENCE_UFS=y CONFIG_TI_J721E_UFS=y CONFIG_EFI_SET_TIME=y +CONFIG_EFI_CAPSULE_ON_DISK=y +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
Signature · 1 line
2.34.1
PATCH 6/16 board: beagleplay: Define capsule update firmware info
In reply to Jonathan Humphreys--- board/beagle/beagleplay/beagleplay.c | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
board/beagle/beagleplay/beagleplay.c +33 -0
@@ -6,6 +6,7 @@* Copyright (C) 2022-2023 Robert Nelson, BeagleBoard.org Foundation */ +#include <efi_loader.h> #include <cpu_func.h> #include <env.h> #include <fdt_support.h>
@@ -15,6 +16,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 ="mmc 0=tiboot3.bin raw 0 2000 mmcpart 1;tispl.bin fat 0 1;u-boot.img fat 0 1" , + .num_images =ARRAY_SIZE (fw_images), + .images = fw_images, +}; + +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 ;
Signature · 1 line
2.34.1
PATCH 7/16 configs: beagleplay: Enable DFU for MMC
In reply to Jonathan Humphreys--- configs/am62x_beagleplay_a53_defconfig | 3 +++ 1 file changed, 3 insertions(+)
configs/am62x_beagleplay_a53_defconfig +3 -0
@@ -70,6 +70,9 @@ CONFIG_SPL_OF_TRANSLATE=y CONFIG_CLK=y CONFIG_SPL_CLK=y CONFIG_CLK_TI_SCI=y +CONFIG_DFU_MMC=y +CONFIG_SYS_DFU_DATA_BUF_SIZE=0x40000 +CONFIG_SYS_DFU_MAX_FILE_SIZE=0x180000 CONFIG_DMA_CHANNELS=y CONFIG_TI_K3_NAVSS_UDMA=y CONFIG_TI_SCI_PROTOCOL=y
Signature · 1 line
2.34.1
PATCH 8/16 configs: beagleplay: Enable EFI capsule update
In reply to Jonathan Humphreys--- configs/am62x_beagleplay_a53_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/am62x_beagleplay_a53_defconfig +2 -0
@@ -124,3 +124,5 @@ CONFIG_EXT4_WRITE=y CONFIG_FS_FAT_MAX_CLUSTSIZE=16384 CONFIG_LZO=y CONFIG_EFI_SET_TIME=y +CONFIG_EFI_CAPSULE_ON_DISK=y +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
Signature · 1 line
2.34.1
PATCH 9/16 board: am62px: Define capsule update firmware info
In reply to Jonathan HumphreysDefine the firmwares updatable via EFI capsule update.
--- board/ti/am62px/evm.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
board/ti/am62px/evm.c +32 -0
@@ -6,6 +6,7 @@* */ +#include <efi_loader.h> #include <asm/arch/hardware.h> #include <asm/io.h> #include <dm/uclass.h>
@@ -13,6 +14,37 @@#include <fdt_support.h> #include <spl.h> +#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 80000;tispl.bin raw 80000 200000;u-boot.img raw 280000 400000" , + .num_images =ARRAY_SIZE (fw_images), + .images = fw_images, +}; + +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 ;
Signature · 1 line
2.34.1
PATCH 10/16 configs: am62px: Enable EFI capsule update
In reply to Jonathan Humphreys--- configs/am62px_evm_a53_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/am62px_evm_a53_defconfig +2 -0
@@ -176,3 +176,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x6165 CONFIG_SPL_DFU=y CONFIG_FS_FAT_MAX_CLUSTSIZE=16384 CONFIG_EFI_SET_TIME=y +CONFIG_EFI_CAPSULE_ON_DISK=y +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
Signature · 1 line
2.34.1
PATCH 11/16 configs: am62x: Enable serial flash DFU
In reply to Jonathan Humphreys--- configs/am62x_evm_a53_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/am62x_evm_a53_defconfig +1 -0
@@ -67,6 +67,7 @@ CONFIG_SPL_OF_TRANSLATE=y CONFIG_CLK=y CONFIG_SPL_CLK=y CONFIG_CLK_TI_SCI=y +CONFIG_DFU_SF=y CONFIG_DMA_CHANNELS=y CONFIG_TI_K3_NAVSS_UDMA=y CONFIG_TI_SCI_PROTOCOL=y
Signature · 1 line
2.34.1
PATCH 12/16 arm: dts: k3-am625-sk-u-boot: Add sysreset-controller node
In reply to Jonathan Humphreys--- arch/arm/dts/k3-am625-sk-u-boot.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/dts/k3-am625-sk-u-boot.dtsi +9 -0
@@ -46,3 +46,12 @@ &cpsw_port2 { status = "disabled"; }; + +&dmsc { + bootph-pre-ram; + + k3_sysreset: sysreset-controller { + compatible = "ti,sci-sysreset"; + bootph-pre-ram; + }; +};
Signature · 1 line
2.34.1
Re: [PATCH 12/16] arm: dts: k3-am625-sk-u-boot: Add sysreset-controller node
Hi Jonathan,
Quoted 1 line · Jonathan Humphreys
Signed-off-by Jonathan Humphreys <[email protected]>
Maybe this requires a commit message? It's not as self-explanatory to this series as the rest of the patches.
Quoted 21 lines
--- arch/arm/dts/k3-am625-sk-u-boot.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)arch/arm/dts/k3-am625-sk-u-boot.dtsi +9
-0@@ -46,3 +46,12 @@ &cpsw_port2 { status = "disabled"; }; + +&dmsc { + bootph-pre-ram; + + k3_sysreset: sysreset-controller { + compatible = "ti,sci-sysreset"; + bootph-pre-ram; + }; +};
Signature · 2 lines
Thanking You Neha Malcom Francis
PATCH 13/16 board: am62x: Define capsule update firmware info
In reply to Jonathan HumphreysDefine the firmwares updatable via EFI capsule update.
--- board/ti/am62x/evm.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
board/ti/am62x/evm.c +32 -0
@@ -7,6 +7,7 @@* */ +#include <efi_loader.h> #include <env.h> #include <spl.h> #include <init.h>
@@ -46,6 +47,37 @@ int splash_screen_prepare(void) }#endif +#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 80000;tispl.bin raw 80000 200000;u-boot.img raw 280000 480000" , + .num_images =ARRAY_SIZE (fw_images), + .images = fw_images, +}; + +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 ;
Signature · 1 line
2.34.1
PATCH 14/16 configs: am62x: Enable EFI capsule update
In reply to Jonathan Humphreys--- configs/am62x_evm_a53_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/am62x_evm_a53_defconfig +2 -0
@@ -111,3 +111,5 @@ CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_TI_SCI=y CONFIG_FS_FAT_MAX_CLUSTSIZE=16384 CONFIG_EFI_SET_TIME=y +CONFIG_EFI_CAPSULE_ON_DISK=y +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
Signature · 1 line
2.34.1
PATCH 15/16 board: beagleboneai64: Define capsule update firmware info
In reply to Jonathan Humphreys--- board/beagle/beagleboneai64/beagleboneai64.c | 33 ++++++++++++++++++++ 1 file changed, 33 insertions(+)
board/beagle/beagleboneai64/beagleboneai64.c +33 -0
@@ -7,6 +7,7 @@* Copyright (C) 2022-2023 Robert Nelson, BeagleBoard.org Foundation */ +#include <efi_loader.h> #include <cpu_func.h> #include <env.h> #include <fdt_support.h>
@@ -14,6 +15,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 ="mmc 0=tiboot3.bin raw 0 2000 mmcpart 1;tispl.bin fat 0 1;u-boot.img fat 0 1" , + .num_images =ARRAY_SIZE (fw_images), + .images = fw_images, +}; + +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 ;
Signature · 1 line
2.34.1
PATCH 16/16 configs: beagleboneai64: Enable EFI capsule update
In reply to Jonathan Humphreys--- configs/j721e_beagleboneai64_a72_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/j721e_beagleboneai64_a72_defconfig +2 -0
@@ -172,3 +172,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x6163 CONFIG_SPL_DFU=y CONFIG_LZO=y CONFIG_EFI_SET_TIME=y +CONFIG_EFI_CAPSULE_ON_DISK=y +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
Signature · 1 line
2.34.1