diff options
author | David Daney <david.daney@cavium.com> | 2012-08-22 15:03:57 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-05 17:10:29 -0400 |
commit | d6ae0d578d24303941c1424b049d2cae28277666 (patch) | |
tree | 408e4d6d19acc44353761517731c5ce486e4882e /Documentation | |
parent | 9af514232e9e74cbcd24700fc321b7c71a536568 (diff) |
misc/at25, dt: Improve at25 SPI eeprom device tree bindings.
Commit 002176db (misc: at25: Parse dt settings) added device tree
bindings the differ significantly in style from the I2C EEPROM
bindings and don't seem well vetted. Here I deprecate (but still
support) the "at25,*" properties, and add what I hope is a better
alternative. These new bindings also happen to be deployed in the
field and were previously submitted for consideration here:
https://lists.ozlabs.org/pipermail/devicetree-discuss/2012-May/015556.html
The advantages of the new bindings are that they are similar to the
I2C EEPROMs and they don't conflate read-only and the address width
modes in a binary encoded blob.
Signed-off-by: David Daney <david.daney@cavium.com>
Cc: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/devicetree/bindings/misc/at25.txt | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/Documentation/devicetree/bindings/misc/at25.txt b/Documentation/devicetree/bindings/misc/at25.txt index ab3c327929dd..1d3447165c37 100644 --- a/Documentation/devicetree/bindings/misc/at25.txt +++ b/Documentation/devicetree/bindings/misc/at25.txt | |||
@@ -1,21 +1,35 @@ | |||
1 | Atmel AT25 eeprom | 1 | EEPROMs (SPI) compatible with Atmel at25. |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "atmel,at25". | 4 | - compatible : "atmel,at25". |
5 | - reg : chip select number | 5 | - reg : chip select number |
6 | - spi-max-frequency : max spi frequency to use | 6 | - spi-max-frequency : max spi frequency to use |
7 | - pagesize : size of the eeprom page | ||
8 | - size : total eeprom size in bytes | ||
9 | - address-width : number of address bits (one of 8, 16, or 24) | ||
7 | 10 | ||
11 | Optional properties: | ||
12 | - spi-cpha : SPI shifted clock phase, as per spi-bus bindings. | ||
13 | - spi-cpol : SPI inverse clock polarity, as per spi-bus bindings. | ||
14 | - read-only : this parameter-less property disables writes to the eeprom | ||
15 | |||
16 | Obsolete legacy properties are can be used in place of "size", "pagesize", | ||
17 | "address-width", and "read-only": | ||
8 | - at25,byte-len : total eeprom size in bytes | 18 | - at25,byte-len : total eeprom size in bytes |
9 | - at25,addr-mode : addr-mode flags, as defined in include/linux/spi/eeprom.h | 19 | - at25,addr-mode : addr-mode flags, as defined in include/linux/spi/eeprom.h |
10 | - at25,page-size : size of the eeprom page | 20 | - at25,page-size : size of the eeprom page |
11 | 21 | ||
12 | Examples: | 22 | Additional compatible properties are also allowed. |
13 | at25@0 { | 23 | |
14 | compatible = "atmel,at25"; | 24 | Example: |
15 | reg = <0> | 25 | at25@0 { |
16 | spi-max-frequency = <5000000>; | 26 | compatible = "atmel,at25", "st,m95256"; |
27 | reg = <0> | ||
28 | spi-max-frequency = <5000000>; | ||
29 | spi-cpha; | ||
30 | spi-cpol; | ||
17 | 31 | ||
18 | at25,byte-len = <0x8000>; | 32 | pagesize = <64>; |
19 | at25,addr-mode = <2>; | 33 | size = <32768>; |
20 | at25,page-size = <64>; | 34 | address-width = <16>; |
21 | }; | 35 | }; |