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