kernel: add pending patches for new LED_FUNCTION_* definitions
[openwrt/openwrt.git] / target / linux / generic / pending-6.1 / 450-01-dt-bindings-mtd-add-basic-bindings-for-UBI.patch
1 From ffbbe7d66872ff8957dad2136133e28a1fd5d437 Mon Sep 17 00:00:00 2001
2 From: Daniel Golle <daniel@makrotopia.org>
3 Date: Mon, 7 Aug 2023 22:51:05 +0100
4 Subject: [PATCH 01/15] dt-bindings: mtd: add basic bindings for UBI
5
6 Add basic bindings for UBI devices and volumes.
7
8 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
9 ---
10 .../bindings/mtd/partitions/linux,ubi.yaml | 65 +++++++++++++++++++
11 .../bindings/mtd/partitions/ubi-volume.yaml | 35 ++++++++++
12 2 files changed, 100 insertions(+)
13 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml
14 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml
15
16 --- /dev/null
17 +++ b/Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml
18 @@ -0,0 +1,65 @@
19 +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
20 +%YAML 1.2
21 +---
22 +$id: http://devicetree.org/schemas/mtd/partitions/linux,ubi.yaml#
23 +$schema: http://devicetree.org/meta-schemas/core.yaml#
24 +
25 +title: Unsorted Block Images
26 +
27 +description: |
28 + UBI ("Unsorted Block Images") is a volume management system for raw
29 + flash devices which manages multiple logical volumes on a single
30 + physical flash device and spreads the I/O load (i.e wear-leveling)
31 + across the whole flash chip.
32 +
33 +maintainers:
34 + - Daniel Golle <daniel@makrotopia.org>
35 +
36 +allOf:
37 + - $ref: partition.yaml#
38 +
39 +properties:
40 + compatible:
41 + const: linux,ubi
42 +
43 + volumes:
44 + type: object
45 + description: UBI Volumes
46 +
47 + patternProperties:
48 + "^ubi-volume-.*$":
49 + $ref: /schemas/mtd/partitions/ubi-volume.yaml#
50 +
51 + unevaluatedProperties: false
52 +
53 +required:
54 + - compatible
55 +
56 +unevaluatedProperties: false
57 +
58 +examples:
59 + - |
60 + partitions {
61 + compatible = "fixed-partitions";
62 + #address-cells = <1>;
63 + #size-cells = <1>;
64 +
65 + partition@0 {
66 + reg = <0x0 0x100000>;
67 + label = "bootloader";
68 + read-only;
69 + };
70 +
71 + partition@100000 {
72 + reg = <0x100000 0x1ff00000>;
73 + label = "ubi";
74 + compatible = "linux,ubi";
75 +
76 + volumes {
77 + ubi-volume-caldata {
78 + volid = <2>;
79 + volname = "rf";
80 + };
81 + };
82 + };
83 + };
84 --- /dev/null
85 +++ b/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml
86 @@ -0,0 +1,35 @@
87 +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
88 +%YAML 1.2
89 +---
90 +$id: http://devicetree.org/schemas/mtd/partitions/ubi-volume.yaml#
91 +$schema: http://devicetree.org/meta-schemas/core.yaml#
92 +
93 +title: UBI volume
94 +
95 +description: |
96 + This binding describes a single UBI volume. Volumes can be matches either
97 + by their ID or their name, or both.
98 +
99 +maintainers:
100 + - Daniel Golle <daniel@makrotopia.org>
101 +
102 +properties:
103 + volid:
104 + $ref: "/schemas/types.yaml#/definitions/uint32"
105 + description:
106 + Match UBI volume ID
107 +
108 + volname:
109 + $ref: "/schemas/types.yaml#/definitions/string"
110 + description:
111 + Match UBI volume ID
112 +
113 +anyOf:
114 + - required:
115 + - volid
116 +
117 + - required:
118 + - volname
119 +
120 +# This is a generic file other binding inherit from and extend
121 +additionalProperties: true