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