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 4B2C7C433EF for ; Thu, 17 Feb 2022 15:11:32 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 17C0C83B7A; Thu, 17 Feb 2022 16:11:29 +0100 (CET) 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="Z69U3jUJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 81D7A83B7D; Thu, 17 Feb 2022 16:11:27 +0100 (CET) Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (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 3D21C83B62 for ; Thu, 17 Feb 2022 16:11:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masami.hiramatsu@linaro.org Received: by mail-pl1-x636.google.com with SMTP id l9so4880286plg.0 for ; Thu, 17 Feb 2022 07:11:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=2ADetDJ+4iqZRkhdhqPibv8wDaMHbiAkByFdP5L173Y=; b=Z69U3jUJNY8sWj5vXZD7wNMfvc3K1xS1SLLMwXjKllQ43iRScBmUM6151gt6sxYJma owxbhFc1GZxCc9AMv2qesicVuT7Dp3YpygNyLXjjFyRvZ/ncyp5eTW8AYwfof81KSnYz M6rAvjlhS4b7JM9hFXt5syPyjYsiyCz0yLYDlQE5MES+H6ZH96JopHfXrHz+KV4Gxtn2 Mna5h6RFchavUc8sk4670JpomAeFXmbdGJaLz+K0oWZpJjfe476UFE/wJJIGmz/+5zN0 FiWeDl5O3r6X//fICvPqGbRjZVvvpt3lTVjbrJPRre7r9lOuc512gQ/l796Tbv/sUz0f 2kJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=2ADetDJ+4iqZRkhdhqPibv8wDaMHbiAkByFdP5L173Y=; b=d3bOcMBFoBOFMFPAzPDG3jBteoeJKlf9WfbvhvP/xCLjihNaPHaB/377OhMRYmwqzB 9joJV0wfkL06Pd2qfaOvDLofoQlfxrCIh15UynOsTvwAw4IwGGq8engRsfWaWorZKvdQ j6YMMIgeWTiFQ2ThCoo5iuSk7aFDonn0Ntzc5R/9CaGNzoX6zLt9aS6InRGhRL0Ckcvz 0l3I8zbXGXOLlPMwOJLIC91WQ/OQToBOgPQY9E/fmERT39Oi+akO+xrEMctfrWIpi92I hTlOwWC4w6wBvJgFQO0L/iIAqm928Rz5pN+WKJW/d5z1b9gz0tmUiu9gln57bhcwlLf3 aY5w== X-Gm-Message-State: AOAM533xx9MvPxODqA4+m2kMLhN0I/G4S7ca2AmvMH1Ql01y2rgEdje6 OZmcfTWoBRBKgYL3BsOUSot/v0iXtsxK+A== X-Google-Smtp-Source: ABdhPJxCce6nEy6rb79/hFAx4OdyqA0rGJg5eNUR/kOBp3VeDndBAyVTFbxPRX7bclBDjIa8QI2puA== X-Received: by 2002:a17:903:1210:b0:14e:e194:2f2c with SMTP id l16-20020a170903121000b0014ee1942f2cmr3232694plh.130.1645110681093; Thu, 17 Feb 2022 07:11:21 -0800 (PST) Received: from localhost.localdomain (113x37x226x201.ap113.ftth.ucom.ne.jp. [113.37.226.201]) by smtp.gmail.com with ESMTPSA id z14sm94901pfe.30.2022.02.17.07.11.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 07:11:20 -0800 (PST) From: Masami Hiramatsu To: u-boot@lists.denx.de Cc: Masami Hiramatsu , Patrick Delaunay , Patrice Chotard , Heinrich Schuchardt , Alexander Graf , AKASHI Takahiro , Simon Glass , Bin Meng , Ilias Apalodimas , Jose Marinho , Grant Likely , Tom Rini , Etienne Carriere , Sughosh Ganu , Paul Liu Subject: [RFC PATCH v2 0/8] FWU: Add FWU Multi Bank Update for DeveloerBox Date: Fri, 18 Feb 2022 00:11:16 +0900 Message-Id: <164511067605.43219.15508992404634142079.stgit@localhost> X-Mailer: git-send-email 2.25.1 User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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.5 at phobos.denx.de X-Virus-Status: Clean Hi, Here is the 2nd version of RFC series of patches for the FWU Multi Bank Update support for the DeveloperBox platform. This series depends on Sughosh's Multi Bank Update v4 [1]. [1] https://lore.kernel.org/all/20220207182001.31270-1-sughosh.ganu@linaro.org/T/#u Unlike the STM32MP board, DeveloperBox (SynQuacer) loads the firmware from SPI NOR flash. Thus it doesn't use GPT partitions to store the firmware banks and the FWU metadata. Instead, it stores those data at fixed address areas on SPI NOR flash. I carefully chose the areas which doesn't overlap the previous firmware and EDK2. This adds FWU metadata SF driver for this FWU multi bank support on SPI flash without GPT. This is identified by "u-boot,fwu-mdata-sf". The last patch adds the DT bindings in YAML. Since there is no GPT, the location GUID for images and the image GUID for banks are Null GUID. I will fix this with uuid property for fixed-partition devicetree afterwards. And the SynQuacer also does not have any non-volatile register. Thus this allocates the platform defined boot index on the SPI flash too. NOTE: To use this series, you also need to update SCP firmware[2] and TF-A[3] on the DeveloperBox. Those are under cleaning up. [2] https://git.linaro.org/people/masami.hiramatsu/SCP-firmware.git/ [3] https://git.linaro.org/people/masami.hiramatsu/arm-trusted-firmware.git/ Thank you, --- Masami Hiramatsu (8): FWU: Calculate CRC32 in fwu_update_mdata() FWU: Free metadata copy if gpt_get_mdata() failed synquacer: Update for TBBR based new FIP layout dt/bindings: firmware: Add FWU metadata on SPI flash binding FWU: Add FWU metadata access driver for SPI flash FWU: synquacer: Add FWU Multi bank update support for DeveloperBox FWU: synquacer: Initialize broken metadata configs: synquacer: Add FWU support for DeveloperBox .../dts/synquacer-sc2a11-developerbox-u-boot.dtsi | 33 ++ board/socionext/developerbox/Kconfig | 24 ++ board/socionext/developerbox/Makefile | 1 board/socionext/developerbox/fwu_plat.c | 238 ++++++++++++++++ configs/synquacer_developerbox_defconfig | 12 + .../firmware/fwu-mdata-sf.yaml | 38 +++ drivers/fwu-mdata/Kconfig | 9 + drivers/fwu-mdata/Makefile | 1 drivers/fwu-mdata/fwu-mdata-uclass.c | 57 +--- drivers/fwu-mdata/fwu_mdata_gpt_blk.c | 49 ++- drivers/fwu-mdata/fwu_mdata_sf.c | 294 ++++++++++++++++++++ include/configs/synquacer.h | 14 + include/fwu.h | 2 13 files changed, 698 insertions(+), 74 deletions(-) create mode 100644 board/socionext/developerbox/fwu_plat.c create mode 100644 doc/device-tree-bindings/firmware/fwu-mdata-sf.yaml create mode 100644 drivers/fwu-mdata/fwu_mdata_sf.c -- Masami Hiramatsu