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