f3b1179ecd8023fa4e12019109161e3fcae0f3c1
[openwrt/openwrt.git] /
1 From 6418522022c706fd867b00b2571edba48b8fa8c7 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Thu, 11 Feb 2021 23:04:25 +0100
4 Subject: [PATCH] dt-bindings: mtd: move partition binding to its own file
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Single partition binding is quite common and may be:
10 1. Used by multiple parsers
11 2. Extended for more specific cases
12
13 Move it to separated file to avoid code duplication.
14
15 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
16 Reviewed-by: Rob Herring <robh@kernel.org>
17 Signed-off-by: Richard Weinberger <richard@nod.at>
18 ---
19 .../mtd/partitions/fixed-partitions.yaml | 33 +------------
20 .../bindings/mtd/partitions/partition.yaml | 47 +++++++++++++++++++
21 2 files changed, 48 insertions(+), 32 deletions(-)
22 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/partition.yaml
23
24 --- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
25 +++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
26 @@ -27,38 +27,7 @@ properties:
27
28 patternProperties:
29 "@[0-9a-f]+$":
30 - description: node describing a single flash partition
31 - type: object
32 -
33 - properties:
34 - reg:
35 - description: partition's offset and size within the flash
36 - maxItems: 1
37 -
38 - label:
39 - description: The label / name for this partition. If omitted, the label
40 - is taken from the node name (excluding the unit address).
41 -
42 - read-only:
43 - description: This parameter, if present, is a hint that this partition
44 - should only be mounted read-only. This is usually used for flash
45 - partitions containing early-boot firmware images or data which should
46 - not be clobbered.
47 - type: boolean
48 -
49 - lock:
50 - description: Do not unlock the partition at initialization time (not
51 - supported on all devices)
52 - type: boolean
53 -
54 - slc-mode:
55 - description: This parameter, if present, allows one to emulate SLC mode
56 - on a partition attached to an MLC NAND thus making this partition
57 - immune to paired-pages corruptions
58 - type: boolean
59 -
60 - required:
61 - - reg
62 + $ref: "partition.yaml#"
63
64 required:
65 - "#address-cells"
66 --- /dev/null
67 +++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
68 @@ -0,0 +1,47 @@
69 +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
70 +%YAML 1.2
71 +---
72 +$id: http://devicetree.org/schemas/mtd/partitions/partition.yaml#
73 +$schema: http://devicetree.org/meta-schemas/core.yaml#
74 +
75 +title: Partition
76 +
77 +description: |
78 + This binding describes a single flash partition. Each partition must have its
79 + relative offset and size specified. Depending on partition function extra
80 + properties can be used.
81 +
82 +maintainers:
83 + - Rafał Miłecki <rafal@milecki.pl>
84 +
85 +properties:
86 + reg:
87 + description: partition's offset and size within the flash
88 + maxItems: 1
89 +
90 + label:
91 + description: The label / name for this partition. If omitted, the label
92 + is taken from the node name (excluding the unit address).
93 +
94 + read-only:
95 + description: This parameter, if present, is a hint that this partition
96 + should only be mounted read-only. This is usually used for flash
97 + partitions containing early-boot firmware images or data which should
98 + not be clobbered.
99 + type: boolean
100 +
101 + lock:
102 + description: Do not unlock the partition at initialization time (not
103 + supported on all devices)
104 + type: boolean
105 +
106 + slc-mode:
107 + description: This parameter, if present, allows one to emulate SLC mode
108 + on a partition attached to an MLC NAND thus making this partition
109 + immune to paired-pages corruptions
110 + type: boolean
111 +
112 +required:
113 + - reg
114 +
115 +additionalProperties: true