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 E0863C64EC7 for ; Tue, 28 Feb 2023 10:50:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7BFC485AC8; Tue, 28 Feb 2023 11:50:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.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=amd.com header.i=@amd.com header.b="f7C3MtsL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7A0D885AC3; Tue, 28 Feb 2023 11:50:18 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on20631.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e8b::631]) (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 80086856B7 for ; Tue, 28 Feb 2023 11:50:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=michal.simek@amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XXLViUpXhdv/qhPbcgNKqhwYmXflOXLK7Sn4YzkrSv080lPAWk9wuE+RVXKzmtNb10pA4QN8rXXTMmGtV8ov1lQZkTXKLUOlqRcf3iGDszqO2rQ7QbEex9qKb1a4RuXd4NGfOy5k+t2YvpuYHS+7y1oiyazx2H7GFzDL3cKYIZJ3Pis7P2eZVuhKQLpQs+xfeFNTQDOgMFUbWRckOdcckwazZYtumZFpOnJx1h0oPshf0MyXIzxKyMGRg43/A+OyqKKGK6WsXHzO4b9zf6q0VorH8Qu6dvOT98S6sYdrEd6H+j2+Prg9bjSO+6FXZPg5HCXzQZokuTgx4ymIBaOCZg== 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=PO6tWTxoKSJtdIAle1kM3nkzG5sZCSfgeFntTzaJbKQ=; b=n/qR2ysZ+aw/vLGtrEKD9Sc6XbqsARTn+HqDvq4iH6dyDSdmnrhfCbIS4qyVIHwjxiHapYiPKhrLquSq6whb7+ncGiKvTyEAiyB5EJJa6Ik2bQcPjJ4kVS31IjUM0IrjoLaZcfzdk3GgjGCZ3qH2rZMX5DH+3ofj6OAeQe7pZjLMPrAsN7U6jn2fK1rL6uTVgWdzXlR2rKNTWHgIglvgxD6KrOqEJ/5KbpOOhD8T9+IphOpDZ51v7cb7DOjpQX5IDBBgSLS44suIXAPIKx3HAQaHw9LB0CjQ80SwzjM0DcdmOoVFZGn39o8IcsftbeMs0KzBNf9V0+EZsAXnwkOvDA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PO6tWTxoKSJtdIAle1kM3nkzG5sZCSfgeFntTzaJbKQ=; b=f7C3MtsLf22SJXafWlAA3amuxkN6/0xgv9wyOV7CIcPigfbTdFGayJ7kEqRULXVT8BgOwwBAXdx7eaHtbiHEl1Sr8KSjtX08CiGTntFKfZNB6pu3HAQgpNkjgci9x9uXvY6miH3CUIAPNEft/CNGczpulusl3YU+kfGC3woo0QM= Received: from DM5PR07CA0080.namprd07.prod.outlook.com (2603:10b6:4:ad::45) by IA0PR12MB8647.namprd12.prod.outlook.com (2603:10b6:208:480::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.29; Tue, 28 Feb 2023 10:50:08 +0000 Received: from DM6NAM11FT077.eop-nam11.prod.protection.outlook.com (2603:10b6:4:ad:cafe::cb) by DM5PR07CA0080.outlook.office365.com (2603:10b6:4:ad::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.30 via Frontend Transport; Tue, 28 Feb 2023 10:50:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT077.mail.protection.outlook.com (10.13.173.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6156.17 via Frontend Transport; Tue, 28 Feb 2023 10:50:07 +0000 Received: from [10.254.241.51] (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Tue, 28 Feb 2023 04:50:03 -0600 Message-ID: <41d08ed0-dc32-02c1-4813-4c5d11ac050e@amd.com> Date: Tue, 28 Feb 2023 11:49:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: , CC: , , , , , , , , Jassi Brar References: <20230228005135.1635726-1-jassisinghbrar@gmail.com> <20230228005218.1635781-1-jassisinghbrar@gmail.com> From: Michal Simek Subject: Re: [PATCH v5 1/6] dt/bindings: fwu-mdata-mtd: drop changes outside FWU In-Reply-To: <20230228005218.1635781-1-jassisinghbrar@gmail.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT077:EE_|IA0PR12MB8647:EE_ X-MS-Office365-Filtering-Correlation-Id: 1f70288c-9523-4bb3-1fc1-08db19798ec3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6BkN4NYXvwoqLBtYSkVMUQOB8yoZh2zfyRLUHOfjiuFH7aOqpDhL79RiALWT+h/E7OK9QAfazbWrqyZ83QQoQoTlCS77f75wKak56Ywq1VlxPwShKmEqn2vLDrY/RigW2LzQilDE8CVAjmYqXfQvZPiykZIOxgVa4g+MsDUpv/f4Tsw+VqZl8MFvDscaP/G7NWdUUREgtB27Hqbo8SvVSCvpjahEH5Q+KOsTcEsBpy+NJWDiuSVIPZw/me+YdZs6vL5V7OUdk7A0GbsUvWX/sqphOwt5ViZ/e7dH5FeEHGtVSSyA0nNvH7p444pqELv0Onms/0ibN411PS9cy0Z9G4ITdhcp1BAsZqzu4uAcg3/UP+cbQ+ubzSxRy4FN3VfAPJeT1ZyTry2wXWgRlwkExKhKMh1ipfrpbIfWgiZA5B+Y18edPR7p1apOP0BRJIVSp1bW8KTex8/wqX4rYUOICBDmuGvgXmIdShVqw1yGEH+60W53a3yItSSZDMrkZDycCS8AQHSTtWp3N8L7lI28TgiHvaH3pvzO91eo/2NPyx02muiROFVk9IteNwVLp3sm70A//6grpIp0v/9RZf+nwN82qI86G3FViG+HxF3fwE20TsvmAHegmowRhjALT3CXNOlx5T4uwEDvB8kmbkJDm6aozjXHfb9XDHAYw02wRIMvoUi8TB3/1udTAPy/sHJ5wGvK9Q3NPwBr2RALwEw21RSOPc7ERx2dnYhm6M+HHJFL+uo9jZDbeg7Z/xYAt58bT6uf633q2CH0dtnDlb89dIDfOZ2oqbRqxMR1lM+74s4= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(346002)(136003)(39860400002)(376002)(396003)(451199018)(40470700004)(36840700001)(46966006)(966005)(478600001)(47076005)(40460700003)(2616005)(426003)(336012)(16526019)(31686004)(54906003)(53546011)(26005)(16576012)(186003)(6666004)(316002)(110136005)(70206006)(70586007)(4326008)(8676002)(83380400001)(41300700001)(8936002)(356005)(7416002)(5660300002)(44832011)(36860700001)(36756003)(86362001)(40480700001)(31696002)(82310400005)(82740400003)(81166007)(2906002)(43740500002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2023 10:50:07.9165 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1f70288c-9523-4bb3-1fc1-08db19798ec3 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT077.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8647 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 2/28/23 01:52, jassisinghbrar@gmail.com wrote: > From: Jassi Brar > > Any requirement of FWU should not require changes to bindings > of other subsystems. For example, for mtd-backed storage we > can do without requiring 'fixed-partitions' children to also > carry 'uuid', a property which is non-standard and not in the > bindings. > > There exists no code yet, so we can change the fwu-mtd bindings > to contain all properties within the fwu-mdata node. > > Signed-off-by: Jassi Brar > --- > .../firmware/fwu-mdata-mtd.yaml | 105 +++++++++++++++--- > 1 file changed, 91 insertions(+), 14 deletions(-) > > diff --git a/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml b/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml > index 4f5404f999..4b87fb8624 100644 > --- a/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml > +++ b/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml > @@ -1,13 +1,13 @@ > # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > %YAML 1.2 > --- > -$id: http://devicetree.org/schemas/firmware/u-boot,fwu-mdata-sf.yaml# > -$schema: http://devicetree.org/meta-schemas/core.yaml# > +$id: http://devicetree.org/schemas/firmware/u-boot,fwu-mdata-mtd.yaml# > +$schema: http://devicetree.org/meta-schemas/base.yaml# > > title: FWU metadata on MTD device without GPT > > maintainers: > - - Masami Hiramatsu > + - Jassi Brar > > properties: > compatible: > @@ -15,24 +15,101 @@ properties: > - const: u-boot,fwu-mdata-mtd > > fwu-mdata-store: > - maxItems: 1 > - description: Phandle of the MTD device which contains the FWU medatata. > + $ref: /schemas/types.yaml#/definitions/phandle > + description: Phandle of the MTD device which contains the FWU MetaData and Banks. > > - mdata-offsets: > + mdata-parts: > + $ref: /schemas/types.yaml#/definitions/non-unique-string-array > minItems: 2 > - description: Offsets of the primary and secondary FWU metadata in the NOR flash. > + maxItems: 2 > + description: labels of the primary and secondary FWU metadata partitions in the 'fixed-partitions' subnode of the 'jedec,spi-nor' flash device node. > + > + patternProperties: > + "fwu-bank@[0-9]": > + type: object > + description: List of FWU mtd-backed banks. Typically two banks. > + > + properties: > + id: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Index of the bank. > + > + label: > + $ref: /schemas/types.yaml#/definitions/non-unique-string-array > + minItems: 1 > + maxItems: 1 > + description: label of the partition, in the 'fixed-partitions' subnode of the 'jedec,spi-nor' flash device node, that holds this bank. > + > + patternProperties: > + "fwu-image@[0-9]": > + type: object > + description: List of images in the FWU mtd-backed bank. > + > + properties: > + id: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Index of the bank. > + > + offset: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Offset, from start of the bank, where the image is located. > + > + size: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Size reserved for the image. > + > + uuid: > + $ref: /schemas/types.yaml#/definitions/non-unique-string-array > + minItems: 1 > + maxItems: 1 > + description: UUID of the image. > + > + required: > + - id > + - offset > + - size > + - uuid > + additionalProperties: false > + > + required: > + - id > + - label > + - fwu-images > + additionalProperties: false > > required: > - compatible > - fwu-mdata-store > - - mdata-offsets > - > + - mdata-parts > + - fwu-banks > additionalProperties: false > > examples: > - | > - fwu-mdata { > - compatible = "u-boot,fwu-mdata-mtd"; > - fwu-mdata-store = <&spi-flash>; > - mdata-offsets = <0x500000 0x530000>; > - }; > + fwu-mdata { > + compatible = "u-boot,fwu-mdata-mtd"; > + fwu-mdata-store = <&flash0>; This is primary saying that both copies are in flash0. Isn't it better to also via DT binding to support that it can be different physical devices? > + mdata-parts = "MDATA-Pri", "MDATA-Sec"; This is not clear to me what this is used for. Can you please explain what you want to use this for? > + > + fwu-bank@0 { > + id = <0>; I though that @X is all the time associated with reg property. It means maybe you wanted to use fwu-bank0 instead or switch id to reg. The same applies below to fwuimage. > + label = "FIP-Bank0"; > + fwu-image@0 { > + id = <0>; > + offset = <0x0>; > + size = <0x400000>; > + uuid = "5a66a702-99fd-4fef-a392-c26e261a2828"; > + }; > + }; > + fwu-bank@1 { > + id = <1>; > + label = "FIP-Bank1"; > + fwu-image@0 { > + id = <0>; > + offset = <0x0>; > + size = <0x400000>; > + uuid = "a8f868a1-6e5c-4757-878d-ce63375ef2c0"; > + }; > + }; > + }; > +... I think it will be good to get review from Krzysztof Kozlowski or Rob to make sure that it will never change. Thanks, Michal