From patchwork Fri Jun 7 22:38:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Humphreys X-Patchwork-Id: 1945301 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=UGe7D3r/; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vwx6t43jFz20Py for ; Sat, 8 Jun 2024 08:43:02 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 017B6885AE; Sat, 8 Jun 2024 00:39:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="UGe7D3r/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8DF5F88578; Sat, 8 Jun 2024 00:39:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B3D408850D for ; Sat, 8 Jun 2024 00:39:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=j-humphreys@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 457MdUiN026929; Fri, 7 Jun 2024 17:39:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717799970; bh=ZcHYTDQfsEbrH3dAipffE7uv3IbF3BybiVBzfLSWDx8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=UGe7D3r/Fx1AZnzup0yJJ6SxTH0a+n8yD6KVaA7Otzr331+g+kymSkP+7uhCEaVV/ DM6JgedoE+hd9T2R69X2wQoSvZJQ4Nf6Mw0NQeMT5qv2FsInlg1i1Rzv049pAkpHmL yCrqHf82SOFpK6nRKr+RApbZuPOTAyrphJAynSnE= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 457MdUOp084004 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 7 Jun 2024 17:39:30 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 7 Jun 2024 17:39:30 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 7 Jun 2024 17:39:30 -0500 Received: from localhost (udb0321960.dhcp.ti.com [128.247.81.241]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 457MdU96011275; Fri, 7 Jun 2024 17:39:30 -0500 From: Jonathan Humphreys To: Mattijs Korpershoek , Kamlesh Gurudasani , Manorit Chawdhry , Heinrich Schuchardt , Judith Mendez , Christian Gmeiner , Devarsh Thakkar , Simon Glass , Nikhil M Jain , Neha Malcom Francis , Andrew Davis , Maxime Ripard , Siddharth Vadapalli , Roger Quadros , Bryan Brattlof , Vignesh Raghavendra , Robert Nelson , Nishanth Menon , Tom Rini , Sughosh Ganu , Masahisa Kojima , Marcel Ziswiler , Ilias Apalodimas CC: , Jonathan Humphreys Subject: [PATCH v6 19/24] board: beagleboneai64: Define capsule update firmware info Date: Fri, 7 Jun 2024 17:38:53 -0500 Message-ID: <20240607223858.1971290-20-j-humphreys@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240607223858.1971290-1-j-humphreys@ti.com> References: <20240607223858.1971290-1-j-humphreys@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Define the firmware components updatable via EFI capsule update, including defining capsule GUIDs for the various firmware components for the BeagleBoneAI64. Note this involved creating BeagleBoneAI64's own beagleboneai64.h board header file instead of reusing j721e_evm's. Signed-off-by: Jonathan Humphreys --- board/beagle/beagleboneai64/Kconfig | 4 +- board/beagle/beagleboneai64/beagleboneai64.c | 39 ++++++++++++++ include/configs/beagleboneai64.h | 55 ++++++++++++++++++++ 3 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 include/configs/beagleboneai64.h diff --git a/board/beagle/beagleboneai64/Kconfig b/board/beagle/beagleboneai64/Kconfig index 7cfccf9baf0..0f21582614d 100644 --- a/board/beagle/beagleboneai64/Kconfig +++ b/board/beagle/beagleboneai64/Kconfig @@ -37,7 +37,7 @@ config SYS_VENDOR default "beagle" config SYS_CONFIG_NAME - default "j721e_evm" + default "beagleboneai64" source "board/ti/common/Kconfig" @@ -52,7 +52,7 @@ config SYS_VENDOR default "beagle" config SYS_CONFIG_NAME - default "j721e_evm" + default "beagleboneai64" source "board/ti/common/Kconfig" diff --git a/board/beagle/beagleboneai64/beagleboneai64.c b/board/beagle/beagleboneai64/beagleboneai64.c index c5b4ff7df47..1e43d1c1bd2 100644 --- a/board/beagle/beagleboneai64/beagleboneai64.c +++ b/board/beagle/beagleboneai64/beagleboneai64.c @@ -7,6 +7,7 @@ * Copyright (C) 2022-2023 Robert Nelson, BeagleBoard.org Foundation */ +#include #include #include #include @@ -14,6 +15,44 @@ DECLARE_GLOBAL_DATA_PTR; +struct efi_fw_image fw_images[] = { + { + .image_type_id = BEAGLEBONEAI64_TIBOOT3_IMAGE_GUID, + .fw_name = u"BEAGLEBONEAI64_TIBOOT3", + .image_index = 1, + }, + { + .image_type_id = BEAGLEBONEAI64_SPL_IMAGE_GUID, + .fw_name = u"BEAGLEBONEAI64_SPL", + .image_index = 2, + }, + { + .image_type_id = BEAGLEBONEAI64_UBOOT_IMAGE_GUID, + .fw_name = u"BEAGLEBONEAI64_UBOOT", + .image_index = 3, + }, + { + .image_type_id = BEAGLEBONEAI64_SYSFW_IMAGE_GUID, + .fw_name = u"BEAGLEBONEAI64_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, +}; + +#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; diff --git a/include/configs/beagleboneai64.h b/include/configs/beagleboneai64.h new file mode 100644 index 00000000000..85d57248bb6 --- /dev/null +++ b/include/configs/beagleboneai64.h @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Configuration header file for BeagleBoneAI64 + * + * https://beagleboard.org/ai-64 + * + * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ + */ + +#ifndef __CONFIG_BEAGLEBONEAI64_H +#define __CONFIG_BEAGLEBONEAI64_H + +/* FLASH Configuration */ +#define CFG_SYS_FLASH_BASE 0x000000000 + +/* SPL Loader Configuration */ +#define CFG_SYS_UBOOT_BASE 0x50080000 + +/** + * define BEAGLEBONEAI64_TIBOOT3_IMAGE_GUID - firmware GUID for BeagleBoneAI64 + * tiboot3.bin + * define BEAGLEBONEAI64_SPL_IMAGE_GUID - firmware GUID for BeagleBoneAI64 + * SPL + * define BEAGLEBONEAI64_UBOOT_IMAGE_GUID - firmware GUID for BeagleBoneAI64 + * UBOOT + * define BEAGLEBONEAI64_SYSFW_IMAGE_GUID - firmware GUID for BeagleBoneAI64 + * 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 BEAGLEBONEAI64_TIBOOT3_IMAGE_GUID \ + EFI_GUID(0x772a4810, 0x2194, 0x4923, 0x87, 0x54, \ + 0x01, 0x15, 0x87, 0x0e, 0xf3, 0x67) + +#define BEAGLEBONEAI64_SPL_IMAGE_GUID \ + EFI_GUID(0x83447222, 0x1e26, 0x40cd, 0xa3, 0x95, \ + 0xb7, 0xde, 0x09, 0x57, 0xe8, 0x75) + +#define BEAGLEBONEAI64_UBOOT_IMAGE_GUID \ + EFI_GUID(0x4249ff77, 0xc17d, 0x4eb7, 0xa1, 0xdb, \ + 0x45, 0xaa, 0x98, 0x87, 0xd4, 0x9e) + +#define BEAGLEBONEAI64_SYSFW_IMAGE_GUID \ + EFI_GUID(0xdfc9c683, 0x49b7, 0x46bd, 0xb3, 0xc1, \ + 0x3a, 0x3b, 0x2f, 0xdb, 0x13, 0x5b) + +/* Now for the remaining common defines */ +#include + +#endif /* __CONFIG_BEAGLEBONEAI64_H */