xref: /linux/Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml (revision 1260ed77798502de9c98020040d2995008de10cc)
18f69a686SRenato Lui Geh# SPDX-License-Identifier: GPL-2.0
28f69a686SRenato Lui Geh%YAML 1.2
38f69a686SRenato Lui Geh---
48f69a686SRenato Lui Geh$id: http://devicetree.org/schemas/iio/adc/adi,ad7780.yaml#
58f69a686SRenato Lui Geh$schema: http://devicetree.org/meta-schemas/core.yaml#
68f69a686SRenato Lui Geh
78f69a686SRenato Lui Gehtitle: Analog Devices AD7170/AD7171/AD7780/AD7781 analog to digital converters
88f69a686SRenato Lui Geh
98f69a686SRenato Lui Gehmaintainers:
108f69a686SRenato Lui Geh  - Michael Hennerich <michael.hennerich@analog.com>
118f69a686SRenato Lui Geh
128f69a686SRenato Lui Gehdescription: |
138f69a686SRenato Lui Geh  The ad7780 is a sigma-delta analog to digital converter. This driver provides
148f69a686SRenato Lui Geh  reading voltage values and status bits from both the ad778x and ad717x series.
158f69a686SRenato Lui Geh  Its interface also allows writing on the FILTER and GAIN GPIO pins on the
168f69a686SRenato Lui Geh  ad778x.
178f69a686SRenato Lui Geh
188f69a686SRenato Lui Geh  Specifications on the converters can be found at:
198f69a686SRenato Lui Geh    AD7170:
208f69a686SRenato Lui Geh      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7170.pdf
218f69a686SRenato Lui Geh    AD7171:
228f69a686SRenato Lui Geh      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7171.pdf
238f69a686SRenato Lui Geh    AD7780:
248f69a686SRenato Lui Geh      https://www.analog.com/media/en/technical-documentation/data-sheets/ad7780.pdf
258f69a686SRenato Lui Geh    AD7781:
268f69a686SRenato Lui Geh      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7781.pdf
278f69a686SRenato Lui Geh
288f69a686SRenato Lui Gehproperties:
298f69a686SRenato Lui Geh  compatible:
308f69a686SRenato Lui Geh    enum:
318f69a686SRenato Lui Geh      - adi,ad7170
328f69a686SRenato Lui Geh      - adi,ad7171
338f69a686SRenato Lui Geh      - adi,ad7780
348f69a686SRenato Lui Geh      - adi,ad7781
358f69a686SRenato Lui Geh
368f69a686SRenato Lui Geh  reg:
378f69a686SRenato Lui Geh    maxItems: 1
388f69a686SRenato Lui Geh
398f69a686SRenato Lui Geh  avdd-supply:
408f69a686SRenato Lui Geh    description:
418f69a686SRenato Lui Geh      The regulator supply for the ADC reference voltage.
428f69a686SRenato Lui Geh
438f69a686SRenato Lui Geh  powerdown-gpios:
448f69a686SRenato Lui Geh    description:
458f69a686SRenato Lui Geh      Must be the device tree identifier of the PDRST pin. If
468f69a686SRenato Lui Geh      specified, it will be asserted during driver probe. As the
478f69a686SRenato Lui Geh      line is active high, it should be marked GPIO_ACTIVE_HIGH.
488f69a686SRenato Lui Geh    maxItems: 1
498f69a686SRenato Lui Geh
508f69a686SRenato Lui Geh  adi,gain-gpios:
518f69a686SRenato Lui Geh    description:
528f69a686SRenato Lui Geh      Must be the device tree identifier of the GAIN pin. Only for
538f69a686SRenato Lui Geh      the ad778x chips. If specified, it will be asserted during
548f69a686SRenato Lui Geh      driver probe. As the line is active low, it should be marked
558f69a686SRenato Lui Geh      GPIO_ACTIVE_LOW.
568f69a686SRenato Lui Geh    maxItems: 1
578f69a686SRenato Lui Geh
588f69a686SRenato Lui Geh  adi,filter-gpios:
598f69a686SRenato Lui Geh    description:
608f69a686SRenato Lui Geh      Must be the device tree identifier of the FILTER pin. Only
618f69a686SRenato Lui Geh      for the ad778x chips. If specified, it will be asserted
628f69a686SRenato Lui Geh      during driver probe. As the line is active low, it should be
638f69a686SRenato Lui Geh      marked GPIO_ACTIVE_LOW.
648f69a686SRenato Lui Geh    maxItems: 1
658f69a686SRenato Lui Geh
66*fa6068fbSUwe Kleine-König  rdy-gpios:
67*fa6068fbSUwe Kleine-König    description:
68*fa6068fbSUwe Kleine-König      GPIO reading the R̅D̅Y̅ line. Having such a GPIO is technically optional but
69*fa6068fbSUwe Kleine-König      highly recommended because DOUT/R̅D̅Y̅ toggles during SPI transfers (in its
70*fa6068fbSUwe Kleine-König      DOUT aka MISO role) and so usually triggers a spurious interrupt. The
71*fa6068fbSUwe Kleine-König      distinction between such a spurious event and a real one can only be done
72*fa6068fbSUwe Kleine-König      by reading such a GPIO. (There is a register telling the same
73*fa6068fbSUwe Kleine-König      information, but accessing that one needs a SPI transfer which then
74*fa6068fbSUwe Kleine-König      triggers another interrupt event.)
75*fa6068fbSUwe Kleine-König    maxItems: 1
76*fa6068fbSUwe Kleine-König
778f69a686SRenato Lui Gehrequired:
788f69a686SRenato Lui Geh  - compatible
798f69a686SRenato Lui Geh  - reg
808f69a686SRenato Lui Geh
817f464532SRob HerringadditionalProperties: false
827f464532SRob Herring
838f69a686SRenato Lui Gehexamples:
848f69a686SRenato Lui Geh  - |
858f69a686SRenato Lui Geh    #include <dt-bindings/gpio/gpio.h>
8646908557SKrzysztof Kozlowski    spi {
878f69a686SRenato Lui Geh        #address-cells = <1>;
888f69a686SRenato Lui Geh        #size-cells = <0>;
898f69a686SRenato Lui Geh
908f69a686SRenato Lui Geh        adc@0 {
918f69a686SRenato Lui Geh            compatible = "adi,ad7780";
928f69a686SRenato Lui Geh            reg = <0>;
938f69a686SRenato Lui Geh
948f69a686SRenato Lui Geh            avdd-supply = <&vdd_supply>;
958f69a686SRenato Lui Geh            powerdown-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
968f69a686SRenato Lui Geh            adi,gain-gpios = <&gpio1  5 GPIO_ACTIVE_LOW>;
978f69a686SRenato Lui Geh            adi,filter-gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
988f69a686SRenato Lui Geh        };
998f69a686SRenato Lui Geh    };
100