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/nvmem-cells.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Nvmem cells
8
9description: |
10  Any partition containing the compatible "nvmem-cells" will register as a
11  nvmem provider.
12  Each direct subnodes represents a nvmem cell following the nvmem binding.
13  Nvmem binding to declare nvmem-cells can be found in:
14  Documentation/devicetree/bindings/nvmem/nvmem.yaml
15
16maintainers:
17  - Ansuel Smith <ansuelsmth@gmail.com>
18
19allOf:
20  - $ref: /schemas/mtd/partitions/partition.yaml#
21  - $ref: /schemas/nvmem/nvmem.yaml#
22
23properties:
24  compatible:
25    const: nvmem-cells
26
27required:
28  - compatible
29
30unevaluatedProperties: false
31
32examples:
33  - |
34    partitions {
35      compatible = "fixed-partitions";
36      #address-cells = <1>;
37      #size-cells = <1>;
38
39      /* ... */
40
41      };
42      art: art@1200000 {
43        compatible = "nvmem-cells";
44        reg = <0x1200000 0x0140000>;
45        label = "art";
46        read-only;
47        #address-cells = <1>;
48        #size-cells = <1>;
49
50        macaddr_gmac1: macaddr_gmac1@0 {
51          reg = <0x0 0x6>;
52        };
53
54        macaddr_gmac2: macaddr_gmac2@6 {
55          reg = <0x6 0x6>;
56        };
57
58        pre_cal_24g: pre_cal_24g@1000 {
59          reg = <0x1000 0x2f20>;
60        };
61
62        pre_cal_5g: pre_cal_5g@5000{
63          reg = <0x5000 0x2f20>;
64        };
65      };
66  - |
67    partitions {
68        compatible = "fixed-partitions";
69        #address-cells = <1>;
70        #size-cells = <1>;
71
72        partition@0 {
73            label = "bootloader";
74            reg = <0x000000 0x100000>;
75            read-only;
76        };
77
78        firmware@100000 {
79            compatible = "brcm,trx";
80            label = "firmware";
81            reg = <0x100000 0xe00000>;
82        };
83
84        calibration@f00000 {
85            compatible = "nvmem-cells";
86            label = "calibration";
87            reg = <0xf00000 0x100000>;
88            #address-cells = <1>;
89            #size-cells = <1>;
90
91            wifi0@0 {
92                reg = <0x000000 0x080000>;
93            };
94
95            wifi1@80000 {
96                reg = <0x080000 0x080000>;
97            };
98        };
99    };
100