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