[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231211151244.289349-7-romain.gantois@bootlin.com>
Date: Mon, 11 Dec 2023 16:12:42 +0100
From: Romain Gantois <romain.gantois@...tlin.com>
To: Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Jens Axboe <axboe@...nel.dk>,
Davidlohr Bueso <dave@...olabs.net>,
Ard Biesheuvel <ardb@...nel.org>
Cc: Romain Gantois <romain.gantois@...tlin.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Herve Codina <herve.codina@...tlin.com>,
linux-mtd@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
linux-efi@...r.kernel.org
Subject: [RFC PATCH 6/6] dt-bindings: mtd: add GPT partition bindings
Allow parsing GPT layouts on MTD devices.
Signed-off-by: Romain Gantois <romain.gantois@...tlin.com>
---
.../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@...tlin.com>
+
+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
Powered by blists - more mailing lists