[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL_JsqL+pO7fQp7gYe4AvX9G-cOykreU3xTieUw2Q2PAZf4NUQ@mail.gmail.com>
Date: Tue, 20 Jan 2026 12:20:17 -0600
From: Rob Herring <robh@...nel.org>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Miquel Raynal <miquel.raynal@...tlin.com>, Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Brian Norris <computersforpeace@...il.com>, Kamal Dasu <kdasu.kdev@...il.com>,
William Zhang <william.zhang@...adcom.com>, Nick Terrell <terrelln@...com>,
David Sterba <dsterba@...e.com>, Rafał Miłecki <rafal@...ecki.pl>,
Simon Glass <sjg@...omium.org>, Linus Walleij <linusw@...nel.org>,
Ulf Hansson <ulf.hansson@...aro.org>, Marcus Folkesson <marcus.folkesson@...il.com>,
Tony Lindgren <tony@...mide.com>, Roger Quadros <rogerq@...nel.org>, Hauke Mehrtens <hauke@...ke-m.de>,
linux-mtd@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mmc@...r.kernel.org
Subject: Re: [PATCH v2 10/10] dt-bindings: mtd: partitions: Combine simple
partition bindings
On Tue, Jan 20, 2026 at 3:04 AM Krzysztof Kozlowski <krzk@...nel.org> wrote:
>
> On Mon, Jan 19, 2026 at 07:48:31PM -0600, Rob Herring (Arm) wrote:
> > Several partition node bindings are just a compatible plus properties
> > defined in partition.yaml. Move all of these bindings to a single schema
> > file.
> >
> > Signed-off-by: Rob Herring (Arm) <robh@...nel.org>
> > - partition@...000 {
> > - compatible = "tfa-bl31";
> > - reg = <0x200000 0x100000>;
> > - align = <0x4000>;
> > - };
> > - };
> > diff --git a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
> > index 159b32d12803..a6edf145df57 100644
> > --- a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
> > +++ b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
> > @@ -29,11 +29,7 @@ properties:
> >
> > patternProperties:
> > "^partition@[0-9a-f]+$":
> > - $ref: partition.yaml#
> > - properties:
> > - compatible:
> > - const: brcm,bcm4908-firmware
> > - unevaluatedProperties: false
> > + type: object
>
> I think this is not specific enough now and you should have here $ref
> (e.g. to simple-partition.yaml) with unevaluatedProperties. Otherwise
> schema does not report:
> 1. bogus properties in partition@ nodes without compatibles (like the
> first one in the example),
Yes, it should be "$ref: partition.yaml#/$defs/partition-node" rather
than simple-partition.yaml IMO.
> 2. partition@ nodes with some other compatibles (non-partition like,
> e.g. whatever I2C device stuffed there for which there is a schema of
> course)
We don't really enforce something like that anywhere else except when
the child nodes are fixed and there's only 1 possible option. I don't
think the schemas need to check for obviously nonsensical DTs. We can
put I2C device on simple-bus or vendorA device in vendorB SoC. Trying
to combine all possibilities is what was tried in partitions.yaml, but
that doesn't really work well when there are multiple combinations and
nesting is possible. Maybe "brcm,bcm4908-firmware" is the only one
used, but there's not really any reason others can't be used. The
other way around already happened. "brcm,bcm4908-firmware" is used
under a "fixed-partitions" node (in bcm4906-netgear-r8000p.dts) which
wasn't allowed before this series.
Rob
Powered by blists - more mailing lists