17f3bf420SBartosz Golaszewski# SPDX-License-Identifier: GPL-2.0-only 27f3bf420SBartosz Golaszewski# Copyright 2019 BayLibre SAS 37f3bf420SBartosz Golaszewski%YAML 1.2 47f3bf420SBartosz Golaszewski--- 545698208SRob Herring$id: http://devicetree.org/schemas/eeprom/at24.yaml# 645698208SRob Herring$schema: http://devicetree.org/meta-schemas/core.yaml# 77f3bf420SBartosz Golaszewski 87f3bf420SBartosz Golaszewskititle: I2C EEPROMs compatible with Atmel's AT24 97f3bf420SBartosz Golaszewski 107f3bf420SBartosz Golaszewskimaintainers: 117f3bf420SBartosz Golaszewski - Bartosz Golaszewski <bgolaszewski@baylibre.com> 127f3bf420SBartosz Golaszewski 13ca104926SMiquel RaynalallOf: 14ca104926SMiquel Raynal - $ref: /schemas/nvmem/nvmem.yaml 152b107158SRafał Miłecki - $ref: /schemas/nvmem/nvmem-deprecated-cells.yaml 16ca104926SMiquel Raynal 177f3bf420SBartosz Golaszewskiselect: 187f3bf420SBartosz Golaszewski properties: 197f3bf420SBartosz Golaszewski compatible: 207f3bf420SBartosz Golaszewski contains: 21c1ec80e5SAndrei Simion anyOf: 22c1ec80e5SAndrei Simion - pattern: "^atmel,(24(c|cs|mac)[0-9]+|spd)$" 23c1ec80e5SAndrei Simion - enum: ["microchip,24aa025e48", "microchip,24aa025e64"] 247f3bf420SBartosz Golaszewski required: 257f3bf420SBartosz Golaszewski - compatible 267f3bf420SBartosz Golaszewski 277f3bf420SBartosz Golaszewskiproperties: 287f3bf420SBartosz Golaszewski $nodename: 297f3bf420SBartosz Golaszewski pattern: "^eeprom@[0-9a-f]{1,2}$" 307f3bf420SBartosz Golaszewski 317f3bf420SBartosz Golaszewski # There are multiple known vendors who manufacture EEPROM chips compatible 327f3bf420SBartosz Golaszewski # with Atmel's AT24. The compatible string requires either a single item 337f3bf420SBartosz Golaszewski # if the memory comes from Atmel (in which case the vendor part must be 347f3bf420SBartosz Golaszewski # 'atmel') or two items with the same 'model' part where the vendor part of 357f3bf420SBartosz Golaszewski # the first one is the actual manufacturer and the second item is the 367f3bf420SBartosz Golaszewski # corresponding 'atmel,<model>' from Atmel. 377f3bf420SBartosz Golaszewski compatible: 387f3bf420SBartosz Golaszewski oneOf: 397f3bf420SBartosz Golaszewski - allOf: 407f3bf420SBartosz Golaszewski - minItems: 1 417f3bf420SBartosz Golaszewski items: 42410dcdc2SMasahiro Yamada - pattern: "^(atmel|catalyst|microchip|nxp|ramtron|renesas|rohm|st),(24(c|cs|lc|mac)[0-9]+|spd)$" 437f3bf420SBartosz Golaszewski - pattern: "^atmel,(24(c|cs|mac)[0-9]+|spd)$" 447f3bf420SBartosz Golaszewski - oneOf: 457f3bf420SBartosz Golaszewski - items: 467f3bf420SBartosz Golaszewski pattern: c00$ 477f3bf420SBartosz Golaszewski - items: 487f3bf420SBartosz Golaszewski pattern: c01$ 497f3bf420SBartosz Golaszewski - items: 507f3bf420SBartosz Golaszewski pattern: cs01$ 517f3bf420SBartosz Golaszewski - items: 527f3bf420SBartosz Golaszewski pattern: c02$ 537f3bf420SBartosz Golaszewski - items: 547f3bf420SBartosz Golaszewski pattern: cs02$ 557f3bf420SBartosz Golaszewski - items: 567f3bf420SBartosz Golaszewski pattern: mac402$ 577f3bf420SBartosz Golaszewski - items: 587f3bf420SBartosz Golaszewski pattern: mac602$ 597f3bf420SBartosz Golaszewski - items: 607f3bf420SBartosz Golaszewski pattern: c04$ 617f3bf420SBartosz Golaszewski - items: 627f3bf420SBartosz Golaszewski pattern: cs04$ 637f3bf420SBartosz Golaszewski - items: 647f3bf420SBartosz Golaszewski pattern: c08$ 657f3bf420SBartosz Golaszewski - items: 667f3bf420SBartosz Golaszewski pattern: cs08$ 677f3bf420SBartosz Golaszewski - items: 687f3bf420SBartosz Golaszewski pattern: c16$ 697f3bf420SBartosz Golaszewski - items: 707f3bf420SBartosz Golaszewski pattern: cs16$ 717f3bf420SBartosz Golaszewski - items: 727f3bf420SBartosz Golaszewski pattern: c32$ 737f3bf420SBartosz Golaszewski - items: 747f3bf420SBartosz Golaszewski pattern: cs32$ 757f3bf420SBartosz Golaszewski - items: 767f3bf420SBartosz Golaszewski pattern: c64$ 777f3bf420SBartosz Golaszewski - items: 787f3bf420SBartosz Golaszewski pattern: cs64$ 797f3bf420SBartosz Golaszewski - items: 807f3bf420SBartosz Golaszewski pattern: c128$ 817f3bf420SBartosz Golaszewski - items: 827f3bf420SBartosz Golaszewski pattern: cs128$ 837f3bf420SBartosz Golaszewski - items: 847f3bf420SBartosz Golaszewski pattern: c256$ 857f3bf420SBartosz Golaszewski - items: 867f3bf420SBartosz Golaszewski pattern: cs256$ 877f3bf420SBartosz Golaszewski - items: 887f3bf420SBartosz Golaszewski pattern: c512$ 897f3bf420SBartosz Golaszewski - items: 907f3bf420SBartosz Golaszewski pattern: cs512$ 917f3bf420SBartosz Golaszewski - items: 927f3bf420SBartosz Golaszewski pattern: c1024$ 937f3bf420SBartosz Golaszewski - items: 947f3bf420SBartosz Golaszewski pattern: cs1024$ 957f3bf420SBartosz Golaszewski - items: 96151a1523SMaxim Kochetkov pattern: c1025$ 97151a1523SMaxim Kochetkov - items: 98151a1523SMaxim Kochetkov pattern: cs1025$ 99151a1523SMaxim Kochetkov - items: 1007f3bf420SBartosz Golaszewski pattern: c2048$ 1017f3bf420SBartosz Golaszewski - items: 1027f3bf420SBartosz Golaszewski pattern: cs2048$ 1037f3bf420SBartosz Golaszewski - items: 1047f3bf420SBartosz Golaszewski pattern: spd$ 1057f3bf420SBartosz Golaszewski # These are special cases that don't conform to the above pattern. 1067f3bf420SBartosz Golaszewski # Each requires a standard at24 model as fallback. 1077f3bf420SBartosz Golaszewski - items: 1086f89f413SGeert Uytterhoeven - enum: 1096f89f413SGeert Uytterhoeven - rohm,br24g01 1106f89f413SGeert Uytterhoeven - rohm,br24t01 1116f89f413SGeert Uytterhoeven - const: atmel,24c01 1126f89f413SGeert Uytterhoeven - items: 1136f89f413SGeert Uytterhoeven - enum: 1146f89f413SGeert Uytterhoeven - nxp,se97b 1156f89f413SGeert Uytterhoeven - renesas,r1ex24002 1167f3bf420SBartosz Golaszewski - const: atmel,24c02 1177f3bf420SBartosz Golaszewski - items: 1186f89f413SGeert Uytterhoeven - enum: 119*36e071d2SHeiko Stuebner - giantec,gt24c04a 1206f89f413SGeert Uytterhoeven - onnn,cat24c04 1216f89f413SGeert Uytterhoeven - onnn,cat24c05 122614ef4d3SPhilipp Zabel - rohm,br24g04 12376292540SRaag Jadav - const: atmel,24c04 12476292540SRaag Jadav - items: 125d83c2177SFrieder Schrempf - enum: 126d83c2177SFrieder Schrempf - belling,bl24c16a 127d83c2177SFrieder Schrempf - renesas,r1ex24016 1287f3bf420SBartosz Golaszewski - const: atmel,24c16 1297f3bf420SBartosz Golaszewski - items: 13061a48006SBartosz Golaszewski - const: giantec,gt24c32a 13161a48006SBartosz Golaszewski - const: atmel,24c32 13261a48006SBartosz Golaszewski - items: 1333a9ba4e3SFrieder Schrempf - const: onnn,n24s64b 1343a9ba4e3SFrieder Schrempf - const: atmel,24c64 1353a9ba4e3SFrieder Schrempf - items: 136dedf10f4SRob Herring - enum: 137dedf10f4SRob Herring - renesas,r1ex24128 138dedf10f4SRob Herring - samsung,s524ad0xd1 1397f3bf420SBartosz Golaszewski - const: atmel,24c128 140c1ec80e5SAndrei Simion - items: 141c1ec80e5SAndrei Simion - const: microchip,24aa025e48 142c1ec80e5SAndrei Simion - items: 143c1ec80e5SAndrei Simion - const: microchip,24aa025e64 144b3de7b43SRob Herring - pattern: '^atmel,24c(32|64)d-wl$' # Actual vendor is st 1457f3bf420SBartosz Golaszewski 146412b7a52SJon Hunter label: 147412b7a52SJon Hunter description: Descriptive name of the EEPROM. 148412b7a52SJon Hunter 1497f3bf420SBartosz Golaszewski reg: 1507f3bf420SBartosz Golaszewski maxItems: 1 1517f3bf420SBartosz Golaszewski 1527f3bf420SBartosz Golaszewski pagesize: 1537f3bf420SBartosz Golaszewski description: 1547f3bf420SBartosz Golaszewski The length of the pagesize for writing. Please consult the 1557f3bf420SBartosz Golaszewski manual of your device, that value varies a lot. A wrong value 1567f3bf420SBartosz Golaszewski may result in data loss! If not specified, a safety value of 1577f3bf420SBartosz Golaszewski '1' is used which will be very slow. 1583d21a460SRob Herring $ref: /schemas/types.yaml#/definitions/uint32 159cf4bc468SGeert Uytterhoeven enum: [1, 8, 16, 32, 64, 128, 256] 1607f3bf420SBartosz Golaszewski default: 1 1617f3bf420SBartosz Golaszewski 1627f3bf420SBartosz Golaszewski read-only: 163d69c6dddSRob Herring $ref: /schemas/types.yaml#/definitions/flag 1647f3bf420SBartosz Golaszewski description: 1657f3bf420SBartosz Golaszewski Disables writes to the eeprom. 1667f3bf420SBartosz Golaszewski 1677f3bf420SBartosz Golaszewski size: 1687f3bf420SBartosz Golaszewski $ref: /schemas/types.yaml#/definitions/uint32 1697f3bf420SBartosz Golaszewski description: 1707f3bf420SBartosz Golaszewski Total eeprom size in bytes. 1717f3bf420SBartosz Golaszewski 1727f3bf420SBartosz Golaszewski no-read-rollover: 173d69c6dddSRob Herring $ref: /schemas/types.yaml#/definitions/flag 1747f3bf420SBartosz Golaszewski description: 1757f3bf420SBartosz Golaszewski Indicates that the multi-address eeprom does not automatically roll 1767f3bf420SBartosz Golaszewski over reads to the next slave address. Please consult the manual of 1777f3bf420SBartosz Golaszewski your device. 1787f3bf420SBartosz Golaszewski 1796c57a664SKhouloud Touil wp-gpios: true 1807f3bf420SBartosz Golaszewski 1817f3bf420SBartosz Golaszewski address-width: 1827f3bf420SBartosz Golaszewski description: 1837f3bf420SBartosz Golaszewski Number of address bits. 1843d21a460SRob Herring $ref: /schemas/types.yaml#/definitions/uint32 1857f3bf420SBartosz Golaszewski default: 8 1867f3bf420SBartosz Golaszewski enum: [ 8, 16 ] 1877f3bf420SBartosz Golaszewski 1887f3bf420SBartosz Golaszewski num-addresses: 1897f3bf420SBartosz Golaszewski description: 1907f3bf420SBartosz Golaszewski Total number of i2c slave addresses this device takes. 1913d21a460SRob Herring $ref: /schemas/types.yaml#/definitions/uint32 1927f3bf420SBartosz Golaszewski default: 1 1937f3bf420SBartosz Golaszewski minimum: 1 1947f3bf420SBartosz Golaszewski maximum: 8 1957f3bf420SBartosz Golaszewski 196c6cadc75SBibby Hsieh vcc-supply: 197c6cadc75SBibby Hsieh description: 198c6cadc75SBibby Hsieh phandle of the regulator that provides the supply voltage. 199c6cadc75SBibby Hsieh 2007f3bf420SBartosz Golaszewskirequired: 2017f3bf420SBartosz Golaszewski - compatible 2027f3bf420SBartosz Golaszewski - reg 2037f3bf420SBartosz Golaszewski 204ca104926SMiquel RaynalunevaluatedProperties: false 2057f464532SRob Herring 2067f3bf420SBartosz Golaszewskiexamples: 2077f3bf420SBartosz Golaszewski - | 2087f3bf420SBartosz Golaszewski i2c { 2097f3bf420SBartosz Golaszewski #address-cells = <1>; 2107f3bf420SBartosz Golaszewski #size-cells = <0>; 2117f3bf420SBartosz Golaszewski 2127f3bf420SBartosz Golaszewski eeprom@52 { 2137f3bf420SBartosz Golaszewski compatible = "microchip,24c32", "atmel,24c32"; 2147f3bf420SBartosz Golaszewski reg = <0x52>; 2157f3bf420SBartosz Golaszewski pagesize = <32>; 2167f3bf420SBartosz Golaszewski wp-gpios = <&gpio1 3 0>; 2177f3bf420SBartosz Golaszewski num-addresses = <8>; 2187f3bf420SBartosz Golaszewski }; 2197f3bf420SBartosz Golaszewski }; 2207f3bf420SBartosz Golaszewski... 221