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