Path: blob/master/Documentation/devicetree/bindings/eeprom/at25.yaml
26350 views
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause1%YAML 1.22---3$id: http://devicetree.org/schemas/eeprom/at25.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: SPI EEPROMs or FRAMs compatible with Atmel's AT2578maintainers:9- Christian Eggers <ceggers@arri.de>1011properties:12$nodename:13anyOf:14- pattern: "^eeprom@[0-9a-f]{1,2}$"15- pattern: "^fram@[0-9a-f]{1,2}$"1617# There are multiple known vendors who manufacture EEPROM chips compatible18# with Atmel's AT25. The compatible string requires two items where the19# 'vendor' and 'model' parts of the first are the actual chip and the second20# item is fixed to "atmel,at25". Some existing bindings only have the21# "atmel,at25" part and should be fixed by somebody who knows vendor and22# product.23compatible:24oneOf:25- items:26- enum:27- anvo,anv32e61w28- atmel,at25256B29- fujitsu,mb85rs1mt30- fujitsu,mb85rs25631- fujitsu,mb85rs6432- microchip,at25160bn33- microchip,25lc04034- st,m95m0235- st,m9525636- st,m9564037- cypress,fm253839- const: atmel,at254041# Please don't use this alternative for new bindings.42- items:43- const: atmel,at254445reg:46maxItems: 14748pagesize:49$ref: /schemas/types.yaml#/definitions/uint3250enum: [1, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072]51description:52Size of the eeprom page. FRAMs don't have pages.5354size:55$ref: /schemas/types.yaml#/definitions/uint3256description:57Total eeprom size in bytes.5859address-width:60$ref: /schemas/types.yaml#/definitions/uint3261enum: [ 8, 9, 16, 24 ]62description:63Number of address bits.64For 9 bits, the MSB of the address is sent as bit 3 of the instruction65byte, before the address byte.6667spi-cpha: true6869spi-cpol: true7071read-only:72description:73Disable writes to the eeprom.74type: boolean7576wp-gpios:77maxItems: 178description:79GPIO to which the write-protect pin of the chip is connected.8081# Deprecated: at25,byte-len, at25,addr-mode, at25,page-size82at25,byte-len:83$ref: /schemas/types.yaml#/definitions/uint3284description:85Total eeprom size in bytes. Deprecated, use "size" property instead.86deprecated: true8788at25,addr-mode:89$ref: /schemas/types.yaml#/definitions/uint3290description:91Addr-mode flags, as defined in include/linux/spi/eeprom.h.92Deprecated, use "address-width" property instead.93deprecated: true9495at25,page-size:96$ref: /schemas/types.yaml#/definitions/uint3297description:98Size of the eeprom page. Deprecated, use "pagesize" property instead.99deprecated: true100101required:102- compatible103- reg104- spi-max-frequency105106allOf:107- $ref: /schemas/spi/spi-peripheral-props.yaml#108- $ref: /schemas/nvmem/nvmem.yaml109- if:110properties:111compatible:112not:113contains:114const: cypress,fm25115then:116required:117- pagesize118- size119- address-width120121unevaluatedProperties: false122123examples:124- |125#include <dt-bindings/gpio/gpio.h>126spi {127#address-cells = <1>;128#size-cells = <0>;129130eeprom@0 {131compatible = "st,m95256", "atmel,at25";132reg = <0>;133spi-max-frequency = <5000000>;134spi-cpha;135spi-cpol;136wp-gpios = <&gpio1 3 0>;137138pagesize = <64>;139size = <32768>;140address-width = <16>;141};142143fram@1 {144compatible = "cypress,fm25", "atmel,at25";145reg = <1>;146spi-max-frequency = <40000000>;147};148};149150151