162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci%YAML 1.2
362306a36Sopenharmony_ci---
462306a36Sopenharmony_ci$id: http://devicetree.org/schemas/iio/adc/adi,ad7606.yaml#
562306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
662306a36Sopenharmony_ci
762306a36Sopenharmony_cititle: Analog Devices AD7606 Simultaneous Sampling ADC
862306a36Sopenharmony_ci
962306a36Sopenharmony_cimaintainers:
1062306a36Sopenharmony_ci  - Michael Hennerich <michael.hennerich@analog.com>
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_cidescription: |
1362306a36Sopenharmony_ci  Analog Devices AD7606 Simultaneous Sampling ADC
1462306a36Sopenharmony_ci  https://www.analog.com/media/en/technical-documentation/data-sheets/ad7606_7606-6_7606-4.pdf
1562306a36Sopenharmony_ci  https://www.analog.com/media/en/technical-documentation/data-sheets/AD7606B.pdf
1662306a36Sopenharmony_ci  https://www.analog.com/media/en/technical-documentation/data-sheets/AD7616.pdf
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ciproperties:
1962306a36Sopenharmony_ci  compatible:
2062306a36Sopenharmony_ci    enum:
2162306a36Sopenharmony_ci      - adi,ad7605-4
2262306a36Sopenharmony_ci      - adi,ad7606-8
2362306a36Sopenharmony_ci      - adi,ad7606-6
2462306a36Sopenharmony_ci      - adi,ad7606-4
2562306a36Sopenharmony_ci      - adi,ad7606b
2662306a36Sopenharmony_ci      - adi,ad7616
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci  reg:
2962306a36Sopenharmony_ci    maxItems: 1
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci  spi-cpha: true
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci  spi-cpol: true
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci  avcc-supply: true
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ci  interrupts:
3862306a36Sopenharmony_ci    maxItems: 1
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ci  adi,conversion-start-gpios:
4162306a36Sopenharmony_ci    description:
4262306a36Sopenharmony_ci      Must be the device tree identifier of the CONVST pin.
4362306a36Sopenharmony_ci      This logic input is used to initiate conversions on the analog
4462306a36Sopenharmony_ci      input channels. As the line is active high, it should be marked
4562306a36Sopenharmony_ci      GPIO_ACTIVE_HIGH.
4662306a36Sopenharmony_ci    maxItems: 1
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci  reset-gpios:
4962306a36Sopenharmony_ci    description:
5062306a36Sopenharmony_ci      Must be the device tree identifier of the RESET pin. If specified,
5162306a36Sopenharmony_ci      it will be asserted during driver probe. As the line is active high,
5262306a36Sopenharmony_ci      it should be marked GPIO_ACTIVE_HIGH.
5362306a36Sopenharmony_ci    maxItems: 1
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci  standby-gpios:
5662306a36Sopenharmony_ci    description:
5762306a36Sopenharmony_ci      Must be the device tree identifier of the STBY pin. This pin is used
5862306a36Sopenharmony_ci      to place the AD7606 into one of two power-down modes, Standby mode or
5962306a36Sopenharmony_ci      Shutdown mode. As the line is active low, it should be marked
6062306a36Sopenharmony_ci      GPIO_ACTIVE_LOW.
6162306a36Sopenharmony_ci    maxItems: 1
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ci  adi,first-data-gpios:
6462306a36Sopenharmony_ci    description:
6562306a36Sopenharmony_ci      Must be the device tree identifier of the FRSTDATA pin.
6662306a36Sopenharmony_ci      The FRSTDATA output indicates when the first channel, V1, is
6762306a36Sopenharmony_ci      being read back on either the parallel, byte or serial interface.
6862306a36Sopenharmony_ci      As the line is active high, it should be marked GPIO_ACTIVE_HIGH.
6962306a36Sopenharmony_ci    maxItems: 1
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ci  adi,range-gpios:
7262306a36Sopenharmony_ci    description:
7362306a36Sopenharmony_ci      Must be the device tree identifier of the RANGE pin. The polarity on
7462306a36Sopenharmony_ci      this pin determines the input range of the analog input channels. If
7562306a36Sopenharmony_ci      this pin is tied to a logic high, the analog input range is ±10V for
7662306a36Sopenharmony_ci      all channels. If this pin is tied to a logic low, the analog input range
7762306a36Sopenharmony_ci      is ±5V for all channels. As the line is active high, it should be marked
7862306a36Sopenharmony_ci      GPIO_ACTIVE_HIGH.
7962306a36Sopenharmony_ci    maxItems: 1
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ci  adi,oversampling-ratio-gpios:
8262306a36Sopenharmony_ci    description:
8362306a36Sopenharmony_ci      Must be the device tree identifier of the over-sampling
8462306a36Sopenharmony_ci      mode pins. As the line is active high, it should be marked
8562306a36Sopenharmony_ci      GPIO_ACTIVE_HIGH.
8662306a36Sopenharmony_ci    maxItems: 3
8762306a36Sopenharmony_ci
8862306a36Sopenharmony_ci  adi,sw-mode:
8962306a36Sopenharmony_ci    description:
9062306a36Sopenharmony_ci      Software mode of operation, so far available only for ad7616 and ad7606b.
9162306a36Sopenharmony_ci      It is enabled when all three oversampling mode pins are connected to
9262306a36Sopenharmony_ci      high level. The device is configured by the corresponding registers. If the
9362306a36Sopenharmony_ci      adi,oversampling-ratio-gpios property is defined, then the driver will set the
9462306a36Sopenharmony_ci      oversampling gpios to high. Otherwise, it is assumed that the pins are hardwired
9562306a36Sopenharmony_ci      to VDD.
9662306a36Sopenharmony_ci    type: boolean
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_cirequired:
9962306a36Sopenharmony_ci  - compatible
10062306a36Sopenharmony_ci  - reg
10162306a36Sopenharmony_ci  - spi-cpha
10262306a36Sopenharmony_ci  - avcc-supply
10362306a36Sopenharmony_ci  - interrupts
10462306a36Sopenharmony_ci  - adi,conversion-start-gpios
10562306a36Sopenharmony_ci
10662306a36Sopenharmony_ciallOf:
10762306a36Sopenharmony_ci  - $ref: /schemas/spi/spi-peripheral-props.yaml#
10862306a36Sopenharmony_ci
10962306a36Sopenharmony_ciunevaluatedProperties: false
11062306a36Sopenharmony_ci
11162306a36Sopenharmony_ciexamples:
11262306a36Sopenharmony_ci  - |
11362306a36Sopenharmony_ci    #include <dt-bindings/gpio/gpio.h>
11462306a36Sopenharmony_ci    #include <dt-bindings/interrupt-controller/irq.h>
11562306a36Sopenharmony_ci    spi {
11662306a36Sopenharmony_ci        #address-cells = <1>;
11762306a36Sopenharmony_ci        #size-cells = <0>;
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ci        adc@0 {
12062306a36Sopenharmony_ci            compatible = "adi,ad7606-8";
12162306a36Sopenharmony_ci            reg = <0>;
12262306a36Sopenharmony_ci            spi-max-frequency = <1000000>;
12362306a36Sopenharmony_ci            spi-cpol;
12462306a36Sopenharmony_ci            spi-cpha;
12562306a36Sopenharmony_ci
12662306a36Sopenharmony_ci            avcc-supply = <&adc_vref>;
12762306a36Sopenharmony_ci
12862306a36Sopenharmony_ci            interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
12962306a36Sopenharmony_ci            interrupt-parent = <&gpio>;
13062306a36Sopenharmony_ci
13162306a36Sopenharmony_ci            adi,conversion-start-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
13262306a36Sopenharmony_ci            reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
13362306a36Sopenharmony_ci            adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
13462306a36Sopenharmony_ci            adi,oversampling-ratio-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>,
13562306a36Sopenharmony_ci                                           <&gpio 23 GPIO_ACTIVE_HIGH>,
13662306a36Sopenharmony_ci                                           <&gpio 26 GPIO_ACTIVE_HIGH>;
13762306a36Sopenharmony_ci            standby-gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
13862306a36Sopenharmony_ci            adi,sw-mode;
13962306a36Sopenharmony_ci        };
14062306a36Sopenharmony_ci    };
14162306a36Sopenharmony_ci...
142