35a4afd67b9a80d045864dc891787cba6a4d02d3
[openwrt/staging/blogic.git] /
1 From 2fa7294175c76e1ec568aa75c1891fd908728c8d Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Fri, 12 Mar 2021 14:49:18 +0100
4 Subject: [PATCH] dt-bindings: mtd: add binding for Linksys Northstar
5 partitions
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 Linksys on Broadcom Northstar devices uses fixed flash layout with
11 multiple firmware partitions.
12
13 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
14 Reviewed-by: Rob Herring <robh@kernel.org>
15 Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
16 Link: https://lore.kernel.org/linux-mtd/20210312134919.7767-1-zajec5@gmail.com
17 ---
18 .../mtd/partitions/linksys,ns-partitions.yaml | 74 +++++++++++++++++++
19 1 file changed, 74 insertions(+)
20 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/linksys,ns-partitions.yaml
21
22 --- /dev/null
23 +++ b/Documentation/devicetree/bindings/mtd/partitions/linksys,ns-partitions.yaml
24 @@ -0,0 +1,74 @@
25 +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
26 +%YAML 1.2
27 +---
28 +$id: http://devicetree.org/schemas/mtd/partitions/linksys,ns-partitions.yaml#
29 +$schema: http://devicetree.org/meta-schemas/core.yaml#
30 +
31 +title: Linksys Northstar partitioning
32 +
33 +description: |
34 + Linksys devices based on Broadcom Northstar architecture often use two
35 + firmware partitions. One is used for regular booting, the other is treated as
36 + fallback.
37 +
38 + This binding allows defining all fixed partitions and marking those containing
39 + firmware. System can use that information e.g. for booting or flashing
40 + purposes.
41 +
42 +maintainers:
43 + - Rafał Miłecki <rafal@milecki.pl>
44 +
45 +properties:
46 + compatible:
47 + const: linksys,ns-partitions
48 +
49 + "#address-cells":
50 + enum: [ 1, 2 ]
51 +
52 + "#size-cells":
53 + enum: [ 1, 2 ]
54 +
55 +patternProperties:
56 + "^partition@[0-9a-f]+$":
57 + $ref: "partition.yaml#"
58 + properties:
59 + compatible:
60 + items:
61 + - const: linksys,ns-firmware
62 + - const: brcm,trx
63 + unevaluatedProperties: false
64 +
65 +required:
66 + - "#address-cells"
67 + - "#size-cells"
68 +
69 +additionalProperties: false
70 +
71 +examples:
72 + - |
73 + partitions {
74 + compatible = "linksys,ns-partitions";
75 + #address-cells = <1>;
76 + #size-cells = <1>;
77 +
78 + partition@0 {
79 + label = "boot";
80 + reg = <0x0 0x100000>;
81 + read-only;
82 + };
83 +
84 + partition@100000 {
85 + label = "nvram";
86 + reg = <0x100000 0x100000>;
87 + };
88 +
89 + partition@200000 {
90 + compatible = "linksys,ns-firmware", "brcm,trx";
91 + reg = <0x200000 0xf00000>;
92 + };
93 +
94 + partition@1100000 {
95 + compatible = "linksys,ns-firmware", "brcm,trx";
96 + reg = <0x1100000 0xf00000>;
97 + };
98 + };