From patchwork Mon Jul 4 05:16:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 587095 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1ec:0:0:0:0 with SMTP id 12csp499206map; Sun, 3 Jul 2022 22:18:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t+7gA1f+PhPFkn478AGG+0FNuhS3IP4z7xC8Lj3gL7xd/IXFiQhR2kyuN2Ta7BdTEvUyxY X-Received: by 2002:a2e:b61c:0:b0:25c:49f:161 with SMTP id r28-20020a2eb61c000000b0025c049f0161mr5619718ljn.372.1656911913261; Sun, 03 Jul 2022 22:18:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656911913; cv=none; d=google.com; s=arc-20160816; b=Sd9jH1xitQW/uEXOZAQOVi/oc0khr/IZu8M0hXqJlSBs0UrXYM6m1Fv7FyI4DJpsLv hzovLGmyA4VnxPoabxMgAntGZkQpXo54iRSKdi8WNC5FsCyrAlPtOZYW0hZK+Po+snot 3vSyoG7B8BJrwMuERrqUq1DI7Q7+RrRYiAsqQa8ZFC5ojVkgM+7lnUeaZ3rZevLnK4ey Ly6JzjgZZI+6ZMH0orhklFm6wY7YjSP7HdIYktxWZ3SiQtRgGieKGD19EP2Af/dwt5rK L4ZP2fIuTvOfOwSQEZjvPnKMyEYt7Hjl12UGI2x5yBmDAyxiLFIDI8otKBbqEB5LDmyh 2abw== 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=Qv3zwYF7+Sv+mKCX4uM/ZztasfRfOVP/chyC8dT62mY=; b=ZrUVXvfyXidJhWZzY/jmL9CntB2Ao3Dcq4mS8Og47y54Dp2T1jKIwVmFyo0p8a0QXB 5X6dhAPXyIwYoe+ZxvME+riCe2hp743JTQ30ncVYUtDCuUu2ChWxOzxn6qQn4jhqPYnK dqS50Mu+ZOGJtII4dAw8pEchZTNwwDIoq1aHkEjRxSKy9CCu7UZ7BI4FhHLc/BfQIVEX PRSeBOefHs52NbVGskNdXLBRai6lzb+/JkUkGwUUbF5GjEvJ4qWMBNEb+Gez94+MXuAf Mc/YAD/CSN00QDOURXumApYxSMVDK6Vx32VcJuz5+TpzcT6HRQPHbfvV6VAOJiWpu9+U gflQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id bq33-20020a056512152100b0048125b851bdsi20183992lfb.380.2022.07.03.22.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jul 2022 22:18:33 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 0B3EA84521; Mon, 4 Jul 2022 07:17:55 +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 D53D484521; Mon, 4 Jul 2022 07:17:53 +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 BC2738451A for ; Mon, 4 Jul 2022 07:17:51 +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 50D6A23A; Sun, 3 Jul 2022 22:17:51 -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 5ACFA3F66F; Sun, 3 Jul 2022 22:17:47 -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 v6 05/13] stm32mp1: dk2: Add image information for capsule updates Date: Mon, 4 Jul 2022 10:46:50 +0530 Message-Id: <20220704051658.1085442-6-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220704051658.1085442-1-sughosh.ganu@linaro.org> References: <20220704051658.1085442-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 --- Changes since V5: None 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 07b1a63db7..c6bb7562f6 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -92,6 +93,16 @@ DECLARE_GLOBAL_DATA_PTR; #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 */ @@ -675,6 +686,14 @@ int board_init(void) setup_led(LEDST_ON); +#if CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT) + if (board_is_dk2()) { + efi_guid_t image_type_guid = STM32MP1_DK2_FIP_IMAGE_GUID; + guidcpy(&fw_images[0].image_type_id, &image_type_guid); + fw_images[0].fw_name = u"STM32MP1-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 6b40cdb017..6a1ae9788d 100644 --- a/include/configs/stm32mp15_common.h +++ b/include/configs/stm32mp15_common.h @@ -54,6 +54,10 @@ #define CONFIG_SYS_AUTOLOAD "no" #endif +#define STM32MP1_DK2_FIP_IMAGE_GUID \ + EFI_GUID(0x19d5df83, 0x11b0, 0x457b, 0xbe, 0x2c, \ + 0x75, 0x59, 0xc1, 0x31, 0x42, 0xa5) + /*****************************************************************************/ #ifdef CONFIG_DISTRO_DEFAULTS /*****************************************************************************/