Skip to content

Commit f48d2d6

Browse files
sjg20miquelraynal
authored andcommitted
dt-bindings: mtd: fixed-partition: Add binman compatibles
Add two compatibles for binman entries, as a starting point for the schema. Note that, after discussion on v2, we decided to keep the existing meaning of label so as not to require changes to existing userspace software when moving to use binman nodes to specify the firmware layout. Note also that, after discussion on v6, we decided to use the same 'fixed-partition' schema for the binman features, so this version adds a new 'binman.yaml' file providing the new compatibles to the existing partition.yaml binding. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent d8d42d4 commit f48d2d6

File tree

3 files changed

+79
-0
lines changed

3 files changed

+79
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mtd/partitions/binman.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Binman entries
8+
9+
description: |
10+
This corresponds to a binman 'entry'. It is a single partition which holds
11+
data of a defined type.
12+
13+
Binman uses the type to indicate what data file / type to place in the
14+
partition. There are quite a number of binman-specific entry types, such as
15+
section, fill and files, to be added later.
16+
17+
maintainers:
18+
- Simon Glass <[email protected]>
19+
20+
allOf:
21+
- $ref: /schemas/mtd/partitions/partition.yaml#
22+
23+
properties:
24+
compatible:
25+
enum:
26+
- u-boot # u-boot.bin from U-Boot project
27+
- tfa-bl31 # bl31.bin or bl31.elf from TF-A project
28+
29+
required:
30+
- compatible
31+
32+
unevaluatedProperties: false
33+
34+
examples:
35+
- |
36+
partitions {
37+
compatible = "fixed-partitions";
38+
#address-cells = <1>;
39+
#size-cells = <1>;
40+
41+
partition@100000 {
42+
compatible = "u-boot";
43+
reg = <0x100000 0xf00000>;
44+
align-size = <0x1000>;
45+
align-end = <0x10000>;
46+
};
47+
48+
partition@200000 {
49+
compatible = "tfa-bl31";
50+
reg = <0x200000 0x100000>;
51+
align = <0x4000>;
52+
};
53+
};

Documentation/devicetree/bindings/mtd/partitions/partition.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,24 @@ then:
118118

119119
# This is a generic file other binding inherit from and extend
120120
additionalProperties: true
121+
122+
examples:
123+
- |
124+
partitions {
125+
compatible = "fixed-partitions";
126+
#address-cells = <1>;
127+
#size-cells = <1>;
128+
129+
partition@100000 {
130+
compatible = "u-boot";
131+
reg = <0x100000 0xf00000>;
132+
align-size = <0x1000>;
133+
align-end = <0x10000>;
134+
};
135+
136+
partition@200000 {
137+
compatible = "tfa-bl31";
138+
reg = <0x200000 0x100000>;
139+
align = <0x4000>;
140+
};
141+
};

MAINTAINERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3611,6 +3611,11 @@ F: Documentation/filesystems/bfs.rst
36113611
F: fs/bfs/
36123612
F: include/uapi/linux/bfs_fs.h
36133613

3614+
BINMAN
3615+
M: Simon Glass <[email protected]>
3616+
S: Supported
3617+
F: Documentation/devicetree/bindings/mtd/partitions/binman*
3618+
36143619
BITMAP API
36153620
M: Yury Norov <[email protected]>
36163621
R: Rasmus Villemoes <[email protected]>

0 commit comments

Comments
 (0)