1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/adc/adi,ad7768-1.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Analog Devices AD7768-1 ADC device driver
8
9maintainers:
10  - Michael Hennerich <michael.hennerich@analog.com>
11
12description: |
13  Datasheet at:
14    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-1.pdf
15
16properties:
17  compatible:
18    const: adi,ad7768-1
19
20  reg:
21    maxItems: 1
22
23  clocks:
24    maxItems: 1
25
26  clock-names:
27    const: mclk
28
29  interrupts:
30    maxItems: 1
31
32  vref-supply:
33    description:
34      ADC reference voltage supply
35
36  adi,sync-in-gpios:
37    description:
38      Enables synchronization of multiple devices that require simultaneous
39      sampling. A pulse is always required if the configuration is changed
40      in any way, for example if the filter decimation rate changes.
41      As the line is active low, it should be marked GPIO_ACTIVE_LOW.
42
43  reset-gpios:
44    maxItems: 1
45
46  spi-max-frequency: true
47
48  spi-cpol: true
49
50  spi-cpha: true
51
52  "#io-channel-cells":
53    const: 1
54
55required:
56  - compatible
57  - reg
58  - clocks
59  - clock-names
60  - vref-supply
61  - spi-cpol
62  - spi-cpha
63  - adi,sync-in-gpios
64
65additionalProperties: false
66
67examples:
68  - |
69    #include <dt-bindings/interrupt-controller/irq.h>
70    #include <dt-bindings/gpio/gpio.h>
71    spi {
72        #address-cells = <1>;
73        #size-cells = <0>;
74
75        adc@0 {
76            compatible = "adi,ad7768-1";
77            reg = <0>;
78            spi-max-frequency = <2000000>;
79            spi-cpol;
80            spi-cpha;
81            vref-supply = <&adc_vref>;
82            interrupts = <25 IRQ_TYPE_EDGE_RISING>;
83            interrupt-parent = <&gpio>;
84            adi,sync-in-gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
85            reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
86            clocks = <&ad7768_mclk>;
87            clock-names = "mclk";
88        };
89    };
90...
91