18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci%YAML 1.2
38c2ecf20Sopenharmony_ci---
48c2ecf20Sopenharmony_ci$id: http://devicetree.org/schemas/iio/adc/adi,ad7606.yaml#
58c2ecf20Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cititle: Analog Devices AD7606 Simultaneous Sampling ADC
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_cimaintainers:
108c2ecf20Sopenharmony_ci  - Beniamin Bia <beniamin.bia@analog.com>
118c2ecf20Sopenharmony_ci  - Stefan Popa <stefan.popa@analog.com>
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_cidescription: |
148c2ecf20Sopenharmony_ci  Analog Devices AD7606 Simultaneous Sampling ADC
158c2ecf20Sopenharmony_ci  https://www.analog.com/media/en/technical-documentation/data-sheets/ad7606_7606-6_7606-4.pdf
168c2ecf20Sopenharmony_ci  https://www.analog.com/media/en/technical-documentation/data-sheets/AD7606B.pdf
178c2ecf20Sopenharmony_ci  https://www.analog.com/media/en/technical-documentation/data-sheets/AD7616.pdf
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ciproperties:
208c2ecf20Sopenharmony_ci  compatible:
218c2ecf20Sopenharmony_ci    enum:
228c2ecf20Sopenharmony_ci      - adi,ad7605-4
238c2ecf20Sopenharmony_ci      - adi,ad7606-8
248c2ecf20Sopenharmony_ci      - adi,ad7606-6
258c2ecf20Sopenharmony_ci      - adi,ad7606-4
268c2ecf20Sopenharmony_ci      - adi,ad7606b
278c2ecf20Sopenharmony_ci      - adi,ad7616
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci  reg:
308c2ecf20Sopenharmony_ci    maxItems: 1
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci  spi-cpha: true
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci  spi-cpol: true
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci  spi-max-frequency: true
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci  avcc-supply: true
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci  interrupts:
418c2ecf20Sopenharmony_ci    maxItems: 1
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci  adi,conversion-start-gpios:
448c2ecf20Sopenharmony_ci    description:
458c2ecf20Sopenharmony_ci      Must be the device tree identifier of the CONVST pin.
468c2ecf20Sopenharmony_ci      This logic input is used to initiate conversions on the analog
478c2ecf20Sopenharmony_ci      input channels. As the line is active high, it should be marked
488c2ecf20Sopenharmony_ci      GPIO_ACTIVE_HIGH.
498c2ecf20Sopenharmony_ci    maxItems: 1
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci  reset-gpios:
528c2ecf20Sopenharmony_ci    description:
538c2ecf20Sopenharmony_ci      Must be the device tree identifier of the RESET pin. If specified,
548c2ecf20Sopenharmony_ci      it will be asserted during driver probe. As the line is active high,
558c2ecf20Sopenharmony_ci      it should be marked GPIO_ACTIVE_HIGH.
568c2ecf20Sopenharmony_ci    maxItems: 1
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci  standby-gpios:
598c2ecf20Sopenharmony_ci    description:
608c2ecf20Sopenharmony_ci      Must be the device tree identifier of the STBY pin. This pin is used
618c2ecf20Sopenharmony_ci      to place the AD7606 into one of two power-down modes, Standby mode or
628c2ecf20Sopenharmony_ci      Shutdown mode. As the line is active low, it should be marked
638c2ecf20Sopenharmony_ci      GPIO_ACTIVE_LOW.
648c2ecf20Sopenharmony_ci    maxItems: 1
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci  adi,first-data-gpios:
678c2ecf20Sopenharmony_ci    description:
688c2ecf20Sopenharmony_ci      Must be the device tree identifier of the FRSTDATA pin.
698c2ecf20Sopenharmony_ci      The FRSTDATA output indicates when the first channel, V1, is
708c2ecf20Sopenharmony_ci      being read back on either the parallel, byte or serial interface.
718c2ecf20Sopenharmony_ci      As the line is active high, it should be marked GPIO_ACTIVE_HIGH.
728c2ecf20Sopenharmony_ci    maxItems: 1
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ci  adi,range-gpios:
758c2ecf20Sopenharmony_ci    description:
768c2ecf20Sopenharmony_ci      Must be the device tree identifier of the RANGE pin. The polarity on
778c2ecf20Sopenharmony_ci      this pin determines the input range of the analog input channels. If
788c2ecf20Sopenharmony_ci      this pin is tied to a logic high, the analog input range is ±10V for
798c2ecf20Sopenharmony_ci      all channels. If this pin is tied to a logic low, the analog input range
808c2ecf20Sopenharmony_ci      is ±5V for all channels. As the line is active high, it should be marked
818c2ecf20Sopenharmony_ci      GPIO_ACTIVE_HIGH.
828c2ecf20Sopenharmony_ci    maxItems: 1
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_ci  adi,oversampling-ratio-gpios:
858c2ecf20Sopenharmony_ci    description:
868c2ecf20Sopenharmony_ci      Must be the device tree identifier of the over-sampling
878c2ecf20Sopenharmony_ci      mode pins. As the line is active high, it should be marked
888c2ecf20Sopenharmony_ci      GPIO_ACTIVE_HIGH.
898c2ecf20Sopenharmony_ci    maxItems: 3
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci  adi,sw-mode:
928c2ecf20Sopenharmony_ci    description:
938c2ecf20Sopenharmony_ci      Software mode of operation, so far available only for ad7616 and ad7606b.
948c2ecf20Sopenharmony_ci      It is enabled when all three oversampling mode pins are connected to
958c2ecf20Sopenharmony_ci      high level. The device is configured by the corresponding registers. If the
968c2ecf20Sopenharmony_ci      adi,oversampling-ratio-gpios property is defined, then the driver will set the
978c2ecf20Sopenharmony_ci      oversampling gpios to high. Otherwise, it is assumed that the pins are hardwired
988c2ecf20Sopenharmony_ci      to VDD.
998c2ecf20Sopenharmony_ci    type: boolean
1008c2ecf20Sopenharmony_ci
1018c2ecf20Sopenharmony_cirequired:
1028c2ecf20Sopenharmony_ci  - compatible
1038c2ecf20Sopenharmony_ci  - reg
1048c2ecf20Sopenharmony_ci  - spi-cpha
1058c2ecf20Sopenharmony_ci  - avcc-supply
1068c2ecf20Sopenharmony_ci  - interrupts
1078c2ecf20Sopenharmony_ci  - adi,conversion-start-gpios
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ciadditionalProperties: false
1108c2ecf20Sopenharmony_ci
1118c2ecf20Sopenharmony_ciexamples:
1128c2ecf20Sopenharmony_ci  - |
1138c2ecf20Sopenharmony_ci    #include <dt-bindings/gpio/gpio.h>
1148c2ecf20Sopenharmony_ci    #include <dt-bindings/interrupt-controller/irq.h>
1158c2ecf20Sopenharmony_ci    spi0 {
1168c2ecf20Sopenharmony_ci        #address-cells = <1>;
1178c2ecf20Sopenharmony_ci        #size-cells = <0>;
1188c2ecf20Sopenharmony_ci
1198c2ecf20Sopenharmony_ci        adc@0 {
1208c2ecf20Sopenharmony_ci                compatible = "adi,ad7606-8";
1218c2ecf20Sopenharmony_ci                reg = <0>;
1228c2ecf20Sopenharmony_ci                spi-max-frequency = <1000000>;
1238c2ecf20Sopenharmony_ci                spi-cpol;
1248c2ecf20Sopenharmony_ci                spi-cpha;
1258c2ecf20Sopenharmony_ci
1268c2ecf20Sopenharmony_ci                avcc-supply = <&adc_vref>;
1278c2ecf20Sopenharmony_ci
1288c2ecf20Sopenharmony_ci                interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
1298c2ecf20Sopenharmony_ci                interrupt-parent = <&gpio>;
1308c2ecf20Sopenharmony_ci
1318c2ecf20Sopenharmony_ci                adi,conversion-start-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
1328c2ecf20Sopenharmony_ci                reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
1338c2ecf20Sopenharmony_ci                adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
1348c2ecf20Sopenharmony_ci                adi,oversampling-ratio-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>,
1358c2ecf20Sopenharmony_ci                                               <&gpio 23 GPIO_ACTIVE_HIGH>,
1368c2ecf20Sopenharmony_ci                                               <&gpio 26 GPIO_ACTIVE_HIGH>;
1378c2ecf20Sopenharmony_ci                standby-gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
1388c2ecf20Sopenharmony_ci                adi,sw-mode;
1398c2ecf20Sopenharmony_ci        };
1408c2ecf20Sopenharmony_ci    };
1418c2ecf20Sopenharmony_ci...
142