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@kernel.org>
---
.../devicetree/bindings/mtd/partitions/binman.yaml | 53 -------------------
.../mtd/partitions/brcm,bcm4908-partitions.yaml | 6 +--
.../mtd/partitions/brcm,bcm963xx-imagetag.txt | 45 ----------------
.../devicetree/bindings/mtd/partitions/seama.yaml | 44 ----------------
.../bindings/mtd/partitions/simple-partition.yaml | 61 ++++++++++++++++++++++
MAINTAINERS | 5 --
6 files changed, 62 insertions(+), 152 deletions(-)
diff --git a/Documentation/devicetree/bindings/mtd/partitions/binman.yaml b/Documentation/devicetree/bindings/mtd/partitions/binman.yaml
deleted file mode 100644
index bb4b08546184..000000000000
--- a/Documentation/devicetree/bindings/mtd/partitions/binman.yaml
+++ /dev/null
@@ -1,53 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: Binman entries
-
-description: |
- This corresponds to a binman 'entry'. It is a single partition which holds
- data of a defined type.
-
- Binman uses the type to indicate what data file / type to place in the
- partition. There are quite a number of binman-specific entry types, such as
- section, fill and files, to be added later.
-
-maintainers:
- - Simon Glass <sjg@chromium.org>
-
-allOf:
- - $ref: /schemas/mtd/partitions/partition.yaml#
-
-properties:
- compatible:
- enum:
- - u-boot # u-boot.bin from U-Boot project
- - tfa-bl31 # bl31.bin or bl31.elf from TF-A project
-
-required:
- - compatible
-
-unevaluatedProperties: false
-
-examples:
- - |
- partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
-
- partition@100000 {
- compatible = "u-boot";
- reg = <0x100000 0xf00000>;
- align-size = <0x1000>;
- align-end = <0x10000>;
- };
-
- partition@200000 {
- 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
required:
- "#address-cells"
diff --git a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm963xx-imagetag.txt b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm963xx-imagetag.txt
deleted file mode 100644
index f8b7418ed817..000000000000
--- a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm963xx-imagetag.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-Broadcom BCM963XX ImageTag Partition Container
-==============================================
-
-Some Broadcom BCM63XX SoC based devices contain additional, non discoverable
-partitions or non standard bootloader partition sizes. For these a mixed layout
-needs to be used with an explicit firmware partition.
-
-The BCM963XX ImageTag is a simple firmware header describing the offsets and
-sizes of the rootfs and kernel parts contained in the firmware.
-
-Required properties:
-- compatible : must be "brcm,bcm963xx-imagetag"
-
-Example:
-
-flash@1e000000 {
- compatible = "cfi-flash";
- reg = <0x1e000000 0x2000000>;
- bank-width = <2>;
-
- partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
-
- cfe@0 {
- reg = <0x0 0x10000>;
- read-only;
- };
-
- firmware@10000 {
- reg = <0x10000 0x7d0000>;
- compatible = "brcm,bcm963xx-imagetag";
- };
-
- caldata@7e0000 {
- reg = <0x7e0000 0x10000>;
- read-only;
- };
-
- nvram@7f0000 {
- reg = <0x7f0000 0x10000>;
- };
- };
-};
diff --git a/Documentation/devicetree/bindings/mtd/partitions/seama.yaml b/Documentation/devicetree/bindings/mtd/partitions/seama.yaml
deleted file mode 100644
index 4c1cbf43e81a..000000000000
--- a/Documentation/devicetree/bindings/mtd/partitions/seama.yaml
+++ /dev/null
@@ -1,44 +0,0 @@
-# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/mtd/partitions/seama.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: Seattle Image Partitions
-
-description: The SEAttle iMAge (SEAMA) partition is a type of partition
- used for NAND flash devices. This type of flash image is found in some
- D-Link routers such as DIR-645, DIR-842, DIR-859, DIR-860L, DIR-885L,
- DIR890L and DCH-M225, as well as in WD and NEC routers on the ath79
- (MIPS), Broadcom BCM53xx, and RAMIPS platforms. This partition type
- does not have children defined in the device tree, they need to be
- detected by software.
-
-allOf:
- - $ref: partition.yaml#
-
-maintainers:
- - Linus Walleij <linus.walleij@linaro.org>
-
-properties:
- compatible:
- const: seama
-
-required:
- - compatible
-
-unevaluatedProperties: false
-
-examples:
- - |
- partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
-
- partition@0 {
- compatible = "seama";
- reg = <0x0 0x800000>;
- label = "firmware";
- };
- };
diff --git a/Documentation/devicetree/bindings/mtd/partitions/simple-partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/simple-partition.yaml
new file mode 100644
index 000000000000..14f5006c54a8
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/partitions/simple-partition.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/partitions/simple-partition.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Simple partition types
+
+description:
+ Simple partition types which only define a "compatible" value and no custom
+ properties.
+
+maintainers:
+ - Rafał Miłecki <rafal@milecki.pl>
+ - Simon Glass <sjg@chromium.org>
+
+allOf:
+ - $ref: partition.yaml#
+
+properties:
+ compatible:
+ oneOf:
+ - const: brcm,bcm4908-firmware
+ description:
+ Broadcom BCM4908 CFE bootloader firmware partition
+
+ - const: brcm,bcm963xx-imagetag
+ description:
+ The BCM963XX ImageTag is a simple firmware header describing the
+ offsets and sizes of the rootfs and kernel parts contained in the
+ firmware.
+
+ - const: seama
+ description:
+ The SEAttle iMAge (SEAMA) partition is a type of partition used for
+ NAND flash devices. This type of flash image is found in some D-Link
+ routers such as DIR-645, DIR-842, DIR-859, DIR-860L, DIR-885L, DIR890L
+ and DCH-M225, as well as in WD and NEC routers on the ath79 (MIPS),
+ Broadcom BCM53xx, and RAMIPS platforms. This partition type does not
+ have children defined in the device tree, they need to be detected by
+ software.
+
+ - const: u-boot
+ description: >
+ u-boot.bin from U-Boot project.
+
+ This corresponds to a binman 'entry'. It is a single partition which holds
+ data of a defined type.
+
+ Binman uses the type to indicate what data file / type to place in the
+ partition. There are quite a number of binman-specific entry types, such as
+ section, fill and files, to be added later.
+
+ - const: tfa-bl31
+ description: >
+ bl31.bin or bl31.elf from TF-A project
+
+ This corresponds to a binman 'entry'. It is a single partition which holds
+ data of a defined type.
+
+unevaluatedProperties: false
diff --git a/MAINTAINERS b/MAINTAINERS
index c856aed83bb0..c3087c282ee3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4403,11 +4403,6 @@ F: Documentation/filesystems/bfs.rst
F: fs/bfs/
F: include/uapi/linux/bfs_fs.h
-BINMAN
-M: Simon Glass <sjg@chromium.org>
-S: Supported
-F: Documentation/devicetree/bindings/mtd/partitions/binman*
-
BITMAP API
M: Yury Norov <yury.norov@gmail.com>
R: Rasmus Villemoes <linux@rasmusvillemoes.dk>
--
2.51.0
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@kernel.org>
> - partition@200000 {
> - 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),
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)
Best regards,
Krzysztof
On Tue, Jan 20, 2026 at 3:04 AM Krzysztof Kozlowski <krzk@kernel.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@kernel.org>
> > - partition@200000 {
> > - 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
© 2016 - 2026 Red Hat, Inc.