Path: blob/master/Documentation/devicetree/bindings/eeprom/at25.yaml
51055 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,anv32c81w28- anvo,anv32e61w29- atmel,at25256B30- fujitsu,mb85rs1mt31- fujitsu,mb85rs25632- fujitsu,mb85rs6433- microchip,25aa010a34- microchip,at25160bn35- microchip,25lc04036- st,m95m0237- st,m9525638- st,m9564039- cypress,fm254041- const: atmel,at254243# Please don't use this alternative for new bindings.44- items:45- const: atmel,at254647reg:48maxItems: 14950pagesize:51$ref: /schemas/types.yaml#/definitions/uint3252enum: [1, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072]53description:54Size of the eeprom page. FRAMs don't have pages.5556size:57$ref: /schemas/types.yaml#/definitions/uint3258description:59Total eeprom size in bytes.60Also used for FRAMs without device ID where the size cannot be detected.6162address-width:63$ref: /schemas/types.yaml#/definitions/uint3264enum: [ 8, 9, 16, 24 ]65description:66Number of address bits.67For 9 bits, the MSB of the address is sent as bit 3 of the instruction68byte, before the address byte.6970spi-cpha: true7172spi-cpol: true7374read-only:75description:76Disable writes to the eeprom.77type: boolean7879wp-gpios:80maxItems: 181description:82GPIO to which the write-protect pin of the chip is connected.8384# Deprecated: at25,byte-len, at25,addr-mode, at25,page-size85at25,byte-len:86$ref: /schemas/types.yaml#/definitions/uint3287description:88Total eeprom size in bytes. Deprecated, use "size" property instead.89deprecated: true9091at25,addr-mode:92$ref: /schemas/types.yaml#/definitions/uint3293description:94Addr-mode flags, as defined in include/linux/spi/eeprom.h.95Deprecated, use "address-width" property instead.96deprecated: true9798at25,page-size:99$ref: /schemas/types.yaml#/definitions/uint32100description:101Size of the eeprom page. Deprecated, use "pagesize" property instead.102deprecated: true103104required:105- compatible106- reg107- spi-max-frequency108109allOf:110- $ref: /schemas/spi/spi-peripheral-props.yaml#111- $ref: /schemas/nvmem/nvmem.yaml112- if:113properties:114compatible:115not:116contains:117const: cypress,fm25118then:119required:120- pagesize121- size122- address-width123124unevaluatedProperties: false125126examples:127- |128#include <dt-bindings/gpio/gpio.h>129spi {130#address-cells = <1>;131#size-cells = <0>;132133eeprom@0 {134compatible = "st,m95256", "atmel,at25";135reg = <0>;136spi-max-frequency = <5000000>;137spi-cpha;138spi-cpol;139wp-gpios = <&gpio1 3 0>;140141pagesize = <64>;142size = <32768>;143address-width = <16>;144};145146fram@1 {147compatible = "cypress,fm25", "atmel,at25";148reg = <1>;149spi-max-frequency = <40000000>;150};151152fram@2 {153compatible = "cypress,fm25", "atmel,at25";154reg = <2>;155spi-max-frequency = <20000000>;156size = <2048>;157};158};159160161