Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml
53563 views
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
7
title: Analog Devices Simultaneous Sampling Analog to Digital Converters
8
9
maintainers:
10
- Michael Hennerich <Michael.Hennerich@analog.com>
11
- Nuno Sá <nuno.sa@analog.com>
12
13
description: |
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
* https://www.analog.com/en/products/ad7389-4.html
29
* https://www.analog.com/en/products/adaq4370-4.html
30
* https://www.analog.com/en/products/adaq4380-4.html
31
* https://www.analog.com/en/products/adaq4381-4.html
32
33
$ref: /schemas/spi/spi-peripheral-props.yaml#
34
35
properties:
36
compatible:
37
enum:
38
- adi,ad7380
39
- adi,ad7381
40
- adi,ad7383
41
- adi,ad7384
42
- adi,ad7386
43
- adi,ad7387
44
- adi,ad7388
45
- adi,ad7380-4
46
- adi,ad7381-4
47
- adi,ad7383-4
48
- adi,ad7384-4
49
- adi,ad7386-4
50
- adi,ad7387-4
51
- adi,ad7388-4
52
- adi,ad7389-4
53
- adi,adaq4370-4
54
- adi,adaq4380-4
55
- adi,adaq4381-4
56
57
reg:
58
maxItems: 1
59
60
spi-max-frequency:
61
maximum: 80000000
62
spi-cpol: true
63
spi-cpha: true
64
65
vcc-supply:
66
description: A 3V to 3.6V supply that powers the chip.
67
68
vlogic-supply:
69
description:
70
A 1.65V to 3.6V supply for the logic pins.
71
72
refio-supply:
73
description:
74
A 2.5V to 3.3V supply for the external reference voltage. When omitted,
75
the internal 2.5V reference is used.
76
77
refin-supply:
78
description:
79
A 2.5V to 3.3V supply for external reference voltage, for ad7380-4 only.
80
For adaq devices, a 5V supply voltage. A 3.3V internal reference is
81
derived from it. Connect to vs-p-supply for normal operation.
82
83
vs-p-supply:
84
description:
85
Amplifiers positive supply.
86
87
vs-n-supply:
88
description:
89
Amplifiers negative supply.
90
91
ldo-supply:
92
description:
93
LDO supply. Connect to vs-p-supply or a 3.6 to 5.5 V supply.
94
95
aina-supply:
96
description:
97
The common mode voltage supply for the AINA- pin on pseudo-differential
98
chips.
99
100
ainb-supply:
101
description:
102
The common mode voltage supply for the AINB- pin on pseudo-differential
103
chips.
104
105
ainc-supply:
106
description:
107
The common mode voltage supply for the AINC- pin on pseudo-differential
108
chips.
109
110
aind-supply:
111
description:
112
The common mode voltage supply for the AIND- pin on pseudo-differential
113
chips.
114
115
interrupts:
116
description:
117
When the device is using 1-wire mode, this property is used to optionally
118
specify the ALERT interrupt.
119
maxItems: 1
120
121
"#address-cells":
122
const: 1
123
124
"#size-cells":
125
const: 0
126
127
required:
128
- compatible
129
- reg
130
- vcc-supply
131
- vlogic-supply
132
133
patternProperties:
134
"^channel@[0-3]$":
135
$ref: adc.yaml
136
type: object
137
138
properties:
139
reg:
140
description:
141
The channel number. From 0 to 3 corresponding to channels A,B,C,D
142
minimum: 0
143
maximum: 3
144
145
adi,gain-milli:
146
description:
147
The hardware gain applied to the ADC input (in milli units).
148
If not present, default to 1000 (no actual gain applied).
149
Refer to the typical connection diagrams section of the datasheet for
150
pin wiring.
151
$ref: /schemas/types.yaml#/definitions/uint16
152
enum: [300, 600, 1000, 1600]
153
default: 1000
154
155
required:
156
- reg
157
158
additionalProperties: false
159
160
unevaluatedProperties: false
161
162
allOf:
163
# pseudo-differential chips require common mode voltage supplies,
164
# true differential chips don't use them
165
- if:
166
properties:
167
compatible:
168
enum:
169
- adi,ad7383
170
- adi,ad7384
171
- adi,ad7383-4
172
- adi,ad7384-4
173
then:
174
required:
175
- aina-supply
176
- ainb-supply
177
else:
178
properties:
179
aina-supply: false
180
ainb-supply: false
181
- if:
182
properties:
183
compatible:
184
enum:
185
- adi,ad7383-4
186
- adi,ad7384-4
187
then:
188
required:
189
- ainc-supply
190
- aind-supply
191
else:
192
properties:
193
ainc-supply: false
194
aind-supply: false
195
196
# ad7380-4 uses refin-supply as external reference.
197
# adaq devices use internal reference only, derived from refin-supply
198
# All other chips from ad738x family use refio as optional external reference.
199
# When refio-supply is omitted, internal reference is used.
200
- if:
201
properties:
202
compatible:
203
enum:
204
- adi,ad7380-4
205
- adi,adaq4370-4
206
- adi,adaq4380-4
207
- adi,adaq4381-4
208
then:
209
properties:
210
refio-supply: false
211
required:
212
- refin-supply
213
else:
214
properties:
215
refin-supply: false
216
217
# adi,ad7389-4 is internal reference only
218
- if:
219
properties:
220
compatible:
221
const: adi,ad7389-4
222
then:
223
properties:
224
refio-supply: false
225
226
# adaq devices need more supplies and using channel to declare gain property
227
# only applies to adaq devices
228
- if:
229
properties:
230
compatible:
231
enum:
232
- adi,adaq4370-4
233
- adi,adaq4380-4
234
- adi,adaq4381-4
235
then:
236
required:
237
- vs-p-supply
238
- vs-n-supply
239
- ldo-supply
240
else:
241
properties:
242
vs-p-supply: false
243
vs-n-supply: false
244
ldo-supply: false
245
patternProperties:
246
"^channel@[0-3]$": false
247
248
examples:
249
- |
250
#include <dt-bindings/interrupt-controller/irq.h>
251
252
spi {
253
#address-cells = <1>;
254
#size-cells = <0>;
255
256
adc@0 {
257
compatible = "adi,ad7380";
258
reg = <0>;
259
260
spi-cpol;
261
spi-cpha;
262
spi-max-frequency = <80000000>;
263
264
interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
265
interrupt-parent = <&gpio0>;
266
267
vcc-supply = <&supply_3_3V>;
268
vlogic-supply = <&supply_3_3V>;
269
refio-supply = <&supply_2_5V>;
270
};
271
};
272
273
- |
274
#include <dt-bindings/interrupt-controller/irq.h>
275
276
spi {
277
#address-cells = <1>;
278
#size-cells = <0>;
279
280
adc@0 {
281
compatible = "adi,adaq4380-4";
282
reg = <0>;
283
284
spi-cpol;
285
spi-cpha;
286
spi-max-frequency = <80000000>;
287
288
interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
289
interrupt-parent = <&gpio0>;
290
291
vcc-supply = <&supply_3_3V>;
292
vlogic-supply = <&supply_3_3V>;
293
refin-supply = <&supply_5V>;
294
vs-p-supply = <&supply_5V>;
295
vs-n-supply = <&supply_0V>;
296
ldo-supply = <&supply_5V>;
297
298
#address-cells = <1>;
299
#size-cells = <0>;
300
301
channel@0 {
302
reg = <0>;
303
adi,gain-milli = /bits/ 16 <300>;
304
};
305
306
channel@2 {
307
reg = <2>;
308
adi,gain-milli = /bits/ 16 <600>;
309
};
310
311
channel@3 {
312
reg = <3>;
313
adi,gain-milli = /bits/ 16 <1000>;
314
};
315
};
316
};
317
318