xref: /linux/Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml (revision 0c436dfe5c25d0931b164b944165259f95e5281f)
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/adi,ad7380.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Analog Devices Simultaneous Sampling Analog to Digital Converters
8
9maintainers:
10  - Michael Hennerich <Michael.Hennerich@analog.com>
11  - Nuno Sá <nuno.sa@analog.com>
12
13description: |
14  * https://www.analog.com/en/products/ad7380.html
15  * https://www.analog.com/en/products/ad7381.html
16  * https://www.analog.com/en/products/ad7383.html
17  * https://www.analog.com/en/products/ad7384.html
18  * https://www.analog.com/en/products/ad7386.html
19  * https://www.analog.com/en/products/ad7387.html
20  * https://www.analog.com/en/products/ad7388.html
21  * https://www.analog.com/en/products/ad7380-4.html
22  * https://www.analog.com/en/products/ad7381-4.html
23  * https://www.analog.com/en/products/ad7383-4.html
24  * https://www.analog.com/en/products/ad7384-4.html
25  * https://www.analog.com/en/products/ad7386-4.html
26  * https://www.analog.com/en/products/ad7387-4.html
27  * https://www.analog.com/en/products/ad7388-4.html
28
29
30$ref: /schemas/spi/spi-peripheral-props.yaml#
31
32properties:
33  compatible:
34    enum:
35      - adi,ad7380
36      - adi,ad7381
37      - adi,ad7383
38      - adi,ad7384
39      - adi,ad7386
40      - adi,ad7387
41      - adi,ad7388
42      - adi,ad7380-4
43      - adi,ad7381-4
44      - adi,ad7383-4
45      - adi,ad7384-4
46      - adi,ad7386-4
47      - adi,ad7387-4
48      - adi,ad7388-4
49
50  reg:
51    maxItems: 1
52
53  spi-max-frequency:
54    maximum: 80000000
55  spi-cpol: true
56  spi-cpha: true
57
58  vcc-supply:
59    description: A 3V to 3.6V supply that powers the chip.
60
61  vlogic-supply:
62    description:
63      A 1.65V to 3.6V supply for the logic pins.
64
65  refio-supply:
66    description:
67      A 2.5V to 3.3V supply for the external reference voltage. When omitted,
68      the internal 2.5V reference is used.
69
70  aina-supply:
71    description:
72      The common mode voltage supply for the AINA- pin on pseudo-differential
73      chips.
74
75  ainb-supply:
76    description:
77      The common mode voltage supply for the AINB- pin on pseudo-differential
78      chips.
79
80  ainc-supply:
81    description:
82      The common mode voltage supply for the AINC- pin on pseudo-differential
83      chips.
84
85  aind-supply:
86    description:
87      The common mode voltage supply for the AIND- pin on pseudo-differential
88      chips.
89
90  interrupts:
91    description:
92      When the device is using 1-wire mode, this property is used to optionally
93      specify the ALERT interrupt.
94    maxItems: 1
95
96required:
97  - compatible
98  - reg
99  - vcc-supply
100  - vlogic-supply
101
102unevaluatedProperties: false
103
104allOf:
105  # pseudo-differential chips require common mode voltage supplies,
106  # true differential chips don't use them
107  - if:
108      properties:
109        compatible:
110          enum:
111            - adi,ad7383
112            - adi,ad7384
113            - adi,ad7383-4
114            - adi,ad7384-4
115    then:
116      required:
117        - aina-supply
118        - ainb-supply
119    else:
120      properties:
121        aina-supply: false
122        ainb-supply: false
123  - if:
124      properties:
125        compatible:
126          enum:
127            - adi,ad7383-4
128            - adi,ad7384-4
129    then:
130      required:
131        - ainc-supply
132        - aind-supply
133    else:
134      properties:
135        ainc-supply: false
136        aind-supply: false
137
138examples:
139  - |
140    #include <dt-bindings/interrupt-controller/irq.h>
141
142    spi {
143        #address-cells = <1>;
144        #size-cells = <0>;
145
146        adc@0 {
147            compatible = "adi,ad7380";
148            reg = <0>;
149
150            spi-cpol;
151            spi-cpha;
152            spi-max-frequency = <80000000>;
153
154            interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
155            interrupt-parent = <&gpio0>;
156
157            vcc-supply = <&supply_3_3V>;
158            vlogic-supply = <&supply_3_3V>;
159            refio-supply = <&supply_2_5V>;
160        };
161    };
162