]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: am62px: Define capsule update firmware info
authorJonathan Humphreys <j-humphreys@ti.com>
Fri, 14 Jun 2024 16:35:43 +0000 (11:35 -0500)
committerTom Rini <trini@konsulko.com>
Tue, 18 Jun 2024 16:43:29 +0000 (10:43 -0600)
Define the firmware components updatable via EFI capsule update, including
defining capsule GUIDs for the various firmware components for the AM62px
SK.

Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
board/ti/am62px/evm.c
include/configs/am62px_evm.h

index 97a95ce8cc2d5aa2a7765974e1be70a5e32fe1bc..1a2c46c462b43677264887b5bfde72d6c3346fa5 100644 (file)
@@ -6,6 +6,7 @@
  *
  */
 
+#include <efi_loader.h>
 #include <asm/arch/hardware.h>
 #include <asm/io.h>
 #include <dm/uclass.h>
 #include <fdt_support.h>
 #include <spl.h>
 
+struct efi_fw_image fw_images[] = {
+       {
+               .image_type_id = AM62PX_SK_TIBOOT3_IMAGE_GUID,
+               .fw_name = u"AM62PX_SK_TIBOOT3",
+               .image_index = 1,
+       },
+       {
+               .image_type_id = AM62PX_SK_SPL_IMAGE_GUID,
+               .fw_name = u"AM62PX_SK_SPL",
+               .image_index = 2,
+       },
+       {
+               .image_type_id = AM62PX_SK_UBOOT_IMAGE_GUID,
+               .fw_name = u"AM62PX_SK_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,
+};
+
+#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO)
+void set_dfu_alt_info(char *interface, char *devstr)
+{
+       if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
+               env_set("dfu_alt_info", update_info.dfu_string);
+}
+#endif
+
 int board_init(void)
 {
        return 0;
index 06b12860e21f76b31fdeac82f1b83d384c2067c2..57a1ba9dc3c17812ad3cbc1de679f321833b482c 100644 (file)
@@ -8,6 +8,30 @@
 #ifndef __CONFIG_AM62PX_EVM_H
 #define __CONFIG_AM62PX_EVM_H
 
+/**
+ * define AM62PX_SK_TIBOOT3_IMAGE_GUID - firmware GUID for AM62PX sk tiboot3.bin
+ * define AM62PX_SK_SPL_IMAGE_GUID     - firmware GUID for AM62PX sk SPL
+ * define AM62PX_SK_UBOOT_IMAGE_GUID   - firmware GUID for AM62PX sk UBOOT
+ *
+ * These GUIDs are used in capsules updates to identify the corresponding
+ * firmware object.
+ *
+ * Board developers using this as a starting reference should
+ * define their own GUIDs to ensure that firmware repositories (like
+ * LVFS) do not confuse them.
+ */
+#define AM62PX_SK_TIBOOT3_IMAGE_GUID \
+       EFI_GUID(0xb08471b7, 0xbe2d, 0x4489, 0x87, 0xa1, \
+               0xca, 0xb2, 0x8a, 0x0c, 0xf7, 0x43)
+
+#define AM62PX_SK_SPL_IMAGE_GUID \
+       EFI_GUID(0xd02ed781, 0x6d71, 0x4c1a, 0xa9, 0x99, \
+               0x3c, 0x6a, 0x41, 0xc3, 0x63, 0x24)
+
+#define AM62PX_SK_UBOOT_IMAGE_GUID \
+       EFI_GUID(0x7e6aea51, 0x965c, 0x44ab, 0xb3, 0x88, \
+               0xda, 0xeb, 0x03, 0xb5, 0x4f, 0x66)
+
 /* Now for the remaining common defines */
 #include <configs/ti_armv7_common.h>