dt-bindings: iio: ad7192: Add mandatory reference voltage source
[platform/kernel/linux-starfive.git] / Documentation / devicetree / bindings / iio / adc / adi,ad7192.yaml
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 # Copyright 2019 Analog Devices Inc.
3 %YAML 1.2
4 ---
5 $id: http://devicetree.org/schemas/iio/adc/adi,ad7192.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
7
8 title: Analog Devices AD7192 ADC device driver
9
10 maintainers:
11   - Michael Hennerich <michael.hennerich@analog.com>
12
13 description: |
14   Bindings for the Analog Devices AD7192 ADC device. Datasheet can be
15   found here:
16   https://www.analog.com/media/en/technical-documentation/data-sheets/AD7192.pdf
17
18 properties:
19   compatible:
20     enum:
21       - adi,ad7190
22       - adi,ad7192
23       - adi,ad7193
24       - adi,ad7195
25
26   reg:
27     maxItems: 1
28
29   spi-cpol: true
30
31   spi-cpha: true
32
33   clocks:
34     maxItems: 1
35     description: phandle to the master clock (mclk)
36
37   clock-names:
38     items:
39       - const: mclk
40
41   interrupts:
42     maxItems: 1
43
44   dvdd-supply:
45     description: DVdd voltage supply
46
47   avdd-supply:
48     description: AVdd voltage supply
49
50   vref-supply:
51     description: VRef voltage supply
52
53   adi,rejection-60-Hz-enable:
54     description: |
55       This bit enables a notch at 60 Hz when the first notch of the sinc
56       filter is at 50 Hz. When REJ60 is set, a filter notch is placed at
57       60 Hz when the sinc filter first notch is at 50 Hz. This allows
58       simultaneous 50 Hz/ 60 Hz rejection.
59     type: boolean
60
61   adi,refin2-pins-enable:
62     description: |
63       External reference applied between the P1/REFIN2(+) and P0/REFIN2(−) pins.
64     type: boolean
65
66   adi,buffer-enable:
67     description: |
68       Enables the buffer on the analog inputs. If cleared, the analog inputs
69       are unbuffered, lowering the power consumption of the device. If this
70       bit is set, the analog inputs are buffered, allowing the user to place
71       source impedances on the front end without contributing gain errors to
72       the system.
73     type: boolean
74
75   adi,burnout-currents-enable:
76     description: |
77       When this bit is set to 1, the 500 nA current sources in the signal
78       path are enabled. When BURN = 0, the burnout currents are disabled.
79       The burnout currents can be enabled only when the buffer is active
80       and when chop is disabled.
81     type: boolean
82
83   bipolar:
84     description: see Documentation/devicetree/bindings/iio/adc/adc.yaml
85     type: boolean
86
87 required:
88   - compatible
89   - reg
90   - clocks
91   - clock-names
92   - interrupts
93   - dvdd-supply
94   - avdd-supply
95   - vref-supply
96   - spi-cpol
97   - spi-cpha
98
99 allOf:
100   - $ref: /schemas/spi/spi-peripheral-props.yaml#
101
102 unevaluatedProperties: false
103
104 examples:
105   - |
106     spi {
107         #address-cells = <1>;
108         #size-cells = <0>;
109
110         adc@0 {
111             compatible = "adi,ad7192";
112             reg = <0>;
113             spi-max-frequency = <1000000>;
114             spi-cpol;
115             spi-cpha;
116             clocks = <&ad7192_mclk>;
117             clock-names = "mclk";
118             interrupts = <25 0x2>;
119             interrupt-parent = <&gpio>;
120             dvdd-supply = <&dvdd>;
121             avdd-supply = <&avdd>;
122             vref-supply = <&vref>;
123
124             adi,refin2-pins-enable;
125             adi,rejection-60-Hz-enable;
126             adi,buffer-enable;
127             adi,burnout-currents-enable;
128         };
129     };