xref: /linux/Documentation/devicetree/bindings/iio/adc/ti,ads1018.yaml (revision c17ee635fd3a482b2ad2bf5e269755c2eae5f25e)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/adc/ti,ads1018.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: TI ADS1018/ADS1118 SPI analog to digital converter
8
9maintainers:
10  - Kurt Borja <kuurtb@gmail.com>
11
12description: |
13  The ADS1018/ADS1118 is a precision, low-power, 12-bit/16-bit, analog to
14  digital converter (ADC). It integrates a programmable gain amplifier (PGA),
15  internal voltage reference, oscillator and high-accuracy temperature sensor.
16
17  Datasheets:
18    - ADS1018: https://www.ti.com/lit/ds/symlink/ads1018.pdf
19    - ADS1118: https://www.ti.com/lit/ds/symlink/ads1118.pdf
20
21properties:
22  compatible:
23    enum:
24      - ti,ads1018
25      - ti,ads1118
26
27  reg:
28    maxItems: 1
29
30  vdd-supply: true
31
32  spi-max-frequency:
33    maximum: 4000000
34
35  spi-cpha: true
36
37  interrupts:
38    description: DOUT/DRDY (Data Out/Data Ready) line.
39    maxItems: 1
40
41  drdy-gpios:
42    description:
43      Extra GPIO line connected to DOUT/DRDY (Data Out/Data Ready). This allows
44      distinguishing between interrupts triggered by the data-ready signal and
45      interrupts triggered by an SPI transfer.
46    maxItems: 1
47
48  '#io-channel-cells':
49    const: 1
50
51required:
52  - compatible
53  - reg
54  - vdd-supply
55
56allOf:
57  - $ref: /schemas/spi/spi-peripheral-props.yaml#
58
59unevaluatedProperties: false
60
61examples:
62  - |
63    #include <dt-bindings/interrupt-controller/irq.h>
64    #include <dt-bindings/gpio/gpio.h>
65
66    spi {
67        #address-cells = <1>;
68        #size-cells = <0>;
69
70        adc@0 {
71            compatible = "ti,ads1118";
72            reg = <0>;
73
74            spi-max-frequency = <4000000>;
75            spi-cpha;
76
77            vdd-supply = <&vdd_3v3_reg>;
78
79            interrupts-extended = <&gpio 14 IRQ_TYPE_EDGE_FALLING>;
80            drdy-gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
81        };
82    };
83