Path: blob/master/Documentation/devicetree/bindings/eeprom/at25.yaml
29539 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.58Also used for FRAMs without device ID where the size cannot be detected.5960address-width:61$ref: /schemas/types.yaml#/definitions/uint3262enum: [ 8, 9, 16, 24 ]63description:64Number of address bits.65For 9 bits, the MSB of the address is sent as bit 3 of the instruction66byte, before the address byte.6768spi-cpha: true6970spi-cpol: true7172read-only:73description:74Disable writes to the eeprom.75type: boolean7677wp-gpios:78maxItems: 179description:80GPIO to which the write-protect pin of the chip is connected.8182# Deprecated: at25,byte-len, at25,addr-mode, at25,page-size83at25,byte-len:84$ref: /schemas/types.yaml#/definitions/uint3285description:86Total eeprom size in bytes. Deprecated, use "size" property instead.87deprecated: true8889at25,addr-mode:90$ref: /schemas/types.yaml#/definitions/uint3291description:92Addr-mode flags, as defined in include/linux/spi/eeprom.h.93Deprecated, use "address-width" property instead.94deprecated: true9596at25,page-size:97$ref: /schemas/types.yaml#/definitions/uint3298description:99Size of the eeprom page. Deprecated, use "pagesize" property instead.100deprecated: true101102required:103- compatible104- reg105- spi-max-frequency106107allOf:108- $ref: /schemas/spi/spi-peripheral-props.yaml#109- $ref: /schemas/nvmem/nvmem.yaml110- if:111properties:112compatible:113not:114contains:115const: cypress,fm25116then:117required:118- pagesize119- size120- address-width121122unevaluatedProperties: false123124examples:125- |126#include <dt-bindings/gpio/gpio.h>127spi {128#address-cells = <1>;129#size-cells = <0>;130131eeprom@0 {132compatible = "st,m95256", "atmel,at25";133reg = <0>;134spi-max-frequency = <5000000>;135spi-cpha;136spi-cpol;137wp-gpios = <&gpio1 3 0>;138139pagesize = <64>;140size = <32768>;141address-width = <16>;142};143144fram@1 {145compatible = "cypress,fm25", "atmel,at25";146reg = <1>;147spi-max-frequency = <40000000>;148};149150fram@2 {151compatible = "cypress,fm25", "atmel,at25";152reg = <2>;153spi-max-frequency = <20000000>;154size = <2048>;155};156};157158159