Debian Codegraph @

Documentation/devicetree/bindings/eeprom/at24.yaml

raw
1 # SPDX-License-Identifier: GPL-2.0-only
2 # Copyright 2019 BayLibre SAS
3 %YAML 1.2
4 ---
5 $id: http://devicetree.org/schemas/eeprom/at24.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
7
8 title: I2C EEPROMs compatible with Atmel's AT24
9
10 maintainers:
11 - Bartosz Golaszewski <[email protected]>
12
13 allOf:
14 - $ref: /schemas/nvmem/nvmem.yaml
15 - $ref: /schemas/nvmem/nvmem-deprecated-cells.yaml
16
17 select:
18 properties:
19 compatible:
20 contains:
21 anyOf:
22 - pattern: "^atmel,(24(c|cs|mac)[0-9]+|spd)$"
23 - enum: ["microchip,24aa025e48", "microchip,24aa025e64"]
24 required:
25 - compatible
26
27 properties:
28 $nodename:
29 pattern: "^eeprom@[0-9a-f]{1,2}$"
30
31 # There are multiple known vendors who manufacture EEPROM chips compatible
32 # with Atmel's AT24. The compatible string requires either a single item
33 # if the memory comes from Atmel (in which case the vendor part must be
34 # 'atmel') or two items with the same 'model' part where the vendor part of
35 # the first one is the actual manufacturer and the second item is the
36 # corresponding 'atmel,<model>' from Atmel.
37 compatible:
38 oneOf:
39 - allOf:
40 - minItems: 1
41 items:
42 - pattern: "^(atmel|catalyst|microchip|nxp|ramtron|renesas|rohm|st),(24(c|cs|lc|mac)[0-9]+|spd)$"
43 - pattern: "^atmel,(24(c|cs|mac)[0-9]+|spd)$"
44 - oneOf:
45 - items:
46 pattern: c00$
47 - items:
48 pattern: c01$
49 - items:
50 pattern: cs01$
51 - items:
52 pattern: c02$
53 - items:
54 pattern: cs02$
55 - items:
56 pattern: mac402$
57 - items:
58 pattern: mac602$
59 - items:
60 pattern: c04$
61 - items:
62 pattern: cs04$
63 - items:
64 pattern: c08$
65 - items:
66 pattern: cs08$
67 - items:
68 pattern: c16$
69 - items:
70 pattern: cs16$
71 - items:
72 pattern: c32$
73 - items:
74 pattern: cs32$
75 - items:
76 pattern: c64$
77 - items:
78 pattern: cs64$
79 - items:
80 pattern: c128$
81 - items:
82 pattern: cs128$
83 - items:
84 pattern: c256$
85 - items:
86 pattern: cs256$
87 - items:
88 pattern: c512$
89 - items:
90 pattern: cs512$
91 - items:
92 pattern: c1024$
93 - items:
94 pattern: cs1024$
95 - items:
96 pattern: c1025$
97 - items:
98 pattern: cs1025$
99 - items:
100 pattern: c2048$
101 - items:
102 pattern: cs2048$
103 - items:
104 pattern: spd$
105 # These are special cases that don't conform to the above pattern.
106 # Each requires a standard at24 model as fallback.
107 - items:
108 - enum:
109 - rohm,br24g01
110 - rohm,br24t01
111 - const: atmel,24c01
112 - items:
113 - enum:
114 - nxp,se97b
115 - renesas,r1ex24002
116 - const: atmel,24c02
117 - items:
118 - enum:
119 - belling,bl24c04a
120 - giantec,gt24c04a
121 - onnn,cat24c04
122 - onnn,cat24c05
123 - rohm,br24g04
124 - const: atmel,24c04
125 - items:
126 - enum:
127 - belling,bl24c16a
128 - belling,bl24c16f
129 - renesas,r1ex24016
130 - const: atmel,24c16
131 - items:
132 - const: giantec,gt24c32a
133 - const: atmel,24c32
134 - items:
135 - enum:
136 - belling,bl24s64
137 - giantec,gt24p64a
138 - onnn,n24s64b
139 - puya,p24c64f
140 - const: atmel,24c64
141 - items:
142 - enum:
143 - giantec,gt24p128e
144 - giantec,gt24p128f
145 - puya,p24c128f
146 - renesas,r1ex24128
147 - samsung,s524ad0xd1
148 - const: atmel,24c128
149 - items:
150 - enum:
151 - giantec,gt24c256c
152 - puya,p24c256c
153 - const: atmel,24c256
154 - items:
155 - const: microchip,24aa025e48
156 - items:
157 - const: microchip,24aa025e64
158 - items:
159 - const: st,24256e-wl
160 - pattern: '^atmel,24c(32|64)d-wl$' # Actual vendor is st
161
162 label:
163 description: Descriptive name of the EEPROM.
164
165 reg:
166 maxItems: 1
167
168 pagesize:
169 description:
170 The length of the pagesize for writing. Please consult the
171 manual of your device, that value varies a lot. A wrong value
172 may result in data loss! If not specified, a safety value of
173 '1' is used which will be very slow.
174 $ref: /schemas/types.yaml#/definitions/uint32
175 enum: [1, 8, 16, 32, 64, 128, 256]
176 default: 1
177
178 read-only:
179 $ref: /schemas/types.yaml#/definitions/flag
180 description:
181 Disables writes to the eeprom.
182
183 size:
184 $ref: /schemas/types.yaml#/definitions/uint32
185 description:
186 Total eeprom size in bytes.
187
188 no-read-rollover:
189 $ref: /schemas/types.yaml#/definitions/flag
190 description:
191 Indicates that the multi-address eeprom does not automatically roll
192 over reads to the next slave address. Please consult the manual of
193 your device.
194
195 wp-gpios: true
196
197 address-width:
198 description:
199 Number of address bits.
200 $ref: /schemas/types.yaml#/definitions/uint32
201 default: 8
202 enum: [ 8, 16 ]
203
204 num-addresses:
205 description:
206 Total number of i2c slave addresses this device takes.
207 $ref: /schemas/types.yaml#/definitions/uint32
208 default: 1
209 minimum: 1
210 maximum: 8
211
212 vcc-supply:
213 description:
214 phandle of the regulator that provides the supply voltage.
215
216 required:
217 - compatible
218 - reg
219
220 unevaluatedProperties: false
221
222 examples:
223 - |
224 i2c {
225 #address-cells = <1>;
226 #size-cells = <0>;
227
228 eeprom@52 {
229 compatible = "microchip,24c32", "atmel,24c32";
230 reg = <0x52>;
231 pagesize = <32>;
232 wp-gpios = <&gpio1 3 0>;
233 num-addresses = <8>;
234 };
235 };
236 ...