From patchwork Mon Mar 27 21:14:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 667400 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp1313316wrt; Mon, 27 Mar 2023 14:15:35 -0700 (PDT) X-Google-Smtp-Source: AKy350Z7g7nr8OA/YZsyTEDYP05lCZ2J4NKWN67D4kKR19WbIolyEPJaINMz/VespfuAb/Xpo6gs X-Received: by 2002:a17:903:22d2:b0:19c:dd49:9bf8 with SMTP id y18-20020a17090322d200b0019cdd499bf8mr19720266plg.28.1679951734923; Mon, 27 Mar 2023 14:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679951734; cv=none; d=google.com; s=arc-20160816; b=oCG+f9rP5qwEbnEhpg4Ui9O+sNPCgTWFHm7i7XqRA9vgeWo0/GnGtDV+Xqcmi2PT+A bHcJQYPjb4w2T5sbxBJxAb+QG/P6qYpBzK6EncUSoyaYZ8nOL2qcC6qy6uW/pW5t2Gn2 hGlH4QSjoL0xZ0EbFFrCqsMC5Em77bELyQUr8KRFk9UHYmWHS3d+rQzNYAP115tJhrTV T5J0SXy+MilTJjUeXZNv0V5Vqv3SoSfjLQIjhJLiAt90GLyadmv7dHS2rNUxaIRwEq2N pHH+seKAzKaBvHadEta35nxTQPLaL2B7rneSBZIztlcz14po5wKw6wQWogBMeTDJc6jL 6+iA== 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=1eDsCG4Uw/uuKLynl+mDHhH4Bx3IqFKT1OH2oP/cZx0=; b=V62VktbOS4VEYWAyP+7WBXb51F+5kvsh+tGwtcZ9HGmHq3YIowAJLGWh++IDAzjqWB Cc0mDLJAZZO/5QWk/hBn9augfmMF67oAYLJyD6CddkWIy6h1d89DqxCbfWl60jxY9zG9 PgNZRvbpPk3zvhVK6gXJqHrNkPXcBEZm8TUpGKAHt/I96TtSDEOBXUw1oTY9qBbinSbA +xULyzP1Vvc7JWQv+UPAmr/+cAGLFF3fH82t2HSC6AC9NOn97FwtiouhRGLUMBn/yEZx cpQXgajbpCj0/BGt18DueIXMcggiru9b+iu9gVMSJGdtbtaq4ywuTfezJzRa+s9eHFim nQeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JTZBBkxN; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 g1-20020a170902740100b001a17d7faa05si27220335pll.353.2023.03.27.14.15.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 14:15:34 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JTZBBkxN; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0909A857EC; Mon, 27 Mar 2023 23:15:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="JTZBBkxN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 847E985B70; Mon, 27 Mar 2023 23:15:23 +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,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12e.google.com (mail-il1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) (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 144F480A45 for ; Mon, 27 Mar 2023 23:15:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jassisinghbrar@gmail.com Received: by mail-il1-x12e.google.com with SMTP id h11so5325727ild.11 for ; Mon, 27 Mar 2023 14:15:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679951703; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1eDsCG4Uw/uuKLynl+mDHhH4Bx3IqFKT1OH2oP/cZx0=; b=JTZBBkxNm5TRu3pVlDrAMPwm44MwjnLzXBbkNr1FobKKm3ndjCwFzfHV/5mMGc5XpV QCYi1vaO/tA/NftQ/CkA1fraSe6BmmgFhmEGPTZ04Ho6+90h8F/Q4dJGkVAYsbBVzPGk Ax30lGg410SzWKsVT/RySY0G5qeJFO5x5S9JJjqQ2BZlCdmTrGTVXIxN2Dz5Ue5aaeCE iSzwaHfiFf0uPLSe/qspkbhAuCsusnUfrATJldUgVlmRHkhN23pvVn3w3XfxbPa5PUkm 1za7vFBTcs9KSDQWwi2X0d7rw64Kst3nItdTKx6NXfPss1Y14e6CNOcOUtGLlDzNYgwA 0QMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679951703; 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=1eDsCG4Uw/uuKLynl+mDHhH4Bx3IqFKT1OH2oP/cZx0=; b=hkyCW4LJslrAYXTP1ovLjhhNw1QjHdvaI3GT8G9pduuIOskxqaP/TxuwnotO7bS5pB E3IiNUyBxmfpxgElK9VdhTdOh4Zvn7y3zjSm3oyxmDYPOfYzm+9jETk615fn8YbnIGjq 0QIG68Rn3ENLE2ss773wzW5aRaenY3pFxQHW1T9rZ/MUh62bvdFB/D/08JFz0kIkgISC 8N5gUJif5n3yien+XuFBRLjTGT7c9CAds6aPckrx9BfwHGHlLRTzVaX+ehYN3qdcVJ+o n87bJm5LHkQdO6+LryOzmBfUG2f034Gd2wwwCu7Lfpb6zTD+bYxPsxkx9WcGlAplfWw9 rXkQ== X-Gm-Message-State: AAQBX9ee6CKIZoPzQuwh+PcoWbg1KFnfwFpXiTZA95BIpN1AQg+7FTWw pEdQGP/L1aEma2UNHVav2vlHjUOMNws= X-Received: by 2002:a92:ce0e:0:b0:323:447:2356 with SMTP id b14-20020a92ce0e000000b0032304472356mr10471389ilo.6.1679951702929; Mon, 27 Mar 2023 14:15:02 -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 y15-20020a056e020f4f00b003231580e8e2sm742638ilj.6.2023.03.27.14.15.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 14:15:02 -0700 (PDT) From: jassisinghbrar@gmail.com X-Google-Original-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 v4 0/6] FWU: Add support for mtd backed feature on DeveloperBox Date: Mon, 27 Mar 2023 16:14:58 -0500 Message-Id: <20230327211458.498879-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 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 (3): dt: fwu: developerbox: enable fwu banks and mdata regions configs: move to new flash layout and boot flow fwu: DeveloperBox: add support for FWU Masami Hiramatsu (3): FWU: Add FWU metadata access driver for MTD storage regions FWU: mtd: Add helper functions for accessing FWU metadata 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 | 57 +++ configs/synquacer_developerbox_defconfig | 12 +- doc/board/socionext/developerbox.rst | 155 +++++++- 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 | 34 ++ lib/fwu_updates/Makefile | 1 + lib/fwu_updates/fwu_mtd.c | 164 +++++++++ tools/Kconfig | 9 + tools/Makefile | 4 + tools/mkfwumdata.c | 334 ++++++++++++++++++ 16 files changed, 1115 insertions(+), 11 deletions(-) create mode 100644 board/socionext/developerbox/fwu_plat.c create mode 100644 drivers/fwu-mdata/raw_mtd.c create mode 100644 lib/fwu_updates/fwu_mtd.c create mode 100644 tools/mkfwumdata.c