From patchwork Mon Apr 10 23:01:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 672039 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp494464wrx; Mon, 10 Apr 2023 16:02:22 -0700 (PDT) X-Google-Smtp-Source: AKy350bgAlHqtKHxcEyJ2uAJiP3mva/qeqQwtt3LCfAVIPLSLHsgXxANen1wYtgKV6KLywUH8egP X-Received: by 2002:ac8:4e81:0:b0:3e4:e61d:5eeb with SMTP id 1-20020ac84e81000000b003e4e61d5eebmr22928445qtp.6.1681167741453; Mon, 10 Apr 2023 16:02:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681167741; cv=none; d=google.com; s=arc-20160816; b=DO7L/eiIQu9MEY0BWVhNY21V+7B8evTnW5UlJFDAQAi7yrnNCVtK7CiDLYZLJ5dTtW 7u3fplIsqJIea5xq5WuAew+G/TpHO2J/h8TDgOlk3N2VoR90RGgqaCWe8WFnWB0RO56i LVTcszJTos4nuuop//7b4nRpEfc6gcc+4AhgHLpgzLoPk6anJQApdtqNP4H5RUyUKFac DWCkhS1t/Q2DbO0gE14qG07BsTfpvuz6ilfxHLTzhIlXYrAzS/JkKbTW8DsQRV7D/m+T lKexeMfvcyj4+YehwXuamDVwmBT9arHjKE/oZemWdGYXUTCutZGMb3qxhYhhe8hLr3NT 4xLg== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=ZPy/2sDJJprKSZAWjAVHqVHoXNTWYQOgV+UcKEDkdmw=; b=FZza/yT2KyNNYkKpOeQNgqxduQXZbLlG0vBt6hrrZBIz/k+ciVeZwEUvWqpi4s3LjL +v+tfOdm5yND2vjsbe7C9io5FzyoeJLsamtfb/au8GKXSH9XidGS5sYOSUSyIKPHmzNO tVl5/LNUfc4ARQp+6u6RQpABg+g2PR8gxDiXs5ZxF5AQNH7hRgM1MhJimifmXQAjgMHt b95/nVwr9dzGzgvU+Id0TvxiXjahieHgGcYpg1FAmkr3UflfyuLUFJeC17ycQXqI85o0 aTQzqkfPTxZ7ScUnUYZKM9g6KFkmeEjrceUn9uBXqjndKxnmbcTbzmtmD71Z+uXh3IZX KHEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z6lahP6V; 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=pass (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 b2-20020ac87fc2000000b003e6a1032dd4si3004132qtk.169.2023.04.10.16.02.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 16:02:21 -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; dkim=pass header.i=@linaro.org header.s=google header.b=z6lahP6V; 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=pass (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 540AE8339E; Tue, 11 Apr 2023 01:02:15 +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="z6lahP6V"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CA0DF85CD8; Tue, 11 Apr 2023 01:02:12 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) (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 974DC815D4 for ; Tue, 11 Apr 2023 01:02:08 +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=jaswinder.singh@linaro.org Received: by mail-yb1-xb30.google.com with SMTP id bv15so4447119ybb.1 for ; Mon, 10 Apr 2023 16:02:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681167727; x=1683759727; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ZPy/2sDJJprKSZAWjAVHqVHoXNTWYQOgV+UcKEDkdmw=; b=z6lahP6Vxugg1/eEV3ViE0I9J2TJsIRVO6VrVLKczkHKefFdwQ05uLQzTrF8QJVnPU +xbNdasMfQTbGZLRyuf/sWdqk/eiYIS7uLBywcC0IVKX0hJqnngbH/PFxJ2/FX06WIw0 Hm9dx/yIy6VPVp7xB2MEZHxNS+BUPGAqTej86cOmj3VJfspEZZxwMvqIRBqEV0BpKJ8N YWUN2lu/dfz+S2z47vpwBHIHkWOfFmucJVMosqi9XhtnQ+zdwbIyZLauTXPAu5hxiRU2 rsx/q5m4oMDDXDcS/IiRyigw1rWUO0TPvHc+YHDOSyIF+gqvbXjdUDjIUIygUNgx5wYo wbZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681167727; x=1683759727; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZPy/2sDJJprKSZAWjAVHqVHoXNTWYQOgV+UcKEDkdmw=; b=jF6NcszLnbCnUM+QkA4LmvnZP+jOVVYetiYyptgHxOjbuh9P/FN8wTYnmpGyhLGD6L Q4q3Wo5SVj6LK2LERY2BvBGM2aD2RDTOPnJ1DmPckdOHFKilkH4YPQoEdr+TafvaJI6D C57xcLxyGkYf9A/z9qHEa3WDmxGJPIYSUMDQ/odHeUTxv93ZFXsd0L8dawArGOWaohOt GH9jQuLe2R/HdpVPJg6I3H6fLUEA8vPEuHZyDFFDaqD8UYbI/TNc8cwYOgXcE2ah274Z tSgdE0DfqpRvJW+eK4pX6zEKL87DjslY/6KVlltrspZ+wIoN1r4HEO8cmzr9F5MYKldo weiQ== X-Gm-Message-State: AAQBX9f0BLvNnj9lZ3F5lL/ccIZGjmFuy4MmOAs0g6WFuFSPxj7qF7BZ E/2h7XfmZaIPVlojYknrhKpr92xWIjLv1D7OLTE= X-Received: by 2002:a25:1844:0:b0:b8b:f649:b023 with SMTP id 65-20020a251844000000b00b8bf649b023mr9466343yby.55.1681167727053; Mon, 10 Apr 2023 16:02:07 -0700 (PDT) Received: from jassi-desktop.. (wnpgmb0311w-ds01-45-177-228.dynamic.bellmts.net. [206.45.177.228]) by smtp.gmail.com with ESMTPSA id i4-20020a25d104000000b00b8bcaf1e660sm3266232ybg.4.2023.04.10.16.02.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 16:02:06 -0700 (PDT) From: jaswinder.singh@linaro.org To: u-boot@lists.denx.de Cc: ilias.apalodimas@linaro.org, etienne.carriere@linaro.org, trini@konsulko.com, sjg@chromium.org, sughosh.ganu@linaro.org, xypron.glpk@gmx.de, takahiro.akashi@linaro.org, michal.simek@amd.com, Jassi Brar Subject: [PATCH v5 0/6] FWU: Add support for mtd backed feature on DeveloperBox Date: Mon, 10 Apr 2023 18:01:43 -0500 Message-Id: <20230410230143.72556-1-jaswinder.singh@linaro.org> X-Mailer: git-send-email 2.34.1 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.8 at phobos.denx.de X-Virus-Status: Clean From: Jassi Brar Introduce support for mtd backed storage for FWU feature and enable it on Synquacer platform based DeveloperBox. This revision is rebased onto patchset that trims the FWU api https://lore.kernel.org/u-boot/20230306231747.1888513-1-jassisinghbrar@gmail.com/ Changes since v4: * Provide default/weak implementations of fwu_plat_get_alt_num and fwu_plat_get_bootidx * Provide man page for mkfwumdata * Misc typo fixes and cosmetic changes Changes since v3: * Fix and Update documentation to also build optee for FWU FIP image. * Fixed checkpatch warnings * Made local functions static. * Split config changes to a separate patch * Fix authorship of three patches. Jassi Brar (4): dt: fwu: developerbox: enable fwu banks and mdata regions configs: move to new flash layout and boot flow fwu: DeveloperBox: add support for FWU fwu: provide default fwu_plat_get_bootidx Masami Hiramatsu (2): FWU: Add FWU metadata access driver for MTD storage regions tools: Add mkfwumdata tool for FWU metadata image .../synquacer-sc2a11-developerbox-u-boot.dtsi | 49 ++- board/socionext/developerbox/Makefile | 1 + board/socionext/developerbox/developerbox.c | 8 + board/socionext/developerbox/fwu_plat.c | 37 ++ configs/synquacer_developerbox_defconfig | 12 +- doc/board/socionext/developerbox.rst | 155 +++++++- doc/mkfwumdata.1 | 89 +++++ drivers/fwu-mdata/Kconfig | 15 + drivers/fwu-mdata/Makefile | 1 + drivers/fwu-mdata/raw_mtd.c | 272 ++++++++++++++ include/configs/synquacer.h | 10 + include/fwu.h | 32 ++ lib/fwu_updates/Makefile | 1 + lib/fwu_updates/fwu.c | 18 + lib/fwu_updates/fwu_mtd.c | 185 ++++++++++ tools/Kconfig | 9 + tools/Makefile | 4 + tools/mkfwumdata.c | 334 ++++++++++++++++++ 18 files changed, 1221 insertions(+), 11 deletions(-) create mode 100644 board/socionext/developerbox/fwu_plat.c create mode 100644 doc/mkfwumdata.1 create mode 100644 drivers/fwu-mdata/raw_mtd.c create mode 100644 lib/fwu_updates/fwu_mtd.c create mode 100644 tools/mkfwumdata.c