1f8f79fa6SChristian Eggers# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2f8f79fa6SChristian Eggers%YAML 1.2 3f8f79fa6SChristian Eggers--- 4f8f79fa6SChristian Eggers$id: "http://devicetree.org/schemas/eeprom/at25.yaml#" 5f8f79fa6SChristian Eggers$schema: "http://devicetree.org/meta-schemas/core.yaml#" 6f8f79fa6SChristian Eggers 7f8f79fa6SChristian Eggerstitle: SPI EEPROMs compatible with Atmel's AT25 8f8f79fa6SChristian Eggers 9f8f79fa6SChristian Eggersmaintainers: 10f8f79fa6SChristian Eggers - Christian Eggers <ceggers@arri.de> 11f8f79fa6SChristian Eggers 12f8f79fa6SChristian Eggersproperties: 13f8f79fa6SChristian Eggers $nodename: 14f8f79fa6SChristian Eggers pattern: "^eeprom@[0-9a-f]{1,2}$" 15f8f79fa6SChristian Eggers 16f8f79fa6SChristian Eggers # There are multiple known vendors who manufacture EEPROM chips compatible 17f8f79fa6SChristian Eggers # with Atmel's AT25. The compatible string requires two items where the 18f8f79fa6SChristian Eggers # 'vendor' and 'model' parts of the first are the actual chip and the second 19f8f79fa6SChristian Eggers # item is fixed to "atmel,at25". Some existing bindings only have the 20f8f79fa6SChristian Eggers # "atmel,at25" part and should be fixed by somebody who knows vendor and 21f8f79fa6SChristian Eggers # product. 22f8f79fa6SChristian Eggers compatible: 23f8f79fa6SChristian Eggers oneOf: 24f8f79fa6SChristian Eggers - items: 25f8f79fa6SChristian Eggers - enum: 26f8f79fa6SChristian Eggers - anvo,anv32e61w 27f8f79fa6SChristian Eggers - atmel,at25256B 28f8f79fa6SChristian Eggers - fujitsu,mb85rs1mt 29f8f79fa6SChristian Eggers - fujitsu,mb85rs64 30f8f79fa6SChristian Eggers - microchip,at25160bn 31f8f79fa6SChristian Eggers - microchip,25lc040 32f8f79fa6SChristian Eggers - st,m95m02 33f8f79fa6SChristian Eggers - st,m95256 34f8f79fa6SChristian Eggers 35f8f79fa6SChristian Eggers - const: atmel,at25 36f8f79fa6SChristian Eggers 37f8f79fa6SChristian Eggers # Please don't use this alternative for new bindings. 38f8f79fa6SChristian Eggers - items: 39f8f79fa6SChristian Eggers - const: atmel,at25 40f8f79fa6SChristian Eggers 41f8f79fa6SChristian Eggers reg: 42f8f79fa6SChristian Eggers description: 43f8f79fa6SChristian Eggers Chip select number. 44f8f79fa6SChristian Eggers 45f8f79fa6SChristian Eggers spi-max-frequency: true 46f8f79fa6SChristian Eggers 47f8f79fa6SChristian Eggers pagesize: 48*d69c6dddSRob Herring $ref: /schemas/types.yaml#/definitions/uint32 49f8f79fa6SChristian Eggers enum: [1, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072] 50f8f79fa6SChristian Eggers description: 51f8f79fa6SChristian Eggers Size of the eeprom page. 52f8f79fa6SChristian Eggers 53f8f79fa6SChristian Eggers size: 54*d69c6dddSRob Herring $ref: /schemas/types.yaml#/definitions/uint32 55f8f79fa6SChristian Eggers description: 56f8f79fa6SChristian Eggers Total eeprom size in bytes. 57f8f79fa6SChristian Eggers 58f8f79fa6SChristian Eggers address-width: 59f8f79fa6SChristian Eggers $ref: /schemas/types.yaml#/definitions/uint32 60f8f79fa6SChristian Eggers enum: [ 8, 9, 16, 24 ] 61f8f79fa6SChristian Eggers description: 62f8f79fa6SChristian Eggers Number of address bits. 63f8f79fa6SChristian Eggers For 9 bits, the MSB of the address is sent as bit 3 of the instruction 64f8f79fa6SChristian Eggers byte, before the address byte. 65f8f79fa6SChristian Eggers 66f8f79fa6SChristian Eggers spi-cpha: true 67f8f79fa6SChristian Eggers 68f8f79fa6SChristian Eggers spi-cpol: true 69f8f79fa6SChristian Eggers 70f8f79fa6SChristian Eggers read-only: 71f8f79fa6SChristian Eggers description: 72f8f79fa6SChristian Eggers Disable writes to the eeprom. 73f8f79fa6SChristian Eggers type: boolean 74f8f79fa6SChristian Eggers 75f8f79fa6SChristian Eggers wp-gpios: 76f8f79fa6SChristian Eggers maxItems: 1 77f8f79fa6SChristian Eggers description: 78f8f79fa6SChristian Eggers GPIO to which the write-protect pin of the chip is connected. 79f8f79fa6SChristian Eggers 80f8f79fa6SChristian Eggers # Deprecated: at25,byte-len, at25,addr-mode, at25,page-size 81f8f79fa6SChristian Eggers at25,byte-len: 82f8f79fa6SChristian Eggers $ref: /schemas/types.yaml#/definitions/uint32 83f8f79fa6SChristian Eggers description: 84f8f79fa6SChristian Eggers Total eeprom size in bytes. Deprecated, use "size" property instead. 85f8f79fa6SChristian Eggers deprecated: true 86f8f79fa6SChristian Eggers 87f8f79fa6SChristian Eggers at25,addr-mode: 88f8f79fa6SChristian Eggers $ref: /schemas/types.yaml#/definitions/uint32 89f8f79fa6SChristian Eggers description: 90f8f79fa6SChristian Eggers Addr-mode flags, as defined in include/linux/spi/eeprom.h. 91f8f79fa6SChristian Eggers Deprecated, use "address-width" property instead. 92f8f79fa6SChristian Eggers deprecated: true 93f8f79fa6SChristian Eggers 94f8f79fa6SChristian Eggers at25,page-size: 95f8f79fa6SChristian Eggers $ref: /schemas/types.yaml#/definitions/uint32 96f8f79fa6SChristian Eggers description: 97f8f79fa6SChristian Eggers Size of the eeprom page. Deprecated, use "pagesize" property instead. 98f8f79fa6SChristian Eggers deprecated: true 99f8f79fa6SChristian Eggers 100f8f79fa6SChristian Eggersrequired: 101f8f79fa6SChristian Eggers - compatible 102f8f79fa6SChristian Eggers - reg 103f8f79fa6SChristian Eggers - spi-max-frequency 104f8f79fa6SChristian Eggers - pagesize 105f8f79fa6SChristian Eggers - size 106f8f79fa6SChristian Eggers - address-width 107f8f79fa6SChristian Eggers 108f8f79fa6SChristian EggersadditionalProperties: false 109f8f79fa6SChristian Eggers 110f8f79fa6SChristian Eggersexamples: 111f8f79fa6SChristian Eggers - | 112f8f79fa6SChristian Eggers #include <dt-bindings/gpio/gpio.h> 113f8f79fa6SChristian Eggers spi0 { 114f8f79fa6SChristian Eggers #address-cells = <1>; 115f8f79fa6SChristian Eggers #size-cells = <0>; 116f8f79fa6SChristian Eggers 117f8f79fa6SChristian Eggers eeprom@0 { 118f8f79fa6SChristian Eggers compatible = "st,m95256", "atmel,at25"; 119f8f79fa6SChristian Eggers reg = <0>; 120f8f79fa6SChristian Eggers spi-max-frequency = <5000000>; 121f8f79fa6SChristian Eggers spi-cpha; 122f8f79fa6SChristian Eggers spi-cpol; 123f8f79fa6SChristian Eggers wp-gpios = <&gpio1 3 0>; 124f8f79fa6SChristian Eggers 125f8f79fa6SChristian Eggers pagesize = <64>; 126f8f79fa6SChristian Eggers size = <32768>; 127f8f79fa6SChristian Eggers address-width = <16>; 128f8f79fa6SChristian Eggers }; 129f8f79fa6SChristian Eggers }; 130