xref: /freebsd-src/sys/contrib/device-tree/Bindings/eeprom/microchip,93lc46b.yaml (revision 8bab661a3316d8bd9b9fbd11a3b4371b91507bd2)
1b97ee269SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2b97ee269SEmmanuel Vadot%YAML 1.2
3b97ee269SEmmanuel Vadot---
4b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/eeprom/microchip,93lc46b.yaml#
5b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6b97ee269SEmmanuel Vadot
7*8bab661aSEmmanuel Vadottitle: Microchip 93xx46 SPI compatible EEPROM family
8b97ee269SEmmanuel Vadot
9b97ee269SEmmanuel Vadotmaintainers:
10b97ee269SEmmanuel Vadot  - Cory Tusar <cory.tusar@pid1solutions.com>
11b97ee269SEmmanuel Vadot
12b97ee269SEmmanuel Vadotproperties:
13b97ee269SEmmanuel Vadot  compatible:
14b97ee269SEmmanuel Vadot    enum:
15b97ee269SEmmanuel Vadot      - atmel,at93c46
16b97ee269SEmmanuel Vadot      - atmel,at93c46d
17b97ee269SEmmanuel Vadot      - atmel,at93c56
18b97ee269SEmmanuel Vadot      - atmel,at93c66
19b97ee269SEmmanuel Vadot      - eeprom-93xx46
20b97ee269SEmmanuel Vadot      - microchip,93lc46b
21b97ee269SEmmanuel Vadot
22b97ee269SEmmanuel Vadot  data-size:
23b97ee269SEmmanuel Vadot    description: number of data bits per word
24b97ee269SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
25b97ee269SEmmanuel Vadot    enum: [8, 16]
26b97ee269SEmmanuel Vadot
27b97ee269SEmmanuel Vadot  reg:
28b97ee269SEmmanuel Vadot    description: chip select of EEPROM
29b97ee269SEmmanuel Vadot    maxItems: 1
30b97ee269SEmmanuel Vadot
31b97ee269SEmmanuel Vadot  read-only:
32b97ee269SEmmanuel Vadot    description:
33b97ee269SEmmanuel Vadot      parameter-less property which disables writes to the EEPROM
34b97ee269SEmmanuel Vadot    type: boolean
35b97ee269SEmmanuel Vadot
36b97ee269SEmmanuel Vadot  select-gpios:
37b97ee269SEmmanuel Vadot    description:
38b97ee269SEmmanuel Vadot      specifies the GPIO that needs to be asserted prior to each access
39b97ee269SEmmanuel Vadot      of EEPROM (e.g. for SPI bus multiplexing)
40b97ee269SEmmanuel Vadot    maxItems: 1
41b97ee269SEmmanuel Vadot
42b97ee269SEmmanuel Vadotrequired:
43b97ee269SEmmanuel Vadot  - compatible
44b97ee269SEmmanuel Vadot  - reg
45b97ee269SEmmanuel Vadot  - data-size
46b97ee269SEmmanuel Vadot  - spi-max-frequency
47b97ee269SEmmanuel Vadot
48b97ee269SEmmanuel VadotallOf:
49b97ee269SEmmanuel Vadot  - $ref: /schemas/spi/spi-peripheral-props.yaml#
50*8bab661aSEmmanuel Vadot  - $ref: /schemas/nvmem/nvmem.yaml
51b97ee269SEmmanuel Vadot
52b97ee269SEmmanuel VadotunevaluatedProperties: false
53b97ee269SEmmanuel Vadot
54b97ee269SEmmanuel Vadotexamples:
55b97ee269SEmmanuel Vadot  - |
56b97ee269SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
57b97ee269SEmmanuel Vadot
58b97ee269SEmmanuel Vadot    spi {
59b97ee269SEmmanuel Vadot      #address-cells = <1>;
60b97ee269SEmmanuel Vadot      #size-cells = <0>;
61b97ee269SEmmanuel Vadot
62b97ee269SEmmanuel Vadot      eeprom@0 {
63b97ee269SEmmanuel Vadot        compatible = "eeprom-93xx46";
64b97ee269SEmmanuel Vadot        reg = <0>;
65b97ee269SEmmanuel Vadot        spi-max-frequency = <1000000>;
66b97ee269SEmmanuel Vadot        spi-cs-high;
67b97ee269SEmmanuel Vadot        data-size = <8>;
68b97ee269SEmmanuel Vadot        select-gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>;
69b97ee269SEmmanuel Vadot      };
70b97ee269SEmmanuel Vadot    };
71