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