]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: j721e: Define capsule update firmware info
authorJonathan Humphreys <j-humphreys@ti.com>
Fri, 14 Jun 2024 16:35:34 +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
SK-TDA4VM.

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

index 539eaf47186a0735a089291f2978215b0d8283bc..f3452ff0a8fb11d00774d92d3cd337f037c333ed 100644 (file)
@@ -7,6 +7,7 @@
  *
  */
 
+#include <efi_loader.h>
 #include <generic-phy.h>
 #include <image.h>
 #include <net.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
+struct efi_fw_image fw_images[] = {
+       {
+               .image_type_id = J721E_SK_TIBOOT3_IMAGE_GUID,
+               .fw_name = u"J721E_SK_TIBOOT3",
+               .image_index = 1,
+       },
+       {
+               .image_type_id = J721E_SK_SPL_IMAGE_GUID,
+               .fw_name = u"J721E_SK_SPL",
+               .image_index = 2,
+       },
+       {
+               .image_type_id = J721E_SK_UBOOT_IMAGE_GUID,
+               .fw_name = u"J721E_SK_UBOOT",
+               .image_index = 3,
+       },
+       {
+               .image_type_id = J721E_SK_SYSFW_IMAGE_GUID,
+               .fw_name = u"J721E_SK_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,
+};
+
+#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 c26438c8684e81a92eaa416a8f759e895b61baf7..a5140ea6a1156ba677f42f9a2440a2647b83a7db 100644 (file)
 #define CFG_SYS_UBOOT_BASE             0x50080000
 #endif
 
+/**
+ * define J721E_SK_TIBOOT3_IMAGE_GUID - firmware GUID for J721e sk tiboot3.bin
+ * define J721E_SK_SPL_IMAGE_GUID     - firmware GUID for J721e sk SPL
+ * define J721E_SK_UBOOT_IMAGE_GUID   - firmware GUID for J721e sk UBOOT
+ * define J721E_SK_SYSFW_IMAGE_GUID   - firmware GUID for J721e sk SYSFW
+ *
+ * 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 J721E_SK_TIBOOT3_IMAGE_GUID \
+       EFI_GUID(0xe672b518, 0x7cd7, 0x4014, 0xbd, 0x8d, \
+                0x40, 0x72, 0x4d, 0x0a, 0xd4, 0xdc)
+
+#define J721E_SK_SPL_IMAGE_GUID \
+       EFI_GUID(0x86f710ad, 0x10cf, 0x46ea, 0xac, 0x67, \
+                0x85, 0x6a, 0xe0, 0x6e, 0xfa, 0xd2)
+
+#define J721E_SK_UBOOT_IMAGE_GUID \
+       EFI_GUID(0x81b58fb0, 0x3b00, 0x4add, 0xa2, 0x0a, \
+                0xc1, 0x85, 0xbb, 0xac, 0xa1, 0xed)
+
+#define J721E_SK_SYSFW_IMAGE_GUID \
+       EFI_GUID(0x6fd10680, 0x361b, 0x431f, 0x80, 0xaa, \
+                0x89, 0x94, 0x55, 0x81, 0x9e, 0x11)
+
 /* Now for the remaining common defines */
 #include <configs/ti_armv7_common.h>