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