Skip to content

Commit d55ce49

Browse files
csharper2005miquelraynal
authored andcommitted
dt-bindings: mtd: partitions: Extend fixed-partitions binding
Extend fixed-partitions binding for support of Sercomm partition parser (add "sercomm,sc-partitions" compatible). Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220516151725.885427-1-csharper2005@gmail.com
1 parent d217c4d commit d55ce49

1 file changed

Lines changed: 53 additions & 2 deletions

File tree

Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,36 @@ maintainers:
1919

2020
properties:
2121
compatible:
22-
const: fixed-partitions
22+
oneOf:
23+
- const: fixed-partitions
24+
- items:
25+
- const: sercomm,sc-partitions
26+
- const: fixed-partitions
2327

2428
"#address-cells": true
2529

2630
"#size-cells": true
2731

2832
patternProperties:
2933
"@[0-9a-f]+$":
30-
$ref: "partition.yaml#"
34+
allOf:
35+
- $ref: "partition.yaml#"
36+
- if:
37+
properties:
38+
compatible:
39+
contains:
40+
const: sercomm,sc-partitions
41+
then:
42+
properties:
43+
sercomm,scpart-id:
44+
description: Partition id in Sercomm partition map. Mtd
45+
parser uses this id to find a record in the partition map
46+
containing offset and size of the current partition. The
47+
values from partition map overrides partition offset and
48+
size defined in reg property of the dts. Frequently these
49+
values are the same, but may differ if device has bad
50+
eraseblocks on a flash.
51+
$ref: /schemas/types.yaml#/definitions/uint32
3152

3253
required:
3354
- "#address-cells"
@@ -52,6 +73,7 @@ examples:
5273
reg = <0x0100000 0x200000>;
5374
};
5475
};
76+
5577
- |
5678
partitions {
5779
compatible = "fixed-partitions";
@@ -64,6 +86,7 @@ examples:
6486
reg = <0x00000000 0x1 0x00000000>;
6587
};
6688
};
89+
6790
- |
6891
partitions {
6992
compatible = "fixed-partitions";
@@ -82,6 +105,7 @@ examples:
82105
reg = <0x2 0x00000000 0x1 0x00000000>;
83106
};
84107
};
108+
85109
- |
86110
partitions {
87111
compatible = "fixed-partitions";
@@ -119,3 +143,30 @@ examples:
119143
};
120144
};
121145
};
146+
147+
- |
148+
partitions {
149+
compatible = "sercomm,sc-partitions", "fixed-partitions";
150+
#address-cells = <1>;
151+
#size-cells = <1>;
152+
153+
partition@0 {
154+
label = "u-boot";
155+
reg = <0x0 0x100000>;
156+
sercomm,scpart-id = <0>;
157+
read-only;
158+
};
159+
160+
partition@100000 {
161+
label = "dynamic partition map";
162+
reg = <0x100000 0x100000>;
163+
sercomm,scpart-id = <1>;
164+
};
165+
166+
partition@200000 {
167+
label = "Factory";
168+
reg = <0x200000 0x100000>;
169+
sercomm,scpart-id = <2>;
170+
read-only;
171+
};
172+
};

0 commit comments

Comments
 (0)