brintos

brintos / linux-shallow public Read only

0
0
Text · 5.8 KiB · b6239ec Raw
221 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only2# Copyright 2019 BayLibre SAS3%YAML 1.24---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 AT249 10maintainers:11  - Bartosz Golaszewski <bgolaszewski@baylibre.com>12 13allOf:14  - $ref: /schemas/nvmem/nvmem.yaml15  - $ref: /schemas/nvmem/nvmem-deprecated-cells.yaml16 17select:18  properties:19    compatible:20      contains:21        anyOf:22          - pattern: "^atmel,(24(c|cs|mac)[0-9]+|spd)$"23          - enum: ["microchip,24aa025e48", "microchip,24aa025e64"]24  required:25    - compatible26 27properties:28  $nodename:29    pattern: "^eeprom@[0-9a-f]{1,2}$"30 31  # There are multiple known vendors who manufacture EEPROM chips compatible32  # with Atmel's AT24. The compatible string requires either a single item33  # if the memory comes from Atmel (in which case the vendor part must be34  # 'atmel') or two items with the same 'model' part where the vendor part of35  # the first one is the actual manufacturer and the second item is the36  # corresponding 'atmel,<model>' from Atmel.37  compatible:38    oneOf:39      - allOf:40          - minItems: 141            items:42              - pattern: "^(atmel|catalyst|microchip|nxp|ramtron|renesas|rohm|st),(24(c|cs|lc|mac)[0-9]+|spd)$"43              - pattern: "^atmel,(24(c|cs|mac)[0-9]+|spd)$"44          - oneOf:45              - items:46                  pattern: c00$47              - items:48                  pattern: c01$49              - items:50                  pattern: cs01$51              - items:52                  pattern: c02$53              - items:54                  pattern: cs02$55              - items:56                  pattern: mac402$57              - items:58                  pattern: mac602$59              - items:60                  pattern: c04$61              - items:62                  pattern: cs04$63              - items:64                  pattern: c08$65              - items:66                  pattern: cs08$67              - items:68                  pattern: c16$69              - items:70                  pattern: cs16$71              - items:72                  pattern: c32$73              - items:74                  pattern: cs32$75              - items:76                  pattern: c64$77              - items:78                  pattern: cs64$79              - items:80                  pattern: c128$81              - items:82                  pattern: cs128$83              - items:84                  pattern: c256$85              - items:86                  pattern: cs256$87              - items:88                  pattern: c512$89              - items:90                  pattern: cs512$91              - items:92                  pattern: c1024$93              - items:94                  pattern: cs1024$95              - items:96                  pattern: c1025$97              - items:98                  pattern: cs1025$99              - items:100                  pattern: c2048$101              - items:102                  pattern: cs2048$103              - items:104                  pattern: spd$105      # These are special cases that don't conform to the above pattern.106      # Each requires a standard at24 model as fallback.107      - items:108          - enum:109              - rohm,br24g01110              - rohm,br24t01111          - const: atmel,24c01112      - items:113          - enum:114              - nxp,se97b115              - renesas,r1ex24002116          - const: atmel,24c02117      - items:118          - enum:119              - giantec,gt24c04a120              - onnn,cat24c04121              - onnn,cat24c05122              - rohm,br24g04123          - const: atmel,24c04124      - items:125          - enum:126              - belling,bl24c16a127              - renesas,r1ex24016128          - const: atmel,24c16129      - items:130          - const: giantec,gt24c32a131          - const: atmel,24c32132      - items:133          - const: onnn,n24s64b134          - const: atmel,24c64135      - items:136          - enum:137              - renesas,r1ex24128138              - samsung,s524ad0xd1139          - const: atmel,24c128140      - items:141          - const: microchip,24aa025e48142      - items:143          - const: microchip,24aa025e64144      - pattern: '^atmel,24c(32|64)d-wl$' # Actual vendor is st145 146  label:147    description: Descriptive name of the EEPROM.148 149  reg:150    maxItems: 1151 152  pagesize:153    description:154      The length of the pagesize for writing. Please consult the155      manual of your device, that value varies a lot. A wrong value156      may result in data loss! If not specified, a safety value of157      '1' is used which will be very slow.158    $ref: /schemas/types.yaml#/definitions/uint32159    enum: [1, 8, 16, 32, 64, 128, 256]160    default: 1161 162  read-only:163    $ref: /schemas/types.yaml#/definitions/flag164    description:165      Disables writes to the eeprom.166 167  size:168    $ref: /schemas/types.yaml#/definitions/uint32169    description:170      Total eeprom size in bytes.171 172  no-read-rollover:173    $ref: /schemas/types.yaml#/definitions/flag174    description:175      Indicates that the multi-address eeprom does not automatically roll176      over reads to the next slave address. Please consult the manual of177      your device.178 179  wp-gpios: true180 181  address-width:182    description:183      Number of address bits.184    $ref: /schemas/types.yaml#/definitions/uint32185    default: 8186    enum: [ 8, 16 ]187 188  num-addresses:189    description:190      Total number of i2c slave addresses this device takes.191    $ref: /schemas/types.yaml#/definitions/uint32192    default: 1193    minimum: 1194    maximum: 8195 196  vcc-supply:197    description:198      phandle of the regulator that provides the supply voltage.199 200required:201  - compatible202  - reg203 204unevaluatedProperties: false205 206examples:207  - |208    i2c {209      #address-cells = <1>;210      #size-cells = <0>;211 212      eeprom@52 {213          compatible = "microchip,24c32", "atmel,24c32";214          reg = <0x52>;215          pagesize = <32>;216          wp-gpios = <&gpio1 3 0>;217          num-addresses = <8>;218      };219    };220...221