1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/nvmem/nvmem.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: NVMEM (Non Volatile Memory) Device Tree Bindings
8
9maintainers:
10  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11
12description: |
13  This binding is intended to represent the location of hardware
14  configuration data stored in NVMEMs like eeprom, efuses and so on.
15
16  On a significant proportion of boards, the manufacturer has stored
17  some data on NVMEM, for the OS to be able to retrieve these
18  information and act upon it. Obviously, the OS has to know about
19  where to retrieve these data from, and where they are stored on the
20  storage device.
21
22properties:
23  $nodename:
24    pattern: "^(eeprom|efuse|nvram)(@.*|-[0-9a-f])*$"
25
26  "#address-cells":
27    const: 1
28
29  "#size-cells":
30    const: 1
31
32  read-only:
33    $ref: /schemas/types.yaml#/definitions/flag
34    description:
35      Mark the provider as read only.
36
37patternProperties:
38  "^.*@[0-9a-f]+$":
39    type: object
40
41    properties:
42      reg:
43        maxItems: 1
44        description:
45          Offset and size in bytes within the storage device.
46
47      bits:
48        maxItems: 1
49        items:
50          items:
51            - minimum: 0
52              maximum: 7
53              description:
54                Offset in bit within the address range specified by reg.
55            - minimum: 1
56              description:
57                Size in bit within the address range specified by reg.
58
59    required:
60      - reg
61
62    additionalProperties: false
63
64examples:
65  - |
66      qfprom: eeprom@700000 {
67          #address-cells = <1>;
68          #size-cells = <1>;
69
70          /* ... */
71
72          /* Data cells */
73          tsens_calibration: calib@404 {
74              reg = <0x404 0x10>;
75          };
76
77          tsens_calibration_bckp: calib_bckp@504 {
78              reg = <0x504 0x11>;
79              bits = <6 128>;
80          };
81
82          pvs_version: pvs-version@6 {
83              reg = <0x6 0x2>;
84              bits = <7 2>;
85          };
86
87          speed_bin: speed-bin@c{
88              reg = <0xc 0x1>;
89              bits = <2 3>;
90          };
91      };
92
93...
94