Path: blob/main/sys/contrib/device-tree/Bindings/eeprom/at24.yaml
48375 views
# SPDX-License-Identifier: GPL-2.0-only1# Copyright 2019 BayLibre SAS2%YAML 1.23---4$id: http://devicetree.org/schemas/eeprom/at24.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#67title: I2C EEPROMs compatible with Atmel's AT2489maintainers:10- Bartosz Golaszewski <bgolaszewski@baylibre.com>1112allOf:13- $ref: /schemas/nvmem/nvmem.yaml14- $ref: /schemas/nvmem/nvmem-deprecated-cells.yaml1516select:17properties:18compatible:19contains:20anyOf:21- pattern: "^atmel,(24(c|cs|mac)[0-9]+|spd)$"22- enum: ["microchip,24aa025e48", "microchip,24aa025e64"]23required:24- compatible2526properties:27$nodename:28pattern: "^eeprom@[0-9a-f]{1,2}$"2930# There are multiple known vendors who manufacture EEPROM chips compatible31# with Atmel's AT24. The compatible string requires either a single item32# if the memory comes from Atmel (in which case the vendor part must be33# 'atmel') or two items with the same 'model' part where the vendor part of34# the first one is the actual manufacturer and the second item is the35# corresponding 'atmel,<model>' from Atmel.36compatible:37oneOf:38- allOf:39- minItems: 140items:41- pattern: "^(atmel|catalyst|microchip|nxp|ramtron|renesas|rohm|st),(24(c|cs|lc|mac)[0-9]+|spd)$"42- pattern: "^atmel,(24(c|cs|mac)[0-9]+|spd)$"43- oneOf:44- items:45pattern: c00$46- items:47pattern: c01$48- items:49pattern: cs01$50- items:51pattern: c02$52- items:53pattern: cs02$54- items:55pattern: mac402$56- items:57pattern: mac602$58- items:59pattern: c04$60- items:61pattern: cs04$62- items:63pattern: c08$64- items:65pattern: cs08$66- items:67pattern: c16$68- items:69pattern: cs16$70- items:71pattern: c32$72- items:73pattern: cs32$74- items:75pattern: c64$76- items:77pattern: cs64$78- items:79pattern: c128$80- items:81pattern: cs128$82- items:83pattern: c256$84- items:85pattern: cs256$86- items:87pattern: c512$88- items:89pattern: cs512$90- items:91pattern: c1024$92- items:93pattern: cs1024$94- items:95pattern: c1025$96- items:97pattern: cs1025$98- items:99pattern: c2048$100- items:101pattern: cs2048$102- items:103pattern: spd$104# These are special cases that don't conform to the above pattern.105# Each requires a standard at24 model as fallback.106- items:107- enum:108- rohm,br24g01109- rohm,br24t01110- const: atmel,24c01111- items:112- enum:113- nxp,se97b114- renesas,r1ex24002115- const: atmel,24c02116- items:117- enum:118- giantec,gt24c04a119- onnn,cat24c04120- onnn,cat24c05121- rohm,br24g04122- const: atmel,24c04123- items:124- enum:125- belling,bl24c16a126- renesas,r1ex24016127- const: atmel,24c16128- items:129- const: giantec,gt24c32a130- const: atmel,24c32131- items:132- const: onnn,n24s64b133- const: atmel,24c64134- items:135- enum:136- renesas,r1ex24128137- samsung,s524ad0xd1138- const: atmel,24c128139- items:140- const: microchip,24aa025e48141- items:142- const: microchip,24aa025e64143- pattern: '^atmel,24c(32|64)d-wl$' # Actual vendor is st144145label:146description: Descriptive name of the EEPROM.147148reg:149maxItems: 1150151pagesize:152description:153The length of the pagesize for writing. Please consult the154manual of your device, that value varies a lot. A wrong value155may result in data loss! If not specified, a safety value of156'1' is used which will be very slow.157$ref: /schemas/types.yaml#/definitions/uint32158enum: [1, 8, 16, 32, 64, 128, 256]159default: 1160161read-only:162$ref: /schemas/types.yaml#/definitions/flag163description:164Disables writes to the eeprom.165166size:167$ref: /schemas/types.yaml#/definitions/uint32168description:169Total eeprom size in bytes.170171no-read-rollover:172$ref: /schemas/types.yaml#/definitions/flag173description:174Indicates that the multi-address eeprom does not automatically roll175over reads to the next slave address. Please consult the manual of176your device.177178wp-gpios: true179180address-width:181description:182Number of address bits.183$ref: /schemas/types.yaml#/definitions/uint32184default: 8185enum: [ 8, 16 ]186187num-addresses:188description:189Total number of i2c slave addresses this device takes.190$ref: /schemas/types.yaml#/definitions/uint32191default: 1192minimum: 1193maximum: 8194195vcc-supply:196description:197phandle of the regulator that provides the supply voltage.198199required:200- compatible201- reg202203unevaluatedProperties: false204205examples:206- |207i2c {208#address-cells = <1>;209#size-cells = <0>;210211eeprom@52 {212compatible = "microchip,24c32", "atmel,24c32";213reg = <0x52>;214pagesize = <32>;215wp-gpios = <&gpio1 3 0>;216num-addresses = <8>;217};218};219...220221222