xref: /linux/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml (revision 786cbd7c2dc539b3f91aeabc9a026c01cea072c8)
1416f882cSBeniamin Bia# SPDX-License-Identifier: GPL-2.0
2416f882cSBeniamin Bia%YAML 1.2
3416f882cSBeniamin Bia---
4416f882cSBeniamin Bia$id: http://devicetree.org/schemas/iio/adc/adi,ad7606.yaml#
5416f882cSBeniamin Bia$schema: http://devicetree.org/meta-schemas/core.yaml#
6416f882cSBeniamin Bia
7416f882cSBeniamin Biatitle: Analog Devices AD7606 Simultaneous Sampling ADC
8416f882cSBeniamin Bia
9416f882cSBeniamin Biamaintainers:
102e645db3SKrzysztof Kozlowski  - Michael Hennerich <michael.hennerich@analog.com>
11416f882cSBeniamin Bia
12416f882cSBeniamin Biadescription: |
13416f882cSBeniamin Bia  Analog Devices AD7606 Simultaneous Sampling ADC
1493a81104SGuillaume Stols  https://www.analog.com/media/en/technical-documentation/data-sheets/AD7605-4.pdf
15416f882cSBeniamin Bia  https://www.analog.com/media/en/technical-documentation/data-sheets/ad7606_7606-6_7606-4.pdf
166b4d6822SBeniamin Bia  https://www.analog.com/media/en/technical-documentation/data-sheets/AD7606B.pdf
17416f882cSBeniamin Bia  https://www.analog.com/media/en/technical-documentation/data-sheets/AD7616.pdf
18416f882cSBeniamin Bia
19416f882cSBeniamin Biaproperties:
20416f882cSBeniamin Bia  compatible:
21416f882cSBeniamin Bia    enum:
22416f882cSBeniamin Bia      - adi,ad7605-4
23416f882cSBeniamin Bia      - adi,ad7606-4
24555b1a1fSGuillaume Stols      - adi,ad7606-6
25555b1a1fSGuillaume Stols      - adi,ad7606-8  # Referred to as AD7606 (without -8) in the datasheet
266b4d6822SBeniamin Bia      - adi,ad7606b
27416f882cSBeniamin Bia      - adi,ad7616
28416f882cSBeniamin Bia
29416f882cSBeniamin Bia  reg:
30416f882cSBeniamin Bia    maxItems: 1
31416f882cSBeniamin Bia
32416f882cSBeniamin Bia  spi-cpha: true
33416f882cSBeniamin Bia
344828556dSRob Herring  spi-cpol: true
354828556dSRob Herring
36f3dde260SRob Herring  avcc-supply: true
37416f882cSBeniamin Bia
38416f882cSBeniamin Bia  interrupts:
39*786cbd7cSGuillaume Stols    description:
40*786cbd7cSGuillaume Stols      The BUSY pin falling edge indicates that the conversion is over, and thus
41*786cbd7cSGuillaume Stols      new data is available.
42416f882cSBeniamin Bia    maxItems: 1
43416f882cSBeniamin Bia
44416f882cSBeniamin Bia  adi,conversion-start-gpios:
45416f882cSBeniamin Bia    description:
46a3b4a48fSGuillaume Stols      Must be the device tree identifier of the CONVST pin. This logic input is
47a3b4a48fSGuillaume Stols      used to initiate conversions on the analog input channels. As the line is
48a3b4a48fSGuillaume Stols      active high, it should be marked GPIO_ACTIVE_HIGH.
49416f882cSBeniamin Bia    maxItems: 1
50416f882cSBeniamin Bia
51416f882cSBeniamin Bia  reset-gpios:
52416f882cSBeniamin Bia    description:
53a3b4a48fSGuillaume Stols      Must be the device tree identifier of the RESET pin. If specified, it will
54*786cbd7cSGuillaume Stols      be asserted during driver probe. On the AD7606x, as the line is active
55*786cbd7cSGuillaume Stols      high, it should be marked GPIO_ACTIVE_HIGH. On the AD7616, as the line is
56*786cbd7cSGuillaume Stols      active low, it should be marked GPIO_ACTIVE_LOW.
57416f882cSBeniamin Bia    maxItems: 1
58416f882cSBeniamin Bia
59416f882cSBeniamin Bia  standby-gpios:
60416f882cSBeniamin Bia    description:
61a3b4a48fSGuillaume Stols      Must be the device tree identifier of the STBY pin. This pin is used to
62a3b4a48fSGuillaume Stols      place the AD7606 into one of two power-down modes, Standby mode or
63416f882cSBeniamin Bia      Shutdown mode. As the line is active low, it should be marked
64416f882cSBeniamin Bia      GPIO_ACTIVE_LOW.
65416f882cSBeniamin Bia    maxItems: 1
66416f882cSBeniamin Bia
67416f882cSBeniamin Bia  adi,first-data-gpios:
68416f882cSBeniamin Bia    description:
69a3b4a48fSGuillaume Stols      Must be the device tree identifier of the FRSTDATA pin. The FRSTDATA
70a3b4a48fSGuillaume Stols      output indicates when the first channel, V1, is being read back on either
71a3b4a48fSGuillaume Stols      the parallel, byte or serial interface. As the line is active high, it
72a3b4a48fSGuillaume Stols      should be marked GPIO_ACTIVE_HIGH.
73416f882cSBeniamin Bia    maxItems: 1
74416f882cSBeniamin Bia
75416f882cSBeniamin Bia  adi,range-gpios:
76416f882cSBeniamin Bia    description:
77*786cbd7cSGuillaume Stols      Must be the device tree identifier of the RANGE pin. The state on this
78a3b4a48fSGuillaume Stols      pin determines the input range of the analog input channels. If this pin
79a3b4a48fSGuillaume Stols      is tied to a logic high, the analog input range is ±10V for all channels.
80*786cbd7cSGuillaume Stols      On the AD760X, if this pin is tied to a logic low, the analog input range
81*786cbd7cSGuillaume Stols      is ±5V for all channels. As the line is active high, it should be marked
82416f882cSBeniamin Bia      GPIO_ACTIVE_HIGH.
83416f882cSBeniamin Bia    maxItems: 1
84416f882cSBeniamin Bia
85416f882cSBeniamin Bia  adi,oversampling-ratio-gpios:
86416f882cSBeniamin Bia    description:
87a3b4a48fSGuillaume Stols      Must be the device tree identifier of the over-sampling mode pins. As the
88*786cbd7cSGuillaume Stols      line is active high, it should be marked GPIO_ACTIVE_HIGH. On the AD7606X
89*786cbd7cSGuillaume Stols      parts that support it, if all 3 pins are tied to a logic high, software
90*786cbd7cSGuillaume Stols      mode is enabled.
91a6c4f77cSBeniamin Bia    maxItems: 3
92416f882cSBeniamin Bia
93416f882cSBeniamin Bia  adi,sw-mode:
94416f882cSBeniamin Bia    description:
95*786cbd7cSGuillaume Stols      Software mode of operation, so far available only for AD7616 and AD7606B.
96a3b4a48fSGuillaume Stols      It is enabled when all three oversampling mode pins are connected to high
97*786cbd7cSGuillaume Stols      level for the AD7606B, or both the range selection are connected to high
98*786cbd7cSGuillaume Stols      level for the AD7616. The device is configured by the corresponding
99*786cbd7cSGuillaume Stols      registers. If the adi,oversampling-ratio-gpios property is defined, then
100*786cbd7cSGuillaume Stols      the driver will set the oversampling gpios to high. Otherwise, it is
101*786cbd7cSGuillaume Stols      assumed that the pins are hardwired to VDD.
102416f882cSBeniamin Bia    type: boolean
103416f882cSBeniamin Bia
104416f882cSBeniamin Biarequired:
105416f882cSBeniamin Bia  - compatible
106416f882cSBeniamin Bia  - reg
107416f882cSBeniamin Bia  - spi-cpha
108416f882cSBeniamin Bia  - avcc-supply
109416f882cSBeniamin Bia  - interrupts
110416f882cSBeniamin Bia  - adi,conversion-start-gpios
111416f882cSBeniamin Bia
11280137388SKrzysztof KozlowskiallOf:
11380137388SKrzysztof Kozlowski  - $ref: /schemas/spi/spi-peripheral-props.yaml#
11480137388SKrzysztof Kozlowski
11580137388SKrzysztof KozlowskiunevaluatedProperties: false
1166fdc6e23SRob Herring
117416f882cSBeniamin Biaexamples:
118416f882cSBeniamin Bia  - |
119416f882cSBeniamin Bia    #include <dt-bindings/gpio/gpio.h>
120416f882cSBeniamin Bia    #include <dt-bindings/interrupt-controller/irq.h>
12146908557SKrzysztof Kozlowski    spi {
122416f882cSBeniamin Bia        #address-cells = <1>;
123416f882cSBeniamin Bia        #size-cells = <0>;
124416f882cSBeniamin Bia
125416f882cSBeniamin Bia        adc@0 {
126416f882cSBeniamin Bia            compatible = "adi,ad7606-8";
127416f882cSBeniamin Bia            reg = <0>;
128416f882cSBeniamin Bia            spi-max-frequency = <1000000>;
129416f882cSBeniamin Bia            spi-cpol;
130416f882cSBeniamin Bia            spi-cpha;
131416f882cSBeniamin Bia
132416f882cSBeniamin Bia            avcc-supply = <&adc_vref>;
133416f882cSBeniamin Bia
134416f882cSBeniamin Bia            interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
135416f882cSBeniamin Bia            interrupt-parent = <&gpio>;
136416f882cSBeniamin Bia
137416f882cSBeniamin Bia            adi,conversion-start-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
138416f882cSBeniamin Bia            reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
139416f882cSBeniamin Bia            adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
140a6c4f77cSBeniamin Bia            adi,oversampling-ratio-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>,
141a6c4f77cSBeniamin Bia                                           <&gpio 23 GPIO_ACTIVE_HIGH>,
142a6c4f77cSBeniamin Bia                                           <&gpio 26 GPIO_ACTIVE_HIGH>;
143416f882cSBeniamin Bia            standby-gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
144416f882cSBeniamin Bia            adi,sw-mode;
145416f882cSBeniamin Bia        };
146416f882cSBeniamin Bia    };
147416f882cSBeniamin Bia...
148