Allow parsing GPT layouts on MTD devices. Signed-off-by: Romain Gantois <romain.gantois@xxxxxxxxxxx> --- .../bindings/mtd/partitions/gpt.yaml | 41 +++++++++++++++++++ .../bindings/mtd/partitions/partitions.yaml | 1 + 2 files changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/partitions/gpt.yaml diff --git a/Documentation/devicetree/bindings/mtd/partitions/gpt.yaml b/Documentation/devicetree/bindings/mtd/partitions/gpt.yaml new file mode 100644 index 000000000000..3c538562e3e5 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/gpt.yaml @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/gpt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: GUID Partition Table (GPT) + +description: The GPT format is commonly used on block devices to describe a +partitioning scheme. It mainly consists of a Legacy or Protective MBR for +backwards compatibility, a primary GPT header with an array of Partition Table +Entries, and a backup header with a backup array of PTEs. This partition table +format can be used on MTD devices, specifically NOR flash devices, since NAND +flashes are susceptible to bad blocks which could easily corrupt the GPT layout. +Logical Block Addresses (LBAs) are defined to target 512-byte blocks. + +maintainers: + - Romain Gantois <romain.gantois@xxxxxxxxxxx> + +select: false + +properties: + compatible: + const: gpt + + '#address-cells': false + + '#size-cells': false + +required: + - compatible + +additionalProperties: false + +examples: + - | + flash@0 { + partitions { + compatible = "gpt"; + }; + }; diff --git a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml index 1dda2c80747b..f2b1565d5d0a 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml @@ -18,6 +18,7 @@ oneOf: - $ref: brcm,bcm4908-partitions.yaml - $ref: brcm,bcm947xx-cfe-partitions.yaml - $ref: fixed-partitions.yaml + - $ref: gpt.yaml - $ref: linksys,ns-partitions.yaml - $ref: qcom,smem-part.yaml - $ref: redboot-fis.yaml -- 2.43.0