EFI: ti: Enable EFI capsule updates
v2 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.
Changes from v1:
- Added sysfw.itb capsule definition to beagleboneai64
- removed extra commas in structure definitions
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 | 38 ++++++++++++++++++++ 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, 248 insertions(+)
Signature · 1 line
2.34.1
PATCH v2 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
Re: [PATCH v2 01/16] board: Define GUIDs for firmware images
Quoted 12 lines · Jonathan Humphreys
Define GUIDs for the different firmware images (tiboot3.bin, tispl.bin, u-boot.img, sysfw). >
Signed-off-by Jonathan Humphreys <[email protected]>--- include/configs/ti_armv7_common.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)include/configs/ti_armv7_common.h +0
-0
include/configs/ti_armv7_common.h line 19
Quoted 4 lines
include/configs/ti_armv7_common.h +1
-0@@ -16,6 +16,23 @@#ifndef __CONFIG_TI_ARMV7_COMMON_H__#define __CONFIG_TI_ARMV7_COMMON_H__ +/* GUIDs for capsule updatable firmware images */
Please, provide code comments for the GUIDs, e.g.
/**
* define K3_TIBOOT3_IMAGE_GUID - firmware GUID for K3 tiboot3.bin *
* This GUID is used in capsules updates to identify the tiboot3.bin
* binary.
*/
Cf.
https://docs.kernel.org/doc-guide/kernel-doc.html#object-like-macro-documentation
Best regards
Heinrich
Quoted 19 lines
include/configs/ti_armv7_common.h +16
-0+#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
Re: [PATCH v2 01/16] board: Define GUIDs for firmware images
Quoted 27 lines · Heinrich Schuchardt
Quoted 12 lines · Jonathan Humphreys
Define GUIDs for the different firmware images (tiboot3.bin, tispl.bin, u-boot.img, sysfw). >
Signed-off-by Jonathan Humphreys <[email protected]>--- include/configs/ti_armv7_common.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)include/configs/ti_armv7_common.h +0
-0include/configs/ti_armv7_common.h line 19
Quoted 4 lines
include/configs/ti_armv7_common.h +1
-0@@ -16,6 +16,23 @@#ifndef __CONFIG_TI_ARMV7_COMMON_H__#define __CONFIG_TI_ARMV7_COMMON_H__ +/* GUIDs for capsule updatable firmware images */ Please, provide code comments for the GUIDs, e.g.
/**
* defineK3_TIBOOT3_IMAGE_GUID- firmware GUID for K3 tiboot3.bin *
* This GUID is used in capsules updates to identify the tiboot3.bin
* binary.
*/
Quoted 7 lines
Cf.
https://docs.kernel.org/doc-guide/kernel-doc.html#object-like-macro-documentationBest regards
Heinrich
Heinrich, thanks for reviewing!
I modelled the GUID macros after how other boards and even core code defined there's. (eg, include/configs/kontron-sl-mx8mm.h or include/efi_api.h).
However, if this is the new direction, I will format as you suggest. Please confirm.
thanks
Jon
Quoted 19 lines
Quoted 19 lines
include/configs/ti_armv7_common.h +16
-0+#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
Re: [PATCH v2 01/16] board: Define GUIDs for firmware images
Quoted 37 lines · Jon Humphreys
Quoted 27 lines · Heinrich Schuchardt
Quoted 12 lines · Jonathan Humphreys
Define GUIDs for the different firmware images (tiboot3.bin, tispl.bin, u-boot.img, sysfw). >
Signed-off-by Jonathan Humphreys <[email protected]>--- include/configs/ti_armv7_common.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)include/configs/ti_armv7_common.h +0
-0include/configs/ti_armv7_common.h line 19
Quoted 4 lines
include/configs/ti_armv7_common.h +1
-0@@ -16,6 +16,23 @@#ifndef __CONFIG_TI_ARMV7_COMMON_H__#define __CONFIG_TI_ARMV7_COMMON_H__ +/* GUIDs for capsule updatable firmware images */ Please, provide code comments for the GUIDs, e.g.
/**
* defineK3_TIBOOT3_IMAGE_GUID- firmware GUID for K3 tiboot3.bin *
* This GUID is used in capsules updates to identify the tiboot3.bin
* binary.
*/Quoted 7 lines
Cf.
https://docs.kernel.org/doc-guide/kernel-doc.html#object-like-macro-documentationBest regards
Heinrich
Quoted 8 lines
Heinrich, thanks for reviewing!
I modelled the GUID macros after how other boards and even core code defined there's. (eg,
include/configs/kontron-sl-mx8mm.horinclude/efi_api.h).However, if this is the new direction, I will format as you suggest. Please confirm.
Hello Jon,
Without properly documenting macros we make the live of developers more difficult. Yes, we still have a lot of missing code documentation. But we should not follow poor example.
Best regards
Heinrich
Quoted 23 lines
thanks
JonQuoted 19 lines
Quoted 19 lines
include/configs/ti_armv7_common.h +16
-0+#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
Re: [PATCH v2 01/16] board: Define GUIDs for firmware images
Hi both
Quoted 24 lines · Heinrich Schuchardt
Quoted 22 lines · Jon Humphreys
Quoted 20 lines · Heinrich Schuchardt
Quoted 12 lines · Jonathan Humphreys
Define GUIDs for the different firmware images (tiboot3.bin, tispl.bin, u-boot.img, sysfw). >
Signed-off-by Jonathan Humphreys <[email protected]>--- include/configs/ti_armv7_common.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)include/configs/ti_armv7_common.h +0
-0include/configs/ti_armv7_common.h line 19
Quoted 4 lines
include/configs/ti_armv7_common.h +1
-0@@ -16,6 +16,23 @@#ifndef __CONFIG_TI_ARMV7_COMMON_H__#define __CONFIG_TI_ARMV7_COMMON_H__ +/* GUIDs for capsule updatable firmware images */ Please, provide code comments for the GUIDs, e.g.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
/**
* defineK3_TIBOOT3_IMAGE_GUID- firmware GUID for K3 tiboot3.bin *
* This GUID is used in capsules updates to identify the tiboot3.bin
* binary.
*/
I'd go one step further tbh. Those GUIDs can be used by OEMs/ODMs producing capsules for their future products.
Currently, we don't have a documented way to allow users to redefine this (but Linaro is working on it). If both TI and an OEM use the same GUID and try to upload the firmware to LVFS, we will have a GUID clash.
I think we should have that on the comment as well, until we can properly sort it out
Thanks
/Ilias
Quoted 52 lines
Quoted 9 lines
Quoted 8 lines
Cf.
https://docs.kernel.org/doc-guide/kernel-doc.html#object-like-macro-documentationBest regards
Heinrich
Quoted 8 lines
Heinrich, thanks for reviewing!
I modelled the GUID macros after how other boards and even core code defined there's. (eg,
include/configs/kontron-sl-mx8mm.horinclude/efi_api.h).However, if this is the new direction, I will format as you suggest. Please confirm.
Hello Jon,
Without properly documenting macros we make the live of developers more difficult. Yes, we still have a lot of missing code documentation. But we should not follow poor example.
Best regards
Heinrich
Quoted 23 lines
thanks
JonQuoted 19 lines
Quoted 19 lines
include/configs/ti_armv7_common.h +16
-0+#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
Re: [PATCH v2 01/16] board: Define GUIDs for firmware images
Quoted 34 lines · Ilias Apalodimas
Hi both
Quoted 24 lines · Heinrich Schuchardt
Quoted 22 lines · Jon Humphreys
Quoted 20 lines · Heinrich Schuchardt
Quoted 12 lines · Jonathan Humphreys
Define GUIDs for the different firmware images (tiboot3.bin, tispl.bin, u-boot.img, sysfw). >
Signed-off-by Jonathan Humphreys <[email protected]>--- include/configs/ti_armv7_common.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)include/configs/ti_armv7_common.h +0
-0include/configs/ti_armv7_common.h line 19
Quoted 4 lines
include/configs/ti_armv7_common.h +1
-0@@ -16,6 +16,23 @@#ifndef __CONFIG_TI_ARMV7_COMMON_H__#define __CONFIG_TI_ARMV7_COMMON_H__ +/* GUIDs for capsule updatable firmware images */ Please, provide code comments for the GUIDs, e.g.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
/**
* defineK3_TIBOOT3_IMAGE_GUID- firmware GUID for K3 tiboot3.bin *
* This GUID is used in capsules updates to identify the tiboot3.bin
* binary.
*/
Quoted 8 lines
I'd go one step further tbh. Those GUIDs can be used by OEMs/ODMs producing capsules for their future products.
Currently, we don't have a documented way to allow users to redefine this (but Linaro is working on it). If both TI and an OEM use the same GUID and try to upload the firmware to LVFS, we will have a GUID clash.
I think we should have that on the comment as well, until we can properly sort it out
Ilias, I realized I may have defined the GUID's a bit incorrectly. I was thinking that the GUID's identify the firmware type (eg, SPL vs Uboot for TI devices). However, the SPL binary for say am62 will be different than the SPL binary for say am64, so I should have unique GUID's per firmware type *per board*. Correct?
If so, I'll need to move these definitions to the board .h files, and my generic capsule binman nodes will need to have each board override the image GUID used.
thanks
Jon
Quoted 55 lines
Thanks
/IliasQuoted 52 lines
Quoted 9 lines
Quoted 8 lines
Cf.
https://docs.kernel.org/doc-guide/kernel-doc.html#object-like-macro-documentationBest regards
Heinrich
Quoted 8 lines
Heinrich, thanks for reviewing!
I modelled the GUID macros after how other boards and even core code defined there's. (eg,
include/configs/kontron-sl-mx8mm.horinclude/efi_api.h).However, if this is the new direction, I will format as you suggest. Please confirm.
Hello Jon,
Without properly documenting macros we make the live of developers more difficult. Yes, we still have a lot of missing code documentation. But we should not follow poor example.
Best regards
Heinrich
Quoted 23 lines
thanks
JonQuoted 19 lines
Quoted 19 lines
include/configs/ti_armv7_common.h +16
-0+#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
Re: [PATCH v2 01/16] board: Define GUIDs for firmware images
Quoted 51 lines · Jon Humphreys
Quoted 34 lines · Ilias Apalodimas
Hi both
Quoted 24 lines · Heinrich Schuchardt
Quoted 22 lines · Jon Humphreys
Quoted 20 lines · Heinrich Schuchardt
Quoted 12 lines · Jonathan Humphreys
Define GUIDs for the different firmware images (tiboot3.bin, tispl.bin, u-boot.img, sysfw). >
Signed-off-by Jonathan Humphreys <[email protected]>--- include/configs/ti_armv7_common.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)include/configs/ti_armv7_common.h +0
-0include/configs/ti_armv7_common.h line 19
Quoted 4 lines
include/configs/ti_armv7_common.h +1
-0@@ -16,6 +16,23 @@#ifndef __CONFIG_TI_ARMV7_COMMON_H__#define __CONFIG_TI_ARMV7_COMMON_H__ +/* GUIDs for capsule updatable firmware images */ Please, provide code comments for the GUIDs, e.g.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
/**
* defineK3_TIBOOT3_IMAGE_GUID- firmware GUID for K3 tiboot3.bin *
* This GUID is used in capsules updates to identify the tiboot3.bin
* binary.
*/Quoted 8 lines
I'd go one step further tbh. Those GUIDs can be used by OEMs/ODMs producing capsules for their future products.
Currently, we don't have a documented way to allow users to redefine this (but Linaro is working on it). If both TI and an OEM use the same GUID and try to upload the firmware to LVFS, we will have a GUID clash.
I think we should have that on the comment as well, until we can properly sort it outIlias, I realized I may have defined the GUID's a bit incorrectly. I was thinking that the GUID's identify the firmware type (eg, SPL vs Uboot for TI devices). However, the SPL binary for say am62 will be different than the SPL binary for say am64, so I should have unique GUID's per firmware type *per board*. Correct?
Quoted 3 lines
If so, I'll need to move these definitions to the board .h files, and my generic capsule binman nodes will need to have each board override the image GUID used.
Yes, consider for example if you wanted to maintain community firmware images on LVFS, for a given image (like U-Boot itself) you would presumably update it for each board, which requires each board to have it's own GUID so you can tell them apart.
If one of the payloads is identical for a bunch of boards then it might make sense to use one GUID for it.
Quoted 59 lines
thanks
JonQuoted 55 lines
Thanks
/IliasQuoted 52 lines
Quoted 9 lines
Quoted 8 lines
Cf.
https://docs.kernel.org/doc-guide/kernel-doc.html#object-like-macro-documentationBest regards
Heinrich
Quoted 8 lines
Heinrich, thanks for reviewing!
I modelled the GUID macros after how other boards and even core code defined there's. (eg,
include/configs/kontron-sl-mx8mm.horinclude/efi_api.h).However, if this is the new direction, I will format as you suggest. Please confirm.
Hello Jon,
Without properly documenting macros we make the live of developers more difficult. Yes, we still have a lot of missing code documentation. But we should not follow poor example.
Best regards
Heinrich
Quoted 23 lines
thanks
JonQuoted 19 lines
Quoted 19 lines
include/configs/ti_armv7_common.h +16
-0+#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
// Caleb (they/them)
PATCH v2 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
Re: [PATCH v2 02/16] board: am64x: Define capsule update firmware info
Quoted 1 line · Jonathan Humphreys
Define the firmwares updatable via EFI capsule update.
Nits:
%s/firmwares/firmware/ (firmware is uncountable).
Quoted 33 lines
Signed-off-by Jonathan Humphreys <[email protected]>--- board/ti/am64x/evm.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)board/ti/am64x/evm.c +12
-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,
board/ti/am64x/evm.c line 51
Quoted 10 lines
board/ti/am64x/evm.c +10
-0+ }, + { + .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 $filesizePlease, 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).
board/ti/am64x/evm.c line 54
Quoted 3 lines
board/ti/am64x/evm.c +3
-0+ .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
Quoted 11 lines
board/ti/am64x/evm.c +8
-0+ +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 ;
Re: [PATCH v2 02/16] board: am64x: Define capsule update firmware info
Quoted 53 lines · Heinrich Schuchardt
Quoted 1 line · Jonathan Humphreys
Define the firmwares updatable via EFI capsule update.
Nits:
%s/firmwares/firmware/ (firmware is uncountable).
Quoted 33 lines
Signed-off-by Jonathan Humphreys <[email protected]>--- board/ti/am64x/evm.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)board/ti/am64x/evm.c +12
-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,board/ti/am64x/evm.c line 51
Quoted 10 lines
board/ti/am64x/evm.c +10
-0+ }, + { + .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?
Quoted 9 lines
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
This patch has the correct offsets for am64x, so I guess phycore defined the offsets differently.
Quoted 4 lines
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).
Yes, I will add patches to document OSPI layouts where missing.
Quoted 24 lines
board/ti/am64x/evm.c line 54
Quoted 3 lines
board/ti/am64x/evm.c +3
-0+ .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
Quoted 11 lines
board/ti/am64x/evm.c +8
-0+ +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 ;
Re: [PATCH v2 02/16] board: am64x: Define capsule update firmware info
In reply to Heinrich SchuchardtQuoted 1 line · Heinrich Schuchardt
On 4/9/24 00:31, Jonathan Humphreys wrote:
[snip]
Quoted 4 lines
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.
I'll pick it up once you're happy with the capsule side of things if you like, but in my mind it's more important to emphasize that this is what capsule support looks like as it rolls out to more platforms, is everyone happy with this?
Signature · 1 line
Tom
Ilias Apalodimas
Acked-byRe: [PATCH v2 02/16] board: am64x: Define capsule update firmware info
Hi Tom
From a capsule update POV the patch looks correct
Quoted 16 lines · Tom Rini
Quoted 1 line · Heinrich Schuchardt
On 4/9/24 00:31, Jonathan Humphreys wrote:
[snip]
Quoted 4 lines
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.
I'll pick it up once you're happy with the capsule side of things if you like, but in my mind it's more important to emphasize that this is what capsule support looks like as it rolls out to more platforms, is everyone happy with this?
--
Tom
PATCH v2 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 v2 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 v2 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 v2 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 v2 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 v2 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 v2 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 v2 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 v2 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 v2 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 v2 12/16] arm: dts: k3-am625-sk-u-boot: Add sysreset-controller node
Hi Jonathan,
Thank you for the patch.
Quoted 1 line · Jonathan Humphreys
Signed-off-by Jonathan Humphreys <[email protected]>
Please consider adding a commit message body.
On the TI vendor tree, there is a similar patch with a commit message:
https://git.ti.com/cgit/ti-u-boot/ti-u-boot/commit/?h=ti-u-boot-2023.04&id=c5296d943c2c84dd6dcb3b91305d006ac46f3157
Before patch:
=> reset
resetting ...
System reset not supported on this platform
### ERROR ### Please RESET the board ###
With patch applied:
=> reset
resetting ...
Andrew also suggested to me that if we are interested by A53 reset only, we can PSCI reset instead for all k3 architecture:
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -784,6 +784,9 @@ config ARCH_K3
bool "Texas Instruments' K3 Architecture" select SPL
select SUPPORT_SPL
+ select PSCI_RESET if ARM64 + select SYSRESET if ARM64 + select SYSRESET_PSCI if ARM64
select FIT
select REGEX
select FIT_SIGNATURE if ARM64
Has the above been considered?
Quoted 23 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 · 1 line
2.34.1
Re: [PATCH v2 12/16] arm: dts: k3-am625-sk-u-boot: Add sysreset-controller node
Quoted 9 lines · Mattijs Korpershoek
Hi Jonathan,
Thank you for the patch.
Quoted 1 line · Jonathan Humphreys
Signed-off-by Jonathan Humphreys <[email protected]>Please consider adding a commit message body.
Got it. thanks.
BTW, the next version of this series will drop this patch as Andrew has submitted another patch removing the need for this one. See
https://lore.kernel.org/r/[email protected].
Quoted 25 lines
On the TI vendor tree, there is a similar patch with a commit message:
https://git.ti.com/cgit/ti-u-boot/ti-u-boot/commit/?h=ti-u-boot-2023.04&id=c5296d943c2c84dd6dcb3b91305d006ac46f3157Before patch:
=> reset
resetting ...
System reset not supported on this platform
### ERROR ### Please RESET the board ###With patch applied:
=> reset
resetting ...Andrew also suggested to me that if we are interested by A53 reset only, we can PSCI reset instead for all k3 architecture:
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -784,6 +784,9 @@ configARCH_K3
bool "Texas Instruments' K3 Architecture" select SPL
selectSUPPORT_SPL
Quoted 8 lines
+ select PSCI_RESET if ARM64 + select SYSRESET if ARM64 + select SYSRESET_PSCI if ARM64select FIT
select REGEX
selectFIT_SIGNATUREif ARM64Has the above been considered?
I am not aware. I would think that you want full reset, unless you are thinking about specifying a reset level?
Jon
Quoted 25 lines
Quoted 25 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 · 1 line
2.34.1
Re: [PATCH v2 12/16] arm: dts: k3-am625-sk-u-boot: Add sysreset-controller node
Hi Jon,
Quoted 10 lines · Jon Humphreys
Quoted 8 lines · Mattijs Korpershoek
Hi Jonathan,
Thank you for the patch.
Quoted 1 line · Jonathan Humphreys
Signed-off-by Jonathan Humphreys <[email protected]>
Quoted 7 lines
Quoted 1 line
Please consider adding a commit message body.
Got it. thanks.
BTW, the next version of this series will drop this patch as Andrew has submitted another patch removing the need for this one. See
https://lore.kernel.org/r/[email protected].
I was not aware of that one. thank you for pointing it out. That seems indeed a better solution.
Quoted 33 lines
Quoted 33 lines
On the TI vendor tree, there is a similar patch with a commit message:
https://git.ti.com/cgit/ti-u-boot/ti-u-boot/commit/?h=ti-u-boot-2023.04&id=c5296d943c2c84dd6dcb3b91305d006ac46f3157Before patch:
=> reset
resetting ...
System reset not supported on this platform
### ERROR ### Please RESET the board ###With patch applied:
=> reset
resetting ...Andrew also suggested to me that if we are interested by A53 reset only, we can PSCI reset instead for all k3 architecture:
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -784,6 +784,9 @@ configARCH_K3
bool "Texas Instruments' K3 Architecture" select SPL
selectSUPPORT_SPL+ select PSCI_RESET if ARM64 + select SYSRESET if ARM64 + select SYSRESET_PSCI if ARM64select FIT
select REGEX
selectFIT_SIGNATUREif ARM64
Quoted 4 lines
Quoted 1 line
Has the above been considered?
I am not aware. I would think that you want full reset, unless you are thinking about specifying a reset level?
On my end, I was mostly interested in resetting from the A53 core, but the solution you linked previously should work for me.
Quoted 28 lines
Jon
Quoted 25 lines
Quoted 25 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 · 1 line
2.34.1
PATCH v2 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 v2 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 v2 15/16 board: beagleboneai64: Define capsule update firmware info
In reply to Jonathan Humphreys--- board/beagle/beagleboneai64/beagleboneai64.c | 38 ++++++++++++++++++++ 1 file changed, 38 insertions(+)
board/beagle/beagleboneai64/beagleboneai64.c +38 -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,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 ="mmc 0=tiboot3.bin raw 0 2000 mmcpart 1;tispl.bin fat 0 1;u-boot.img fat 0 1; sysfw.itb 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 v2 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