xref: /freebsd/sys/contrib/device-tree/Bindings/iio/adc/adi,ad7780.yaml (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
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,ad7780.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: Analog Devices AD7170/AD7171/AD7780/AD7781 analog to digital converters
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Michael Hennerich <michael.hennerich@analog.com>
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel Vadotdescription: |
13c66ec88fSEmmanuel Vadot  The ad7780 is a sigma-delta analog to digital converter. This driver provides
14c66ec88fSEmmanuel Vadot  reading voltage values and status bits from both the ad778x and ad717x series.
15c66ec88fSEmmanuel Vadot  Its interface also allows writing on the FILTER and GAIN GPIO pins on the
16c66ec88fSEmmanuel Vadot  ad778x.
17c66ec88fSEmmanuel Vadot
18c66ec88fSEmmanuel Vadot  Specifications on the converters can be found at:
19c66ec88fSEmmanuel Vadot    AD7170:
20c66ec88fSEmmanuel Vadot      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7170.pdf
21c66ec88fSEmmanuel Vadot    AD7171:
22c66ec88fSEmmanuel Vadot      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7171.pdf
23c66ec88fSEmmanuel Vadot    AD7780:
24c66ec88fSEmmanuel Vadot      https://www.analog.com/media/en/technical-documentation/data-sheets/ad7780.pdf
25c66ec88fSEmmanuel Vadot    AD7781:
26c66ec88fSEmmanuel Vadot      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7781.pdf
27c66ec88fSEmmanuel Vadot
28c66ec88fSEmmanuel Vadotproperties:
29c66ec88fSEmmanuel Vadot  compatible:
30c66ec88fSEmmanuel Vadot    enum:
31c66ec88fSEmmanuel Vadot      - adi,ad7170
32c66ec88fSEmmanuel Vadot      - adi,ad7171
33c66ec88fSEmmanuel Vadot      - adi,ad7780
34c66ec88fSEmmanuel Vadot      - adi,ad7781
35c66ec88fSEmmanuel Vadot
36c66ec88fSEmmanuel Vadot  reg:
37c66ec88fSEmmanuel Vadot    maxItems: 1
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel Vadot  avdd-supply:
40c66ec88fSEmmanuel Vadot    description:
41c66ec88fSEmmanuel Vadot      The regulator supply for the ADC reference voltage.
42c66ec88fSEmmanuel Vadot
43c66ec88fSEmmanuel Vadot  powerdown-gpios:
44c66ec88fSEmmanuel Vadot    description:
45c66ec88fSEmmanuel Vadot      Must be the device tree identifier of the PDRST pin. If
46c66ec88fSEmmanuel Vadot      specified, it will be asserted during driver probe. As the
47c66ec88fSEmmanuel Vadot      line is active high, it should be marked GPIO_ACTIVE_HIGH.
48c66ec88fSEmmanuel Vadot    maxItems: 1
49c66ec88fSEmmanuel Vadot
50c66ec88fSEmmanuel Vadot  adi,gain-gpios:
51c66ec88fSEmmanuel Vadot    description:
52c66ec88fSEmmanuel Vadot      Must be the device tree identifier of the GAIN pin. Only for
53c66ec88fSEmmanuel Vadot      the ad778x chips. If specified, it will be asserted during
54c66ec88fSEmmanuel Vadot      driver probe. As the line is active low, it should be marked
55c66ec88fSEmmanuel Vadot      GPIO_ACTIVE_LOW.
56c66ec88fSEmmanuel Vadot    maxItems: 1
57c66ec88fSEmmanuel Vadot
58c66ec88fSEmmanuel Vadot  adi,filter-gpios:
59c66ec88fSEmmanuel Vadot    description:
60c66ec88fSEmmanuel Vadot      Must be the device tree identifier of the FILTER pin. Only
61c66ec88fSEmmanuel Vadot      for the ad778x chips. If specified, it will be asserted
62c66ec88fSEmmanuel Vadot      during driver probe. As the line is active low, it should be
63c66ec88fSEmmanuel Vadot      marked GPIO_ACTIVE_LOW.
64c66ec88fSEmmanuel Vadot    maxItems: 1
65c66ec88fSEmmanuel Vadot
66c66ec88fSEmmanuel Vadotrequired:
67c66ec88fSEmmanuel Vadot  - compatible
68c66ec88fSEmmanuel Vadot  - reg
69c66ec88fSEmmanuel Vadot
70c66ec88fSEmmanuel VadotadditionalProperties: false
71c66ec88fSEmmanuel Vadot
72c66ec88fSEmmanuel Vadotexamples:
73c66ec88fSEmmanuel Vadot  - |
74c66ec88fSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
75*cb7aa33aSEmmanuel Vadot    spi {
76c66ec88fSEmmanuel Vadot        #address-cells = <1>;
77c66ec88fSEmmanuel Vadot        #size-cells = <0>;
78c66ec88fSEmmanuel Vadot
79c66ec88fSEmmanuel Vadot        adc@0 {
80c66ec88fSEmmanuel Vadot            compatible = "adi,ad7780";
81c66ec88fSEmmanuel Vadot            reg = <0>;
82c66ec88fSEmmanuel Vadot
83c66ec88fSEmmanuel Vadot            avdd-supply      = <&vdd_supply>;
84c66ec88fSEmmanuel Vadot            powerdown-gpios  = <&gpio0 12 GPIO_ACTIVE_HIGH>;
85c66ec88fSEmmanuel Vadot            adi,gain-gpios   = <&gpio1  5 GPIO_ACTIVE_LOW>;
86c66ec88fSEmmanuel Vadot            adi,filter-gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
87c66ec88fSEmmanuel Vadot        };
88c66ec88fSEmmanuel Vadot    };
89