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