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