brintos

brintos / linux-shallow public Read only

0
0
Text · 3.7 KiB · c31e5e7 Raw
150 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause2%YAML 1.23---4$id: http://devicetree.org/schemas/eeprom/at25.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: SPI EEPROMs or FRAMs compatible with Atmel's AT258 9maintainers:10  - Christian Eggers <ceggers@arri.de>11 12properties:13  $nodename:14    anyOf:15      - pattern: "^eeprom@[0-9a-f]{1,2}$"16      - pattern: "^fram@[0-9a-f]{1,2}$"17 18  # There are multiple known vendors who manufacture EEPROM chips compatible19  # with Atmel's AT25. The compatible string requires two items where the20  # 'vendor' and 'model' parts of the first are the actual chip and the second21  # item is fixed to "atmel,at25". Some existing bindings only have the22  # "atmel,at25" part and should be fixed by somebody who knows vendor and23  # product.24  compatible:25    oneOf:26      - items:27          - enum:28              - anvo,anv32e61w29              - atmel,at25256B30              - fujitsu,mb85rs1mt31              - fujitsu,mb85rs25632              - fujitsu,mb85rs6433              - microchip,at25160bn34              - microchip,25lc04035              - st,m95m0236              - st,m9525637              - st,m9564038              - cypress,fm2539 40          - const: atmel,at2541 42      # Please don't use this alternative for new bindings.43      - items:44          - const: atmel,at2545 46  reg:47    maxItems: 148 49  pagesize:50    $ref: /schemas/types.yaml#/definitions/uint3251    enum: [1, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072]52    description:53      Size of the eeprom page. FRAMs don't have pages.54 55  size:56    $ref: /schemas/types.yaml#/definitions/uint3257    description:58      Total eeprom size in bytes.59 60  address-width:61    $ref: /schemas/types.yaml#/definitions/uint3262    enum: [ 8, 9, 16, 24 ]63    description:64      Number of address bits.65      For 9 bits, the MSB of the address is sent as bit 3 of the instruction66      byte, before the address byte.67 68  spi-cpha: true69 70  spi-cpol: true71 72  read-only:73    description:74      Disable writes to the eeprom.75    type: boolean76 77  wp-gpios:78    maxItems: 179    description:80      GPIO to which the write-protect pin of the chip is connected.81 82  # Deprecated: at25,byte-len, at25,addr-mode, at25,page-size83  at25,byte-len:84    $ref: /schemas/types.yaml#/definitions/uint3285    description:86      Total eeprom size in bytes. Deprecated, use "size" property instead.87    deprecated: true88 89  at25,addr-mode:90    $ref: /schemas/types.yaml#/definitions/uint3291    description:92      Addr-mode flags, as defined in include/linux/spi/eeprom.h.93      Deprecated, use "address-width" property instead.94    deprecated: true95 96  at25,page-size:97    $ref: /schemas/types.yaml#/definitions/uint3298    description:99      Size of the eeprom page. Deprecated, use "pagesize" property instead.100    deprecated: true101 102required:103  - compatible104  - reg105  - spi-max-frequency106 107allOf:108  - $ref: /schemas/spi/spi-peripheral-props.yaml#109  - $ref: /schemas/nvmem/nvmem.yaml110  - if:111      properties:112        compatible:113          not:114            contains:115              const: cypress,fm25116    then:117      required:118        - pagesize119        - size120        - address-width121 122unevaluatedProperties: false123 124examples:125  - |126    #include <dt-bindings/gpio/gpio.h>127    spi {128        #address-cells = <1>;129        #size-cells = <0>;130 131        eeprom@0 {132            compatible = "st,m95256", "atmel,at25";133            reg = <0>;134            spi-max-frequency = <5000000>;135            spi-cpha;136            spi-cpol;137            wp-gpios = <&gpio1 3 0>;138 139            pagesize = <64>;140            size = <32768>;141            address-width = <16>;142        };143 144        fram@1 {145            compatible = "cypress,fm25", "atmel,at25";146            reg = <1>;147            spi-max-frequency = <40000000>;148        };149    };150