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