Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2625172rdb; Fri, 8 Dec 2023 13:57:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IG577E2u5URuBwpOwZD2pY9cI1JNdmxt3NKWQAerphAOFE7xMpv51P8a3RFsp+9JNm/y6wj X-Received: by 2002:a17:902:6bc2:b0:1d0:6ffd:e2ea with SMTP id m2-20020a1709026bc200b001d06ffde2eamr737285plt.132.1702072670055; Fri, 08 Dec 2023 13:57:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702072670; cv=none; d=google.com; s=arc-20160816; b=Xmq9Qy0NmoZyB84DfZNeIM76A9sNeP1HFBPd/7QZIee9BUpv61lA1pZeMZm3YzcUa1 iThvrf2PgG+aHYtaz/UonbmoK4mEzqdjH6YRc5TQeZdkOcXS+sMeLcwixXsEd+Kcmm4Z ziwb+01YClpqu07NsE6ttFsuenDKORkllFbSyWO090zdQLoOTxYkT5Q/0cWrq22Qbd2+ 8nV63TkefVA9QTNWtpeZDv8hexaaf8ZsaMRXHI9etBaPIphdJ7IfCUAP4XEQRCTTp5To +wVgEjzPyYsO/ynasRiML3h03tFYS/PDAZ7KnMIXmi1IhNpygf88US9oO+2nV27JuQFZ Qo1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=9qJOD62Go4QPmCq4+6ale9sEm1kgXleo7DQnWwK+wFo=; fh=RMUClPZeGpUF5GnOZO6FFHIGQxZKmrfLpi4GOvG93KM=; b=MKb7nFatKCYDgu1LVZSg5Cf63EvHLyjVRL6Lbhc2WH/b4z36tW+/IyW0MQ6HdB9h4K U4Ee6hTiJOchagXiRDXc1I66833O4p2u1oCQ4xKMDh+ln8IcSTuRs0Qx+J/KzauzR7XQ JYkW5edfgPLviotNiESLLMzXPL5P2fjMz+vbn680srtl0VS8Z4AmYQlIv8mrRU6apl3B QpuUwi4IPfeGunWv31gLQSel3slZRtSxWeIAstIieS2O7AMlK/PyiSPviwEswgjzx3ig av85x2V+3QIOrWYgyNICOq37f3eE5/5h6R0rGELTV3KUUK7gB0Y4oORzSsanKq0+8UVt blzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QVM696iI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id x3-20020a170902ea8300b001cfdd05b5a3si2118601plb.434.2023.12.08.13.57.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 13:57:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QVM696iI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 779A680822F8; Fri, 8 Dec 2023 13:57:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1574823AbjLHV5M (ORCPT + 99 others); Fri, 8 Dec 2023 16:57:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1574893AbjLHV4v (ORCPT ); Fri, 8 Dec 2023 16:56:51 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C03B2696 for ; Fri, 8 Dec 2023 13:56:18 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DECF2C433A9; Fri, 8 Dec 2023 21:56:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702072577; bh=lLQ2WDCFYnh09MKNvKahHNehAE3mXonCy/B5T05x9JM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=QVM696iIcTYOFN+ev+FZUSa0/ixShjERZF+VIKawdd9uLQrXYEX411unpB8wvAZut kmruEk2LsZ0WrxbnQNh1cKguyfbgpz4yL6P0mVvsSdZx5zs/KagDL3fxtV2oRsRIJQ UlsYw9d262QTPWJi25GWjm4+bFwH/nrlQLmLRT3IIRyWggljT7BpbMxU2Yt9w25K9F zaxGru+oEKJN01GxqEMMuhiA1PsKZ86RazkibkaWzpwmX/vd85LqdWk21rDI0l6vtC Dt2ZGycSZDwEvaHQJjlfn7x7JsAOPJgAjdUAXI43z7EcEOfZja5RCHIoZN0/BaRRub BiK3mxuFgvy7Q== Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-50bf32c0140so2910507e87.1; Fri, 08 Dec 2023 13:56:17 -0800 (PST) X-Gm-Message-State: AOJu0YysPC5ECq/6CB8TyzgOYpusC7QOUeV1Bz6GxuzjrVO2xachGpJV LksDgy+3AhpIL417GPwvRgMyJtoZ75xKjvjKRg== X-Received: by 2002:a05:6512:a90:b0:50b:f23d:d804 with SMTP id m16-20020a0565120a9000b0050bf23dd804mr338588lfu.77.1702072575996; Fri, 08 Dec 2023 13:56:15 -0800 (PST) MIME-Version: 1.0 References: <20231116172859.393744-1-sjg@chromium.org> <20231208150042.GA1278773-robh@kernel.org> In-Reply-To: From: Rob Herring Date: Fri, 8 Dec 2023 15:56:02 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 1/3] dt-bindings: mtd: partitions: Add binman compatible To: Simon Glass Cc: devicetree@vger.kernel.org, Miquel Raynal , linux-mtd@lists.infradead.org, Tom Rini , Michael Walle , U-Boot Mailing List , Conor Dooley , Krzysztof Kozlowski , Pratyush Yadav , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Richard Weinberger , Vignesh Raghavendra , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 08 Dec 2023 13:57:38 -0800 (PST) On Fri, Dec 8, 2023 at 11:47=E2=80=AFAM Simon Glass wrot= e: > > Hi Rob, > > On Fri, 8 Dec 2023 at 08:00, Rob Herring wrote: > > > > On Thu, Nov 16, 2023 at 10:28:50AM -0700, Simon Glass wrote: > > > Add a compatible string for binman, so we can extend fixed-partitions > > > in various ways. > > > > > > Signed-off-by: Simon Glass > > > --- > > > > > > (no changes since v5) > > > > > > Changes in v5: > > > - Add #address/size-cells and parternProperties > > > - Drop $ref to fixed-partitions.yaml > > > - Drop 'select: false' > > > > > > Changes in v4: > > > - Change subject line > > > > > > Changes in v3: > > > - Drop fixed-partition additional compatible string > > > - Drop fixed-partitions from the example > > > - Mention use of compatible instead of label > > > > > > Changes in v2: > > > - Drop mention of 'enhanced features' in fixed-partitions.yaml > > > - Mention Binman input and output properties > > > - Use plain partition@xxx for the node name > > > > > > .../bindings/mtd/partitions/binman.yaml | 68 +++++++++++++++++= ++ > > > .../bindings/mtd/partitions/partitions.yaml | 1 + > > > MAINTAINERS | 5 ++ > > > 3 files changed, 74 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/mtd/partitions/= binman.yaml > > > > > > diff --git a/Documentation/devicetree/bindings/mtd/partitions/binman.= yaml b/Documentation/devicetree/bindings/mtd/partitions/binman.yaml > > > new file mode 100644 > > > index 000000000000..329217550a98 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/mtd/partitions/binman.yaml > > > @@ -0,0 +1,68 @@ > > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > > +# Copyright 2023 Google LLC > > > + > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Binman firmware layout > > > + > > > +maintainers: > > > + - Simon Glass > > > + > > > +description: | > > > + The binman node provides a layout for firmware, used when packagin= g firmware > > > + from multiple projects. It is based on fixed-partitions, with some > > > + extensions, but uses 'compatible' to indicate the contents of the = node, to > > > + avoid perturbing or confusing existing installations which use 'la= bel' for a > > > + particular purpose. > > > + > > > + Binman supports properties used as inputs to the firmware-packagin= g process, > > > + such as those which control alignment of partitions. This binding = addresses > > > + these 'input' properties. For example, it is common for the 'reg' = property > > > + (an 'output' property) to be set by Binman, based on the alignment= requested > > > + in the input. > > > + > > > + Once processing is complete, input properties have mostly served t= heir > > > + purpose, at least until the firmware is repacked later, e.g. due t= o a > > > + firmware update. The 'fixed-partitions' binding should provide eno= ugh > > > + information to read the firmware at runtime, including decompressi= on if > > > + needed. > > > > How is this going to work exactly? binman reads these nodes and then > > writes out 'fixed-partitions' nodes. But then you've lost the binman > > specifc parts needed for repacking. > > No, they are the same node. I do want the extra information to stick > around. So long as it is compatible with fixed-partition as well, this > should work OK. How can it be both? The partitions node compatible can be either 'fixed-partitions' or 'binman'. In the partition nodes, 'align' for example is allowed for a binman partition but not a fixed-partition. Note that the schema may not actually warn on extra properties ATM because there are some issues with the schema structure. Since there can be nested partittions, that complicates matters. It's been on my todo list to fix. Rob