Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml
53955 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,ad4695.yaml#
5
$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7
title: Analog Devices Easy Drive Multiplexed SAR 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
A family of similar multi-channel analog to digital converters with SPI bus.
15
16
* https://www.analog.com/en/products/ad4695.html
17
* https://www.analog.com/en/products/ad4696.html
18
* https://www.analog.com/en/products/ad4697.html
19
* https://www.analog.com/en/products/ad4698.html
20
21
$ref: /schemas/spi/spi-peripheral-props.yaml#
22
23
properties:
24
compatible:
25
enum:
26
- adi,ad4695
27
- adi,ad4696
28
- adi,ad4697
29
- adi,ad4698
30
31
reg:
32
maxItems: 1
33
34
spi-max-frequency:
35
maximum: 80000000
36
37
spi-cpol: true
38
spi-cpha: true
39
40
spi-rx-bus-width:
41
items:
42
minimum: 1
43
maximum: 4
44
45
avdd-supply:
46
description: Analog power supply.
47
48
vio-supply:
49
description: I/O pin power supply.
50
51
ldo-in-supply:
52
description: Internal LDO Input. Mutually exclusive with vdd-supply.
53
54
vdd-supply:
55
description: Core power supply. Mutually exclusive with ldo-in-supply.
56
57
ref-supply:
58
description:
59
External reference voltage. Mutually exclusive with refin-supply.
60
61
refin-supply:
62
description:
63
Internal reference buffer input. Mutually exclusive with ref-supply.
64
65
com-supply:
66
description: Common voltage supply for pseudo-differential analog inputs.
67
68
adi,no-ref-current-limit:
69
$ref: /schemas/types.yaml#/definitions/flag
70
description:
71
When this flag is present, the REF Overvoltage Reduced Current protection
72
is disabled.
73
74
adi,no-ref-high-z:
75
$ref: /schemas/types.yaml#/definitions/flag
76
description:
77
Enable this flag if the ref-supply requires Reference Input High-Z Mode
78
to be disabled for proper operation.
79
80
cnv-gpios:
81
description: The Convert Input (CNV). If omitted, CNV is tied to SPI CS.
82
maxItems: 1
83
84
reset-gpios:
85
description: The Reset Input (RESET). Should be configured GPIO_ACTIVE_LOW.
86
maxItems: 1
87
88
pwms:
89
description: PWM signal connected to the CNV pin.
90
maxItems: 1
91
92
interrupts:
93
minItems: 1
94
items:
95
- description: Signal coming from the BSY_ALT_GP0 pin (ALERT or BUSY).
96
- description: Signal coming from the GP2 pin (ALERT).
97
- description: Signal coming from the GP3 pin (BUSY).
98
99
interrupt-names:
100
minItems: 1
101
items:
102
- const: gp0
103
- const: gp2
104
- const: gp3
105
106
gpio-controller: true
107
108
"#gpio-cells":
109
const: 2
110
description: |
111
The first cell is the GPn number: 0 to 3.
112
The second cell takes standard GPIO flags.
113
114
'#trigger-source-cells':
115
description: |
116
First cell indicates the output signal: 0 = BUSY, 1 = ALERT.
117
Second cell indicates which GPn pin is used: 0, 2 or 3.
118
119
For convenience, macros for these values are available in
120
dt-bindings/iio/adc/adi,ad4695.h.
121
const: 2
122
123
"#address-cells":
124
const: 1
125
126
"#size-cells":
127
const: 0
128
129
patternProperties:
130
"^in(?:[13579]|1[135])-supply$":
131
description:
132
Optional voltage supply for odd numbered channels when they are used as
133
the negative input for a pseudo-differential channel.
134
135
"^channel@[0-9a-f]$":
136
type: object
137
$ref: adc.yaml
138
unevaluatedProperties: false
139
description:
140
Describes each individual channel. In addition the properties defined
141
below, bipolar from adc.yaml is also supported.
142
143
properties:
144
reg:
145
maximum: 15
146
147
common-mode-channel:
148
description:
149
Describes the common mode channel for single channels. 0xFF is REFGND
150
and OxFE is COM. Macros are available for these values in
151
dt-bindings/iio/adc/adi,ad4695.h. Values 1 to 15 correspond to INx
152
inputs. Only odd numbered INx inputs can be used as common mode
153
channels.
154
enum: [1, 3, 5, 7, 9, 11, 13, 15, 0xFE, 0xFF]
155
default: 0xFF
156
157
adi,no-high-z:
158
$ref: /schemas/types.yaml#/definitions/flag
159
description:
160
Enable this flag if the input pin requires the Analog Input High-Z
161
Mode to be disabled for proper operation.
162
163
required:
164
- reg
165
166
allOf:
167
# bipolar mode can't be used with REFGND
168
- if:
169
properties:
170
common-mode-channel:
171
const: 0xFF
172
then:
173
properties:
174
bipolar: false
175
176
required:
177
- compatible
178
- reg
179
- avdd-supply
180
- vio-supply
181
182
allOf:
183
- oneOf:
184
- required:
185
- ldo-in-supply
186
- required:
187
- vdd-supply
188
189
- oneOf:
190
- required:
191
- ref-supply
192
- required:
193
- refin-supply
194
195
# the internal reference buffer always requires high-z mode
196
- if:
197
required:
198
- refin-supply
199
then:
200
properties:
201
adi,no-ref-high-z: false
202
203
# limit channels for 8-channel chips
204
- if:
205
properties:
206
compatible:
207
contains:
208
enum:
209
- adi,ad4697
210
- adi,ad4698
211
then:
212
patternProperties:
213
"^in(?:9|1[135])-supply$": false
214
"^channel@[0-7]$":
215
properties:
216
reg:
217
maximum: 7
218
common-mode-channel:
219
enum: [1, 3, 5, 7, 0xFE, 0xFF]
220
"^channel@[8-9a-f]$": false
221
222
unevaluatedProperties: false
223
224
examples:
225
- |
226
#include <dt-bindings/gpio/gpio.h>
227
#include <dt-bindings/iio/adc/adi,ad4695.h>
228
229
spi {
230
#address-cells = <1>;
231
#size-cells = <0>;
232
233
adc@0 {
234
compatible = "adi,ad4695";
235
reg = <0>;
236
spi-cpol;
237
spi-cpha;
238
spi-max-frequency = <80000000>;
239
avdd-supply = <&power_supply>;
240
ldo-in-supply = <&power_supply>;
241
vio-supply = <&io_supply>;
242
refin-supply = <&supply_5V>;
243
com-supply = <&supply_2V5>;
244
in3-supply = <&supply_2V5>;
245
reset-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
246
247
#address-cells = <1>;
248
#size-cells = <0>;
249
250
/* Pseudo-differential channel between IN0 and REFGND. */
251
channel@0 {
252
reg = <0>;
253
};
254
255
/* Pseudo-differential channel between IN1 and COM. */
256
channel@1 {
257
reg = <1>;
258
common-mode-channel = <AD4695_COMMON_MODE_COM>;
259
bipolar;
260
};
261
262
/* Pseudo-differential channel between IN2 and IN3. */
263
channel@2 {
264
reg = <2>;
265
common-mode-channel = <3>;
266
bipolar;
267
};
268
};
269
};
270
271