1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/adc/adi,ad7606.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Analog Devices AD7606 Simultaneous Sampling ADC
8
9maintainers:
10  - Beniamin Bia <beniamin.bia@analog.com>
11  - Stefan Popa <stefan.popa@analog.com>
12
13description: |
14  Analog Devices AD7606 Simultaneous Sampling ADC
15  https://www.analog.com/media/en/technical-documentation/data-sheets/ad7606_7606-6_7606-4.pdf
16  https://www.analog.com/media/en/technical-documentation/data-sheets/AD7606B.pdf
17  https://www.analog.com/media/en/technical-documentation/data-sheets/AD7616.pdf
18
19properties:
20  compatible:
21    enum:
22      - adi,ad7605-4
23      - adi,ad7606-8
24      - adi,ad7606-6
25      - adi,ad7606-4
26      - adi,ad7606b
27      - adi,ad7616
28
29  reg:
30    maxItems: 1
31
32  spi-cpha: true
33
34  avcc-supply: true
35
36  interrupts:
37    maxItems: 1
38
39  adi,conversion-start-gpios:
40    description:
41      Must be the device tree identifier of the CONVST pin.
42      This logic input is used to initiate conversions on the analog
43      input channels. As the line is active high, it should be marked
44      GPIO_ACTIVE_HIGH.
45    maxItems: 1
46
47  reset-gpios:
48    description:
49      Must be the device tree identifier of the RESET pin. If specified,
50      it will be asserted during driver probe. As the line is active high,
51      it should be marked GPIO_ACTIVE_HIGH.
52    maxItems: 1
53
54  standby-gpios:
55    description:
56       Must be the device tree identifier of the STBY pin. This pin is used
57       to place the AD7606 into one of two power-down modes, Standby mode or
58       Shutdown mode. As the line is active low, it should be marked
59       GPIO_ACTIVE_LOW.
60    maxItems: 1
61
62  adi,first-data-gpios:
63    description:
64      Must be the device tree identifier of the FRSTDATA pin.
65      The FRSTDATA output indicates when the first channel, V1, is
66      being read back on either the parallel, byte or serial interface.
67      As the line is active high, it should be marked GPIO_ACTIVE_HIGH.
68    maxItems: 1
69
70  adi,range-gpios:
71    description:
72      Must be the device tree identifier of the RANGE pin. The polarity on
73      this pin determines the input range of the analog input channels. If
74      this pin is tied to a logic high, the analog input range is ±10V for
75      all channels. If this pin is tied to a logic low, the analog input range
76      is ±5V for all channels. As the line is active high, it should be marked
77      GPIO_ACTIVE_HIGH.
78    maxItems: 1
79
80  adi,oversampling-ratio-gpios:
81    description:
82      Must be the device tree identifier of the over-sampling
83      mode pins. As the line is active high, it should be marked
84      GPIO_ACTIVE_HIGH.
85    maxItems: 3
86
87  adi,sw-mode:
88    description:
89      Software mode of operation, so far available only for ad7616 and ad7606b.
90      It is enabled when all three oversampling mode pins are connected to
91      high level. The device is configured by the corresponding registers. If the
92      adi,oversampling-ratio-gpios property is defined, then the driver will set the
93      oversampling gpios to high. Otherwise, it is assumed that the pins are hardwired
94      to VDD.
95    type: boolean
96
97required:
98  - compatible
99  - reg
100  - spi-cpha
101  - avcc-supply
102  - interrupts
103  - adi,conversion-start-gpios
104
105examples:
106  - |
107    #include <dt-bindings/gpio/gpio.h>
108    #include <dt-bindings/interrupt-controller/irq.h>
109    spi0 {
110        #address-cells = <1>;
111        #size-cells = <0>;
112
113        adc@0 {
114                compatible = "adi,ad7606-8";
115                reg = <0>;
116                spi-max-frequency = <1000000>;
117                spi-cpol;
118                spi-cpha;
119
120                avcc-supply = <&adc_vref>;
121
122                interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
123                interrupt-parent = <&gpio>;
124
125                adi,conversion-start-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
126                reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
127                adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
128                adi,oversampling-ratio-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>,
129                                               <&gpio 23 GPIO_ACTIVE_HIGH>,
130                                               <&gpio 26 GPIO_ACTIVE_HIGH>;
131                standby-gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
132                adi,sw-mode;
133        };
134    };
135...
136