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 42BA1C433EF for ; Tue, 8 Feb 2022 13:45:43 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C0B7E83CA5; Tue, 8 Feb 2022 14:45:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="bxBhmmX9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 59E2A83CC9; Tue, 8 Feb 2022 14:45:38 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2062c.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e89::62c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D3CF683C81 for ; Tue, 8 Feb 2022 14:45:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michals@xilinx.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GB0L4o5MKp+j0xwQD5WO+IyoyhgtlSemQS6HP7hV6NjTA/FuU5HyU5wDDViRfK0jy5JDg9h1vvNJWnvtpQ3b4CtBK25Ek2d9wybzHJriIJjj1QPQjx9jn5nrDVxLekUeHc/AdCSkGrl3ciX90z71YSaSZjN1U+c3qp3gNygq6b6QHIaAP+v64LAqOJ0EiLzXz9l1oj26PYGRanlhDUKMOaGeL/KyYAh86zQ3ooK0CfxJI/X5mF5Yyhe87zSz1gSRh8siS9tlcF/Hyoyl9Gthz4c1+0kS8chEqdZCpknfvh8qfplAox1/b4HlwReg8E0KbWq40RDmEpB6igpMmgRO/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0Jz/ZD8HO8QVn+xykoaaqI9Kh+QGu39EUZKbAg4tZZY=; b=BtFX5QwqSBlxAuKb/GQCY02tND58f3lS1bef5QCbECcOrwVAa1YrkYUXjujJlEVYwjiLkdqkc5lOedhB0+5Cq94HzeCbM6Vj7B/cHGZOc40QwJzndDo4ujX6j+571w6TpNPVpyvsxwoXUqmRniRs+SG4b4xcbkC0P4pEQRAq28oZoymjCX5iGZr2ACm9vTPiwJ5B5tIeqwY7nTnmVKejNYwJlcNfATpKDkWgha3tMk74alSrYB+2mLXzXGUb+mmlRq8LrZmlcq0PMQNtVGG4wnXIrV5ijE6C90rIAkG7Jtak/iMhHqkFZbo7J8ndS/dA6Pp80XAsYhSbP4cshBkgEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=linaro.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0Jz/ZD8HO8QVn+xykoaaqI9Kh+QGu39EUZKbAg4tZZY=; b=bxBhmmX9mpv8VOpLtM5qgyjWOk4cKA9s0wKHG6SzCE8Vluv5SM2ZTUo3zZD7jPZAwPczB/mG2pX2G0JQuSc9w+xDMoQ+e7SyTRjHcr6oSmWWEUX1lMkP411V6Y80oM9UHuIyZnfMTFgYP/BYrslSqH62tav7QGWIOJtFS7EKbfQ= Received: from DM6PR06CA0089.namprd06.prod.outlook.com (2603:10b6:5:336::22) by MN2PR02MB6847.namprd02.prod.outlook.com (2603:10b6:208:1d4::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Tue, 8 Feb 2022 13:45:30 +0000 Received: from DM3NAM02FT017.eop-nam02.prod.protection.outlook.com (2603:10b6:5:336:cafe::f5) by DM6PR06CA0089.outlook.office365.com (2603:10b6:5:336::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12 via Frontend Transport; Tue, 8 Feb 2022 13:45:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch01.xlnx.xilinx.com; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by DM3NAM02FT017.mail.protection.outlook.com (10.13.5.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4951.12 via Frontend Transport; Tue, 8 Feb 2022 13:45:29 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Tue, 8 Feb 2022 05:45:11 -0800 Received: from smtp.xilinx.com (172.19.127.96) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Tue, 8 Feb 2022 05:45:11 -0800 Envelope-to: masami.hiramatsu@linaro.org, sughosh.ganu@linaro.org, monstr@monstr.eu, u-boot@lists.denx.de, xypron.glpk@gmx.de, patrick.delaunay@foss.st.com, patrice.chotard@foss.st.com, agraf@csgraf.de, takahiro.akashi@linaro.org, sjg@chromium.org, bmeng.cn@gmail.com, ilias.apalodimas@linaro.org, jose.marinho@arm.com, grant.likely@arm.com, trini@konsulko.com, etienne.carriere@linaro.org Received: from [10.254.241.49] (port=47338) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1nHQnv-0002A0-8M; Tue, 08 Feb 2022 05:45:11 -0800 Message-ID: <65f6245e-3122-60da-8aad-2e85e90370ae@xilinx.com> Date: Tue, 8 Feb 2022 14:45:06 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH v4 01/11] FWU: Add FWU metadata structure and driver for accessing metadata Content-Language: en-US To: Masami Hiramatsu , Sughosh Ganu CC: Michal Simek , U-Boot , Heinrich Schuchardt , Patrick Delaunay , Patrice Chotard , Alexander Graf , AKASHI Takahiro , Simon Glass , Bin Meng , Ilias Apalodimas , Jose Marinho , Grant Likely , Tom Rini , Etienne Carriere , Michal Simek References: <20220207182001.31270-1-sughosh.ganu@linaro.org> <20220207182001.31270-2-sughosh.ganu@linaro.org> From: Michal Simek In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f473313a-cd66-49be-ee91-08d9eb09455b X-MS-TrafficTypeDiagnostic: MN2PR02MB6847:EE_ X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: stlvUjqQCLfGvApU/Q+Tgmwa9MK+EKB8s6L46ugVrI8UNFf5LTUkERv2QZAs9fuY6wdqsA/5iNDG8q6zIMPdnwNphOrUU/OsXvU+9O8CWPvgNjYamxmxphBCgSCAbX6tPw0dY+h83xwm2FE5/+mazJsnImvd5k+bYH0bG5SLwmw9o5krvMlsf4WxtcsLSWSaWIRdkJ3PfNxNKp0peUQhN/X9G0StYqtJvKUJ7/WF56yi7GwtA8MRh7n3ihmyKxAYYl3s/rzk2eD+C/GCRmKn0s3LyzzCWCXjsqEx+xuOsOrFkHebLuepK0vZiNYERJH8zfczoTcbW+v2EUVQoROPUPz0Kfax0WoKW0hSzIKyC9i4/7fIjGjX+gOTx7GxJ8VXaI9iQ0qwHig3E9PMnYYkrom9+pFbYd/5C9CKw0vATvxl76UMTDCVSaTiR1oPOT4Jc5mnPm6X1n37AOadDHsuRKe0dKaxSDRKZHaoOQKsY+uPKXjlBkuJb4q+tHxmatPGsfIIXHIFtEyCNrzFrm8xH+OVRMXFZrtCESDPhq4W+4a2fBlu98WE9GjjVyPOjvLOmQwHIjU3Y5CEbfYnsWacQFsIijKv2YYL7ZBI3AMbGFY+WW51FS4g4W4GXDgFVHEXn7ca0g/qqjvQk9c37a3Xb3z0HdSfjeEHK/IVxybRIJ0s+77Rx9KcCXWzXukVV37HRj+5PBRS+tmAKoZ4qOyKtw== X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch01.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(46966006)(26005)(36756003)(107886003)(186003)(82310400004)(336012)(47076005)(66574015)(31686004)(2906002)(426003)(53546011)(110136005)(356005)(6666004)(4326008)(316002)(9786002)(44832011)(31696002)(8936002)(5660300002)(83380400001)(70586007)(508600001)(54906003)(70206006)(7416002)(2616005)(7636003)(8676002)(36860700001)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2022 13:45:29.9584 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f473313a-cd66-49be-ee91-08d9eb09455b X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.62.198]; Helo=[xsj-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: DM3NAM02FT017.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR02MB6847 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 On 2/8/22 14:36, Masami Hiramatsu wrote: > 2022年2月8日(火) 20:35 Sughosh Ganu : >> >> On Tue, 8 Feb 2022 at 16:26, Michal Simek wrote: >>> >>> po 7. 2. 2022 v 19:21 odesílatel Sughosh Ganu napsal: >>>> >>>> In the FWU Multi Bank Update feature, the information about the >>>> updatable images is stored as part of the metadata, which is stored on >>>> a dedicated partition. Add the metadata structure, and a driver model >>>> uclass which provides functions to access the metadata. These are >>>> generic API's, and implementations can be added based on parameters >>>> like how the metadata partition is accessed and what type of storage >>>> device houses the metadata. >>>> >>>> A device tree node fwu-mdata has been added, which is used for >>>> pointing to the storage device which contains the FWU metadata. The >>>> fwu-mdata node is u-boot specific, and can be added the platform's >>>> u-boot dtsi file. >>>> >>>> Signed-off-by: Sughosh Ganu >>>> --- >>>> >>>> Changes since V3: >>>> * Move the FWU metadata access to driver model >>>> * Get the storage device containing the metadata from a device tree >>>> property instead of a platform helper function >>>> >>>> arch/arm/dts/stm32mp157c-dk2-u-boot.dtsi | 7 + >>>> .../firmware/fwu-mdata.txt | 18 + >>>> drivers/Kconfig | 2 + >>>> drivers/Makefile | 1 + >>>> drivers/fwu-mdata/Kconfig | 7 + >>>> drivers/fwu-mdata/Makefile | 6 + >>>> drivers/fwu-mdata/fwu-mdata-uclass.c | 434 ++++++++++++++++++ >>>> include/dm/uclass-id.h | 1 + >>>> include/fwu.h | 51 ++ >>>> include/fwu_mdata.h | 67 +++ >>>> 10 files changed, 594 insertions(+) >>>> create mode 100644 doc/device-tree-bindings/firmware/fwu-mdata.txt >>>> create mode 100644 drivers/fwu-mdata/Kconfig >>>> create mode 100644 drivers/fwu-mdata/Makefile >>>> create mode 100644 drivers/fwu-mdata/fwu-mdata-uclass.c >>>> create mode 100644 include/fwu.h >>>> create mode 100644 include/fwu_mdata.h >>>> >>>> diff --git a/arch/arm/dts/stm32mp157c-dk2-u-boot.dtsi b/arch/arm/dts/stm32mp157c-dk2-u-boot.dtsi >>>> index 06ef3a4095..3bec6107f7 100644 >>>> --- a/arch/arm/dts/stm32mp157c-dk2-u-boot.dtsi >>>> +++ b/arch/arm/dts/stm32mp157c-dk2-u-boot.dtsi >>>> @@ -4,3 +4,10 @@ >>>> */ >>>> >>>> #include "stm32mp157a-dk1-u-boot.dtsi" >>>> + >>>> +/ { >>>> + fwu-mdata { >>>> + compatible = "u-boot,fwu-mdata"; >>>> + fwu-mdata-store = <&sdmmc1>; >>>> + }; >>>> +}; >>>> diff --git a/doc/device-tree-bindings/firmware/fwu-mdata.txt b/doc/device-tree-bindings/firmware/fwu-mdata.txt >>>> new file mode 100644 >>>> index 0000000000..c766b595ef >>>> --- /dev/null >>>> +++ b/doc/device-tree-bindings/firmware/fwu-mdata.txt >>>> @@ -0,0 +1,18 @@ >>>> +FWU Metadata Access Devicetree Binding >>>> + >>>> +The FWU Multi Bank Update feature uses a metadata structure, stored on >>>> +a separate partition for keeping information on the set of updatable >>>> +images. The device tree node provides information on the storage >>>> +device that contains the FWU metadata. >>>> + >>>> +Required properties : >>>> + >>>> +- compatible : "u-boot,fwu-mdata"; >>>> +- fwu-mdata-store : should point to the storage device which contains >>>> + the FWU metadata partition. >>> >>> In 0/11 you are describing GPT partitions but I don't think this >>> binding is generic enough to describe >>> other cases. It is saying device but not where exactly it is. >>> I didn't read the whole series yet but arm spec recommends GPT but dt >>> binding should be generic enough to describe >>> also other cases. >>> We are saving this structure to qspi for example but current binding >>> can't be used for it. >> >> I would wait to see Masami's implementation of this feature. If I am >> not wrong, his platform too is enabling this feature with a spi as the >> storage device. Maybe we can instead put a list of >> tuples which can then list the device and partition number of the >> metadata partitions. > > Yes, I would like to define new compatible for sf backend, e.g. > "u-boot,fwu-mdata-sf". backend is fine. What does this compatible string have to do with it? I didn't see any fwu-mdata-gpt in this series. > It will have the fwu-mdata-store to point the SPI flash device, and > will have a list of offset information for the metadata. Can you describe it? Something like for raw accesses? fwu-mdta-store = <&qspi 0 XXXX>; Thanks, Michal