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