From patchwork Fri Oct 21 12:45:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 617173 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp955947pvb; Fri, 21 Oct 2022 05:48:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7KIZjkvs4iYgR31CMaNuSjzPW+hZamsUriwDh9Hz1XvQYXOT12zBl+CC993+tZJK6y1e6+ X-Received: by 2002:a17:907:60c8:b0:78d:bc8d:8457 with SMTP id hv8-20020a17090760c800b0078dbc8d8457mr15064846ejc.418.1666356481797; Fri, 21 Oct 2022 05:48:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666356481; cv=none; d=google.com; s=arc-20160816; b=SHoiauaYoV0ptnlO3u6pAvvu9DNzPZISlmqdQLMaoxbzXfKZnzN/V7LMoQRNv4fj+X hzUSToKR/H/L9CWdE4aLB9yOQXAkMXMlrnBg7pIA4xfcnoV49/Ye8PgedI1v9DAgypNv z7fhOn7eJ+flW6Y3LYIlgdOnbLp6AMEEQ1vxei/Qm33jDOGxmvgzgpEBGvlKbf1MZhtF Yb2Noo1/bPdsiX+mWFE6Ets/cHYVWMrORigmBaShV2vNHflttI8m19B56E28bVJ55LzB k0wZNkXzZ/ixee/uNH4xE6ca3me+7kCeKj18uC4prwKallQrPztvJvBQHQhxO8A7v/hW FsMw== 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=+yLc13D8UNhpwcgnpY6Pt5NVWOa2P66WZ09DOLgdYMg=; b=V8bWO0kNpYDQgXOEOdn87kOW5d87GqipxKGvA14pFhxqHQvsbt88u6PUsCfDRboE3B sqiGtOeZ3QvpG25Pw/VmMGjvfAYSLZnTLNIaigpXxd9EoSASx8K2PU1q1ONmiZwnkpjf 6X1/dBCfyNRz27+d5eycJhzGHUqwq91fg+suNasxqsp1Szwh2Dd4KGM13JssKTzTVNr/ eryVLVEanJABXTdXZvGRpIQ9CWi80i6KDsyYs5lMBpn4f+aW2jNxTdWhJiDGEcDkn0WQ EseVH+icC2AjB69L2FaksDbS5j9TpM6+yJU8vTwq7dNOyi3Wx64G9nmmpk4vb2P32u83 TVtQ== 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 hw8-20020a170907a0c800b0073d8830e4c7si18988843ejc.954.2022.10.21.05.48.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 05:48: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 505DE85007; Fri, 21 Oct 2022 14:47:40 +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 036B884FC7; Fri, 21 Oct 2022 14:46:57 +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 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 69AE884FE0 for ; Fri, 21 Oct 2022 14:46:50 +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 C8E4B1042; Fri, 21 Oct 2022 05:46:55 -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 691D53F792; Fri, 21 Oct 2022 05:46:46 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Takahiro Akashi , Patrick Delaunay , Patrice Chotard , Simon Glass , Tom Rini , Etienne Carriere , Jassi Brar , Sughosh Ganu Subject: [PATCH v15 05/15] stm32mp1: Add image information for capsule updates Date: Fri, 21 Oct 2022 18:15:58 +0530 Message-Id: <20221021124608.681387-6-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221021124608.681387-1-sughosh.ganu@linaro.org> References: <20221021124608.681387-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 Reviewed-by: Etienne Carriere --- Changes since V14: None board/st/stm32mp1/stm32mp1.c | 18 ++++++++++++++++++ include/configs/stm32mp15_common.h | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index 2d98ff41ab..98e96d9e0b 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 */ @@ -666,6 +677,13 @@ int board_init(void) setup_led(LEDST_ON); +#if CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT) + efi_guid_t image_type_guid = STM32MP_FIP_IMAGE_GUID; + + guidcpy(&fw_images[0].image_type_id, &image_type_guid); + fw_images[0].fw_name = u"STM32MP-FIP"; + fw_images[0].image_index = 1; +#endif return 0; } diff --git a/include/configs/stm32mp15_common.h b/include/configs/stm32mp15_common.h index bd8e16bc1b..214901c557 100644 --- a/include/configs/stm32mp15_common.h +++ b/include/configs/stm32mp15_common.h @@ -32,6 +32,10 @@ #define CONFIG_SERVERIP 192.168.1.1 #endif +#define STM32MP_FIP_IMAGE_GUID \ + EFI_GUID(0x19d5df83, 0x11b0, 0x457b, 0xbe, 0x2c, \ + 0x75, 0x59, 0xc1, 0x31, 0x42, 0xa5) + /*****************************************************************************/ #ifdef CONFIG_DISTRO_DEFAULTS /*****************************************************************************/