From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7E6B3C6FA82 for ; Sun, 4 Sep 2022 07:11:57 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 11E5A84001; Sun, 4 Sep 2022 09:11:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="n+WgglEw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8331784001; Sun, 4 Sep 2022 09:11:53 +0200 (CEST) Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0F7D283F4C for ; Sun, 4 Sep 2022 09:11:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-ej1-x62e.google.com with SMTP id cu2so11524464ejb.0 for ; Sun, 04 Sep 2022 00:11:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=Khk8x6l7oX9pK9/WYkHle9eGteVTSGdz1V7ei+mtDl0=; b=n+WgglEwCKKoBzd5y/q+Q4jv2amhkxMGeQdtYQ51Jl6/p7fAq6CvMFUGtr/3zbrY5p xTyOEvF5n7O55Gmi0LBgp8pAtAnBglLZFmQ3FYKaw5qGo3YIWJ6SUkvFQPVlz64Z69YN fZF5RQWGvDsszQRkT53CXJuQplfAk4aE+upnTVYrcOdJ61bTKtXbg79de0uqJ2dlgNsZ 7Ajvc8c8xgQplDlu2qFUt+456Zb54r1ZTQbf+D/3Gha+ZOoDAmzKFPhAQklvTgzffROa +kTk6bYFRJDH0XCt7pimJEC54lTJyQuYiXJ8MtqI2lSI8bHsvFydDMp/pPedlYx9ER1X s3fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=Khk8x6l7oX9pK9/WYkHle9eGteVTSGdz1V7ei+mtDl0=; b=OMeh6ZMeqZi7RXERiiPvVHCteCnGZEXR9nxX2TAfGuG9GqVh/JWgLD8kShtNDsN4vI hFvg0I58mrPcW9ARAHSWLiLwjnZGRtejJULByU+YK9MxilunMagwdjZoy/xbF2gOROzR HOQ9Y0npsqcKaaPZvx/OiLxr19cz5D0ggVNanbOLzF2Et3KNKKznjSRQOlq5leQulbuC f9RG1Di+kelai7IWOuIMDeQLdceqHTX4XvqvErlrF11QM6maAAQ9SQmB8BhCn7oyq9IZ 0tSAWF5Wb2hLbHl+cwyxuD3lZTzCjLb11j87OeZTjX82prlqrzTR8DlnZiGjGZAU3JIY fEqg== X-Gm-Message-State: ACgBeo12TTnaJXeEVEqK4udYj3miz3og1rw1XM5HB3Hgx+4LkQsefxsb wKXJhwMpWY5tJdDMwR8u4gwn4cjENHH+gg== X-Google-Smtp-Source: AA6agR6li3mEHJqiFlCen2wDUx9CtAnj67n1pJxa903Zk+77P7iKSoJRR+bQjXKQmG9Y7eCImy6ZMA== X-Received: by 2002:a17:906:30c8:b0:73c:81a9:f8e1 with SMTP id b8-20020a17090630c800b0073c81a9f8e1mr31592664ejb.649.1662275510603; Sun, 04 Sep 2022 00:11:50 -0700 (PDT) Received: from hera ([46.103.15.185]) by smtp.gmail.com with ESMTPSA id r1-20020a17090609c100b0072af890f52dsm3342072eje.88.2022.09.04.00.11.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Sep 2022 00:11:50 -0700 (PDT) Date: Sun, 4 Sep 2022 10:11:47 +0300 From: Ilias Apalodimas To: Sughosh Ganu Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Takahiro Akashi , Patrick Delaunay , Patrice Chotard , Simon Glass , Bin Meng , Tom Rini , Etienne Carriere , Michal Simek , Jassi Brar Subject: Re: [PATCH v9 05/15] stm32mp1: dk2: Add image information for capsule updates Message-ID: References: <20220826095716.1676150-1-sughosh.ganu@linaro.org> <20220826095716.1676150-6-sughosh.ganu@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220826095716.1676150-6-sughosh.ganu@linaro.org> 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 On Fri, Aug 26, 2022 at 03:27:06PM +0530, Sughosh Ganu wrote: > 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 > --- > Changes since V8: > * Use STM32MP_FIP_IMAGE_GUID for the FIP GUID value as suggested by > Yann > > board/st/stm32mp1/stm32mp1.c | 23 +++++++++++++++++++++++ > include/configs/stm32mp15_common.h | 4 ++++ > 2 files changed, 27 insertions(+) > > diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c > index 9496890d16..bfec0a710d 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,18 @@ 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 = STM32MP_FIP_IMAGE_GUID; > + guidcpy(&fw_images[0].image_type_id, &image_type_guid); > + fw_images[0].fw_name = u"STM32MP-FIP"; > + /* > + * For FWU multi bank update, the image > + * index will be computed at runtime > + */ > + fw_images[0].image_index = 0; > + } > +#endif > return 0; > } > > diff --git a/include/configs/stm32mp15_common.h b/include/configs/stm32mp15_common.h > index c5412ffeb3..bb19dae945 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 STM32MP_FIP_IMAGE_GUID \ > + EFI_GUID(0x19d5df83, 0x11b0, 0x457b, 0xbe, 0x2c, \ > + 0x75, 0x59, 0xc1, 0x31, 0x42, 0xa5) > + > /*****************************************************************************/ > #ifdef CONFIG_DISTRO_DEFAULTS > /*****************************************************************************/ > -- > 2.34.1 > Reviewed-by: Ilias Apalodimas