From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB4E62C84E for ; Thu, 4 Jan 2024 21:54:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="b1Z+2Eqk" Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-680d1908fb2so4292706d6.3 for ; Thu, 04 Jan 2024 13:54:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1704405288; x=1705010088; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UHu/9yYjuNs9M6rsUIsCrmi3APbGPXR8WfnnSC4pWIc=; b=b1Z+2EqkEhS6Kk6l1CNJ0lSexxghl4ZA2d8vUGqekuil205aUASveOUacFtY3x86EB pnRYWDvKEF3Eb03/aG0wYAD/FtPyFf+z7eND0CRjRBHjYOhySrbrJS/VmgUu317PraKU v6WqiOKgJwjQhrzqG1wAEVzVjWmnnKjYJwYtA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704405288; x=1705010088; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UHu/9yYjuNs9M6rsUIsCrmi3APbGPXR8WfnnSC4pWIc=; b=iyx3km4nuZthmZWYnYuX+BgEDn12bO77tY1+oG94l+Khr7KWTZi+hT4+HqgpWn5DR+ H99XZGuM3ZIgC4iB3NH/2vR2qOwqCBUfC8ZcwlvYr0Eka/KE6yqqUktwWqzRSIAF4wpU Jp3Qher4Ps7Rizh3jvL+1U0HAb77llc2IbFSBnJx9komk3kuXZGtwHn0siF+Hg4SpNTk ld2/4LlK3e1qInCxhURcEVFEZxS7FYs87K90F+OsARw8trwuobDqdX9iOjU/grkCyLKt z0OgWYMKb6J4IuzdT5+WOFMSamxp4BsDYAgoNpio4UVO1CTkw5oT9ZCk2ueucuJV+EFO EjDA== X-Gm-Message-State: AOJu0Yx6Ca8/s0dfN6dnAVwZjSgjyIaV1Fp/GDIGNBKEmd02/Y+861fx g5lk6kHVYNixyNtbS+W/FSmSLdnvXFW5AVaG3FjhQtiU1B7v X-Google-Smtp-Source: AGHT+IFuqeDMdG4zBQldI5XyvT6/jarUq5+fL5rEaozsnTJloLarXEyiTxEWhTea3tqeSV9UrqYBu0DbQI4IMlO5FpU= X-Received: by 2002:a05:6214:2305:b0:67f:7c5c:3434 with SMTP id gc5-20020a056214230500b0067f7c5c3434mr1242635qvb.73.1704405287791; Thu, 04 Jan 2024 13:54:47 -0800 (PST) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231116172859.393744-1-sjg@chromium.org> <20231208150042.GA1278773-robh@kernel.org> <20231214172702.GA617226-robh@kernel.org> In-Reply-To: From: Simon Glass Date: Thu, 4 Jan 2024 14:54:36 -0700 Message-ID: Subject: Re: [PATCH v6 1/3] dt-bindings: mtd: partitions: Add binman compatible To: Rob Herring 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 Hi Rob, On Thu, Dec 14, 2023 at 2:09=E2=80=AFPM Simon Glass wrot= e: > > Hi Rob, > > On Thu, 14 Dec 2023 at 10:27, Rob Herring wrote: > > > > On Fri, Dec 08, 2023 at 03:58:10PM -0700, Simon Glass wrote: > > > Hi Rob, > > > > > > On Fri, 8 Dec 2023 at 14:56, Rob Herring wrote: > > > > > > > > On Fri, Dec 8, 2023 at 11:47=E2=80=AFAM Simon Glass wrote: > > > > > > > > > > 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-pa= rtitions > > > > > > > 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.yam= l > > > > > > > - 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/par= titions/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.yam= l# > > > > > > > +$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 = packaging firmware > > > > > > > + from multiple projects. It is based on fixed-partitions, w= ith some > > > > > > > + extensions, but uses 'compatible' to indicate the contents= of the node, to > > > > > > > + avoid perturbing or confusing existing installations which= use 'label' for a > > > > > > > + particular purpose. > > > > > > > + > > > > > > > + Binman supports properties used as inputs to the firmware-= packaging process, > > > > > > > + such as those which control alignment of partitions. This = binding addresses > > > > > > > + these 'input' properties. For example, it is common for th= e 'reg' property > > > > > > > + (an 'output' property) to be set by Binman, based on the a= lignment requested > > > > > > > + in the input. > > > > > > > + > > > > > > > + Once processing is complete, input properties have mostly = served their > > > > > > > + purpose, at least until the firmware is repacked later, e.= g. due to a > > > > > > > + firmware update. The 'fixed-partitions' binding should pro= vide enough > > > > > > > + information to read the firmware at runtime, including dec= ompression 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 b= inman > > > > > > specifc parts needed for repacking. > > > > > > > > > > No, they are the same node. I do want the extra information to st= ick > > > > > 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'. > > > > > > Can we not allow it to be both? I have tried to adjust things in > > > response to feedback but perhaps the feedback was leading me down the > > > wrong path? > > > > Sure, but then the schema has to and that means extending > > fixed-partitions. > > Can we cross that bridge later? There might be resistance to it. I'm > not sure. For now, perhaps just a binman compatible works well enough > to make progress. Is there any way to make progress on this? I would like to have software which doesn't understand the binman compatible to at least be able to understand the fixed-partition compatible. Is that acceptable? If not, what is? In any case, please can you help with this? Regards, Simon