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  '#address-cells':
33    const: 1
34
35  '#size-cells':
36    const: 0
37
38  vref-supply:
39    description:
40      ADC reference voltage supply
41
42  adi,sync-in-gpios:
43    description:
44      Enables synchronization of multiple devices that require simultaneous
45      sampling. A pulse is always required if the configuration is changed
46      in any way, for example if the filter decimation rate changes.
47      As the line is active low, it should be marked GPIO_ACTIVE_LOW.
48
49  reset-gpios:
50    maxItems: 1
51
52  spi-max-frequency: true
53
54  spi-cpol: true
55  spi-cpha : true
56
57  "#io-channel-cells":
58    const: 1
59
60required:
61  - compatible
62  - reg
63  - clocks
64  - clock-names
65  - vref-supply
66  - spi-cpol
67  - spi-cpha
68  - adi,sync-in-gpios
69
70patternProperties:
71  "^channel@([0-9]|1[0-5])$":
72    type: object
73    description: |
74      Represents the external channels which are connected to the device.
75
76    properties:
77      reg:
78        description: |
79          The channel number.
80
81      label:
82        description: |
83          Unique name to identify which channel this is.
84    required:
85      - reg
86    additionalProperties: false
87
88additionalProperties: false
89
90examples:
91  - |
92    #include <dt-bindings/interrupt-controller/irq.h>
93    #include <dt-bindings/gpio/gpio.h>
94    spi {
95        #address-cells = <1>;
96        #size-cells = <0>;
97
98        adc@0 {
99            compatible = "adi,ad7768-1";
100            reg = <0>;
101            spi-max-frequency = <2000000>;
102            spi-cpol;
103            spi-cpha;
104            vref-supply = <&adc_vref>;
105            interrupts = <25 IRQ_TYPE_EDGE_RISING>;
106            interrupt-parent = <&gpio>;
107            adi,sync-in-gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
108            reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
109            clocks = <&ad7768_mclk>;
110            clock-names = "mclk";
111
112            #address-cells = <1>;
113            #size-cells = <0>;
114
115            channel@0 {
116                reg = <0>;
117                label = "channel_0";
118            };
119        };
120    };
121...
122