Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/Documentation/devicetree/bindings/eeprom/at25.yaml
29539 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,anv32e61w
29
- atmel,at25256B
30
- fujitsu,mb85rs1mt
31
- fujitsu,mb85rs256
32
- fujitsu,mb85rs64
33
- microchip,at25160bn
34
- microchip,25lc040
35
- st,m95m02
36
- st,m95256
37
- st,m95640
38
- cypress,fm25
39
40
- const: atmel,at25
41
42
# Please don't use this alternative for new bindings.
43
- items:
44
- const: atmel,at25
45
46
reg:
47
maxItems: 1
48
49
pagesize:
50
$ref: /schemas/types.yaml#/definitions/uint32
51
enum: [1, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072]
52
description:
53
Size of the eeprom page. FRAMs don't have pages.
54
55
size:
56
$ref: /schemas/types.yaml#/definitions/uint32
57
description:
58
Total eeprom size in bytes.
59
Also used for FRAMs without device ID where the size cannot be detected.
60
61
address-width:
62
$ref: /schemas/types.yaml#/definitions/uint32
63
enum: [ 8, 9, 16, 24 ]
64
description:
65
Number of address bits.
66
For 9 bits, the MSB of the address is sent as bit 3 of the instruction
67
byte, before the address byte.
68
69
spi-cpha: true
70
71
spi-cpol: true
72
73
read-only:
74
description:
75
Disable writes to the eeprom.
76
type: boolean
77
78
wp-gpios:
79
maxItems: 1
80
description:
81
GPIO to which the write-protect pin of the chip is connected.
82
83
# Deprecated: at25,byte-len, at25,addr-mode, at25,page-size
84
at25,byte-len:
85
$ref: /schemas/types.yaml#/definitions/uint32
86
description:
87
Total eeprom size in bytes. Deprecated, use "size" property instead.
88
deprecated: true
89
90
at25,addr-mode:
91
$ref: /schemas/types.yaml#/definitions/uint32
92
description:
93
Addr-mode flags, as defined in include/linux/spi/eeprom.h.
94
Deprecated, use "address-width" property instead.
95
deprecated: true
96
97
at25,page-size:
98
$ref: /schemas/types.yaml#/definitions/uint32
99
description:
100
Size of the eeprom page. Deprecated, use "pagesize" property instead.
101
deprecated: true
102
103
required:
104
- compatible
105
- reg
106
- spi-max-frequency
107
108
allOf:
109
- $ref: /schemas/spi/spi-peripheral-props.yaml#
110
- $ref: /schemas/nvmem/nvmem.yaml
111
- if:
112
properties:
113
compatible:
114
not:
115
contains:
116
const: cypress,fm25
117
then:
118
required:
119
- pagesize
120
- size
121
- address-width
122
123
unevaluatedProperties: false
124
125
examples:
126
- |
127
#include <dt-bindings/gpio/gpio.h>
128
spi {
129
#address-cells = <1>;
130
#size-cells = <0>;
131
132
eeprom@0 {
133
compatible = "st,m95256", "atmel,at25";
134
reg = <0>;
135
spi-max-frequency = <5000000>;
136
spi-cpha;
137
spi-cpol;
138
wp-gpios = <&gpio1 3 0>;
139
140
pagesize = <64>;
141
size = <32768>;
142
address-width = <16>;
143
};
144
145
fram@1 {
146
compatible = "cypress,fm25", "atmel,at25";
147
reg = <1>;
148
spi-max-frequency = <40000000>;
149
};
150
151
fram@2 {
152
compatible = "cypress,fm25", "atmel,at25";
153
reg = <2>;
154
spi-max-frequency = <20000000>;
155
size = <2048>;
156
};
157
};
158
159