0eb4c637cf44749de7fd294c9e53eb720530ae6e
[openwrt/staging/adrian.git] /
1 From 377aa0135dc8489312edd3184d143ce3a89ff7ee Mon Sep 17 00:00:00 2001
2 From: Ansuel Smith <ansuelsmth@gmail.com>
3 Date: Fri, 12 Mar 2021 07:28:21 +0100
4 Subject: [PATCH] dt-bindings: mtd: Document use of nvmem-cells compatible
5
6 Document nvmem-cells compatible used to treat mtd partitions as a
7 nvmem provider.
8
9 Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
10 Reviewed-by: Rob Herring <robh@kernel.org>
11 ---
12 .../bindings/mtd/partitions/nvmem-cells.yaml | 99 +++++++++++++++++++
13 1 file changed, 99 insertions(+)
14 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/nvmem-cells.yaml
15
16 --- /dev/null
17 +++ b/Documentation/devicetree/bindings/mtd/partitions/nvmem-cells.yaml
18 @@ -0,0 +1,99 @@
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/nvmem-cells.yaml#
23 +$schema: http://devicetree.org/meta-schemas/core.yaml#
24 +
25 +title: Nvmem cells
26 +
27 +description: |
28 + Any partition containing the compatible "nvmem-cells" will register as a
29 + nvmem provider.
30 + Each direct subnodes represents a nvmem cell following the nvmem binding.
31 + Nvmem binding to declare nvmem-cells can be found in:
32 + Documentation/devicetree/bindings/nvmem/nvmem.yaml
33 +
34 +maintainers:
35 + - Ansuel Smith <ansuelsmth@gmail.com>
36 +
37 +allOf:
38 + - $ref: /schemas/nvmem/nvmem.yaml#
39 +
40 +properties:
41 + compatible:
42 + const: nvmem-cells
43 +
44 +required:
45 + - compatible
46 +
47 +additionalProperties: true
48 +
49 +examples:
50 + - |
51 + partitions {
52 + compatible = "fixed-partitions";
53 + #address-cells = <1>;
54 + #size-cells = <1>;
55 +
56 + /* ... */
57 +
58 + };
59 + art: art@1200000 {
60 + compatible = "nvmem-cells";
61 + reg = <0x1200000 0x0140000>;
62 + label = "art";
63 + read-only;
64 + #address-cells = <1>;
65 + #size-cells = <1>;
66 +
67 + macaddr_gmac1: macaddr_gmac1@0 {
68 + reg = <0x0 0x6>;
69 + };
70 +
71 + macaddr_gmac2: macaddr_gmac2@6 {
72 + reg = <0x6 0x6>;
73 + };
74 +
75 + pre_cal_24g: pre_cal_24g@1000 {
76 + reg = <0x1000 0x2f20>;
77 + };
78 +
79 + pre_cal_5g: pre_cal_5g@5000{
80 + reg = <0x5000 0x2f20>;
81 + };
82 + };
83 + - |
84 + partitions {
85 + compatible = "fixed-partitions";
86 + #address-cells = <1>;
87 + #size-cells = <1>;
88 +
89 + partition@0 {
90 + label = "bootloader";
91 + reg = <0x000000 0x100000>;
92 + read-only;
93 + };
94 +
95 + firmware@100000 {
96 + compatible = "brcm,trx";
97 + label = "firmware";
98 + reg = <0x100000 0xe00000>;
99 + };
100 +
101 + calibration@f00000 {
102 + compatible = "nvmem-cells";
103 + label = "calibration";
104 + reg = <0xf00000 0x100000>;
105 + ranges = <0 0xf00000 0x100000>;
106 + #address-cells = <1>;
107 + #size-cells = <1>;
108 +
109 + wifi0@0 {
110 + reg = <0x000000 0x080000>;
111 + };
112 +
113 + wifi1@80000 {
114 + reg = <0x080000 0x080000>;
115 + };
116 + };
117 + };