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