Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2649352rdb; Fri, 8 Dec 2023 14:58:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZVmVJKzanVNlm6Qn4K1UPep0rsqsRt2eIoEeOaVplbeSf2r9kzM4x3cWg5zcSOv7rMGh5 X-Received: by 2002:a05:6e02:190e:b0:35d:59a2:3332 with SMTP id w14-20020a056e02190e00b0035d59a23332mr1286848ilu.54.1702076323453; Fri, 08 Dec 2023 14:58:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702076323; cv=none; d=google.com; s=arc-20160816; b=RmZ5TRqx22C7Ow72XAY/BVDwo4o4IkTum6T0e2GdynavZKqsOyRsxtsfY8y2ZJpQuW 0LXSby6lpqPQz7pId9AL/jj53hjqlCUPAl1Cz6O9+f1T0JmBF0Q1fR8z0g7qF2lJvBeI UzJPgFxo1t9wRoalOyFDRFeaAcv5DSHc1WjSp/eVdcl7PuKAQaSl0UGUOsuSCpsUl6o8 EIwMl8n3oVkU317WKdDT5/LAYbXvpV4pkRSBa9rU9frQrF9jZ+/et3zZk6lZK3e3OG8/ XQ3xFMw9kdwPQJRGnGRBvDZKrmmC/SbDF6SFXUneu2dNyUh5QCn9j1nNvUMq6ysBt6fW 1pAg== 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=BMpCWLXMXRBTKeWVwSpx26nw2WRYoXe/hUgsW8+MXwY=; fh=R7bbiEBvnOvZd5ig2ecax/actBO9V0NJACetIMciwDc=; b=bJvo49NJwZSg4auSuN3bGX7o+AaswIo3OkJG8UhRM+0CjY6U+jz3R0g0HYzPdCcJzp iMXKQzj4XAgsT3dEZmoUJEK38IeSDNavmiXoKjMUX6Tu2WFU0716jyP0iMXqrTtoxAU8 fhlsLQhEH0S38blBkzHTX5aLwx9pqMS3RoLZ+tBZgGsAceekh1BvgKZxf+uWyoutTgkT Ziph7r3hOXnFwY3nw3PESsELTmQiwIdtcdDJmFgDms/BRybLOwkMtTKC9krk738/XFol dfgleAWKjpVp5/uKF1qve6WZvUknZ73taBXELuZLgDQaDY9sv1HOiqCFmhMJyCCqkPLN xZLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LomAtTtg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id q10-20020a170902edca00b001d04cb0d6e2si2140004plk.520.2023.12.08.14.58.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 14:58:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LomAtTtg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id C64638200005; Fri, 8 Dec 2023 14:58:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234056AbjLHW6Y (ORCPT + 99 others); Fri, 8 Dec 2023 17:58:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234048AbjLHW6X (ORCPT ); Fri, 8 Dec 2023 17:58:23 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C00F01985 for ; Fri, 8 Dec 2023 14:58:28 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a1e2ded3d9fso315217766b.0 for ; Fri, 08 Dec 2023 14:58:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1702076307; x=1702681107; 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=BMpCWLXMXRBTKeWVwSpx26nw2WRYoXe/hUgsW8+MXwY=; b=LomAtTtg8QE/ULkePZYJXz8kGVnDhRj9W/YvjLj18IjtEPVSyc8gGXxunXwNftqGIG 8LVc0+wGvpH2B3p6HafLIxeHvD0WE6oIm5zZGiAReP7NDZQnOqUsdQaYRiUsAjW7KnQF eZiCe0Zvbdog7Z/x5t7ohCZ26QcUAjY/f+e+U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702076307; x=1702681107; 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=BMpCWLXMXRBTKeWVwSpx26nw2WRYoXe/hUgsW8+MXwY=; b=LKzqYpetXwaq1jM5Bu0k/vk0DdRss0Ov71nLyWJspOpY5d+bb9kjaLxykpLnQlDSl/ VfRDxrQJxrBaViVBlIsg0AZltVZQgKEDnAwh6/aEi/LftjX3v9ASTtBfk64d56YaBWo8 pN/o0HsJbO9iy1sviiVkpRVrY682FRHypsQ/TkkqhfxYejcNpeDYpKZZrqLXMhCKLHlF NXu5UOq/u+Xet0iz3qEwVujip1Gjbwml/b8Z34gg/R+X4bA1KT5UnbGA+7wWM7H6Qu+Y IOveqLfwjVykh8PcvduhFLRbCQM7/LKsK4hpvAfekOwgLP2hdaTQ/pgLODeMK6j2AkkP iXIA== X-Gm-Message-State: AOJu0YytvBcgeCAwj/9y6hL1HhkCD2Mj596L9mdFINIT71ZrOUuvNnRY bXcRdsVyxV0VdmsCHzSq5wEYQ80www/0O8eS9iEOsQ== X-Received: by 2002:a17:906:2b53:b0:a19:a19b:78c2 with SMTP id b19-20020a1709062b5300b00a19a19b78c2mr408985ejg.133.1702076307046; Fri, 08 Dec 2023 14:58:27 -0800 (PST) MIME-Version: 1.0 References: <20231116172859.393744-1-sjg@chromium.org> <20231208150042.GA1278773-robh@kernel.org> In-Reply-To: From: Simon Glass Date: Fri, 8 Dec 2023 15:58:10 -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 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Fri, 08 Dec 2023 14:58:40 -0800 (PST) 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 wr= ote: > > > > 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-partitio= ns > > > > 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/partition= s/binman.yaml > > > > > > > > diff --git a/Documentation/devicetree/bindings/mtd/partitions/binma= n.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 packag= ing firmware > > > > + from multiple projects. It is based on fixed-partitions, with so= me > > > > + extensions, but uses 'compatible' to indicate the contents of th= e node, to > > > > + avoid perturbing or confusing existing installations which use '= label' for a > > > > + particular purpose. > > > > + > > > > + Binman supports properties used as inputs to the firmware-packag= ing process, > > > > + such as those which control alignment of partitions. This bindin= g addresses > > > > + these 'input' properties. For example, it is common for the 'reg= ' property > > > > + (an 'output' property) to be set by Binman, based on the alignme= nt 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 provide e= nough > > > > + information to read the firmware at runtime, including decompres= sion 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'. 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? But if not, then whatever works is fine for now. I just want to make some progress on this very, very old series. > > 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. OK. Regards, Simon