Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/Documentation/devicetree/bindings/eeprom/at25.yaml
51055 views
1
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2
%YAML 1.2
3
---
4
$id: http://devicetree.org/schemas/eeprom/at25.yaml#
5
$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7
title: SPI EEPROMs or FRAMs compatible with Atmel's AT25
8
9
maintainers:
10
- Christian Eggers <ceggers@arri.de>
11
12
properties:
13
$nodename:
14
anyOf:
15
- pattern: "^eeprom@[0-9a-f]{1,2}$"
16
- pattern: "^fram@[0-9a-f]{1,2}$"
17
18
# There are multiple known vendors who manufacture EEPROM chips compatible
19
# with Atmel's AT25. The compatible string requires two items where the
20
# 'vendor' and 'model' parts of the first are the actual chip and the second
21
# item is fixed to "atmel,at25". Some existing bindings only have the
22
# "atmel,at25" part and should be fixed by somebody who knows vendor and
23
# product.
24
compatible:
25
oneOf:
26
- items:
27
- enum:
28
- anvo,anv32c81w
29
- anvo,anv32e61w
30
- atmel,at25256B
31
- fujitsu,mb85rs1mt
32
- fujitsu,mb85rs256
33
- fujitsu,mb85rs64
34
- microchip,25aa010a
35
- microchip,at25160bn
36
- microchip,25lc040
37
- st,m95m02
38
- st,m95256
39
- st,m95640
40
- cypress,fm25
41
42
- const: atmel,at25
43
44
# Please don't use this alternative for new bindings.
45
- items:
46
- const: atmel,at25
47
48
reg:
49
maxItems: 1
50
51
pagesize:
52
$ref: /schemas/types.yaml#/definitions/uint32
53
enum: [1, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072]
54
description:
55
Size of the eeprom page. FRAMs don't have pages.
56
57
size:
58
$ref: /schemas/types.yaml#/definitions/uint32
59
description:
60
Total eeprom size in bytes.
61
Also used for FRAMs without device ID where the size cannot be detected.
62
63
address-width:
64
$ref: /schemas/types.yaml#/definitions/uint32
65
enum: [ 8, 9, 16, 24 ]
66
description:
67
Number of address bits.
68
For 9 bits, the MSB of the address is sent as bit 3 of the instruction
69
byte, before the address byte.
70
71
spi-cpha: true
72
73
spi-cpol: true
74
75
read-only:
76
description:
77
Disable writes to the eeprom.
78
type: boolean
79
80
wp-gpios:
81
maxItems: 1
82
description:
83
GPIO to which the write-protect pin of the chip is connected.
84
85
# Deprecated: at25,byte-len, at25,addr-mode, at25,page-size
86
at25,byte-len:
87
$ref: /schemas/types.yaml#/definitions/uint32
88
description:
89
Total eeprom size in bytes. Deprecated, use "size" property instead.
90
deprecated: true
91
92
at25,addr-mode:
93
$ref: /schemas/types.yaml#/definitions/uint32
94
description:
95
Addr-mode flags, as defined in include/linux/spi/eeprom.h.
96
Deprecated, use "address-width" property instead.
97
deprecated: true
98
99
at25,page-size:
100
$ref: /schemas/types.yaml#/definitions/uint32
101
description:
102
Size of the eeprom page. Deprecated, use "pagesize" property instead.
103
deprecated: true
104
105
required:
106
- compatible
107
- reg
108
- spi-max-frequency
109
110
allOf:
111
- $ref: /schemas/spi/spi-peripheral-props.yaml#
112
- $ref: /schemas/nvmem/nvmem.yaml
113
- if:
114
properties:
115
compatible:
116
not:
117
contains:
118
const: cypress,fm25
119
then:
120
required:
121
- pagesize
122
- size
123
- address-width
124
125
unevaluatedProperties: false
126
127
examples:
128
- |
129
#include <dt-bindings/gpio/gpio.h>
130
spi {
131
#address-cells = <1>;
132
#size-cells = <0>;
133
134
eeprom@0 {
135
compatible = "st,m95256", "atmel,at25";
136
reg = <0>;
137
spi-max-frequency = <5000000>;
138
spi-cpha;
139
spi-cpol;
140
wp-gpios = <&gpio1 3 0>;
141
142
pagesize = <64>;
143
size = <32768>;
144
address-width = <16>;
145
};
146
147
fram@1 {
148
compatible = "cypress,fm25", "atmel,at25";
149
reg = <1>;
150
spi-max-frequency = <40000000>;
151
};
152
153
fram@2 {
154
compatible = "cypress,fm25", "atmel,at25";
155
reg = <2>;
156
spi-max-frequency = <20000000>;
157
size = <2048>;
158
};
159
};
160
161