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