Commit 125981ff authored by Rob Herring (Arm)'s avatar Rob Herring (Arm) Committed by Miquel Raynal
Browse files

dt-bindings: mtd: partitions: Combine simple partition bindings



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: default avatarRob Herring (Arm) <robh@kernel.org>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
parent a1fa0f8c
Loading
Loading
Loading
Loading
+0 −53
Original line number Diff line number Diff line
# 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>;
        };
    };
+1 −5
Original line number Diff line number Diff line
@@ -29,11 +29,7 @@ properties:

patternProperties:
  "^partition@[0-9a-f]+$":
    $ref: partition.yaml#
    properties:
      compatible:
        const: brcm,bcm4908-firmware
    unevaluatedProperties: false
    $ref: partition.yaml#/$defs/partition-node

required:
  - "#address-cells"
+0 −45
Original line number Diff line number Diff line
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>;
		};
	};
};
+0 −44
Original line number Diff line number Diff line
# 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";
        };
    };
+61 −0
Original line number Diff line number Diff line
# 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
Loading