From patchwork Thu Jul 14 18:39:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 590392 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5817:0:0:0:0 with SMTP id j23csp1850253max; Thu, 14 Jul 2022 11:41:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sLzB0DHxWqAFKfzhwV+z9j6vBPIxb6VWAFO2LmaBM8mMYGaZz3Cqngcg4ZS3AspfJavNc0 X-Received: by 2002:a92:ca4e:0:b0:2dc:8d60:d00c with SMTP id q14-20020a92ca4e000000b002dc8d60d00cmr5405137ilo.304.1657824061150; Thu, 14 Jul 2022 11:41:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657824061; cv=none; d=google.com; s=arc-20160816; b=OlhdUVgyQZmmTCJTtyAk/QNMT+0xUOfuqJUOBQLFDLLpnbwZFrCOILgyAqC95TaUkX HbvUpEdbFz5/fq5Sz1QLSy92ygvUSd8ZnNlC8ZeuzoesTu2yrRnDfPG47cgpighSamHq ZWhFsZgs4UIkMvv5r7pJNw8DW7opMHboPHp+BGA5TbXQ3LYNie+HOtdZccIJrao8XHph wRDpsrlHXfVmwu29EBBvavmP9hUvoiFR/8I/94XAsaDkWSxaXR7DEKkpMG4ilbIznrR6 0fmR9SqlWX1tc7CftsEPjE0bfVsuX4Rh7lYRntdR96bKODpbCxmOD1DJ8tzMO8R6vngK vTBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=lrZ8uAgM5dJilfWeAnUJ4Mw4nc8mw6DD+x28pVp1miU=; b=r/y1cy4ZKlAGURrXzvbm3yObK/KcbfjBaFocbjyjjYU+RP3I/yF85n92OVNdMxDb6J MuYIhjEHgMyTEa24XP9pLfIkDC2QQPonOd5e6nylVthJ+wg/R+S9Rf7foRL0yRX7fjuL m+CV/ZBgmVMT4u4XNq+03APn/cxk5WZbEWMxFtR0LdS/12PI4c9VwGxNaf82FcV1N4Vb faTEcWrGLBJbLx6v5O9OD48cYgIa+WWBhragEqEr5jsgAYNZiq+DdSpjsOIcKxWCUPAo iaOf5xBWwsZjpQZWH6bAi7El0f9XUhod8Jw+6zRcPzg6dznaocjZEmTa9An331BhvqlQ 7ieg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id n2-20020a027142000000b0033ec09920c2si2183569jaf.20.2022.07.14.11.41.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jul 2022 11:41:01 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D9801840E2; Thu, 14 Jul 2022 20:40:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id D7244840D3; Thu, 14 Jul 2022 20:40:06 +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=-1.2 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 05E99840B2 for ; Thu, 14 Jul 2022 20:40:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D911B1D14; Thu, 14 Jul 2022 11:40:02 -0700 (PDT) Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E37EB3F70D; Thu, 14 Jul 2022 11:39:58 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Takahiro Akashi , Patrick Delaunay , Patrice Chotard , Simon Glass , Bin Meng , Tom Rini , Etienne Carriere , Michal Simek , Jassi Brar , Sughosh Ganu Subject: [PATCH v7 05/13] stm32mp1: dk2: Add image information for capsule updates Date: Fri, 15 Jul 2022 00:09:05 +0530 Message-Id: <20220714183913.118505-6-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220714183913.118505-1-sughosh.ganu@linaro.org> References: <20220714183913.118505-1-sughosh.ganu@linaro.org> MIME-Version: 1.0 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.6 at phobos.denx.de X-Virus-Status: Clean Enabling capsule update functionality on the platform requires populating information on the images that are to be updated using the functionality. Do so for the DK2 board. Signed-off-by: Sughosh Ganu Reviewed-by: Patrick Delaunay Reviewed-by: Ilias Apalodimas --- Changes since V6: * s/STM32MP1/STM32MP15/ as suggested by Patrick board/st/stm32mp1/stm32mp1.c | 19 +++++++++++++++++++ include/configs/stm32mp15_common.h | 4 ++++ 2 files changed, 23 insertions(+) diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index 9496890d16..e3a04f8d8a 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -87,6 +88,16 @@ #define USB_START_LOW_THRESHOLD_UV 1230000 #define USB_START_HIGH_THRESHOLD_UV 2150000 +#if CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT) +struct efi_fw_image fw_images[1]; + +struct efi_capsule_update_info update_info = { + .images = fw_images, +}; + +u8 num_image_type_guids = ARRAY_SIZE(fw_images); +#endif /* EFI_HAVE_CAPSULE_SUPPORT */ + int board_early_init_f(void) { /* nothing to do, only used in SPL */ @@ -670,6 +681,14 @@ int board_init(void) setup_led(LEDST_ON); +#if CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT) + if (board_is_stm32mp15x_dk2()) { + efi_guid_t image_type_guid = STM32MP15_DK2_FIP_IMAGE_GUID; + guidcpy(&fw_images[0].image_type_id, &image_type_guid); + fw_images[0].fw_name = u"STM32MP15-DK2-FIP"; + fw_images[0].image_index = 5; + } +#endif return 0; } diff --git a/include/configs/stm32mp15_common.h b/include/configs/stm32mp15_common.h index c5412ffeb3..6ab10d8ce5 100644 --- a/include/configs/stm32mp15_common.h +++ b/include/configs/stm32mp15_common.h @@ -34,6 +34,10 @@ #define CONFIG_SERVERIP 192.168.1.1 #endif +#define STM32MP15_DK2_FIP_IMAGE_GUID \ + EFI_GUID(0x19d5df83, 0x11b0, 0x457b, 0xbe, 0x2c, \ + 0x75, 0x59, 0xc1, 0x31, 0x42, 0xa5) + /*****************************************************************************/ #ifdef CONFIG_DISTRO_DEFAULTS /*****************************************************************************/