Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
54396 views
1
# SPDX-License-Identifier: GPL-2.0
2
%YAML 1.2
3
---
4
$id: http://devicetree.org/schemas/iio/adc/adi,ad7768-1.yaml#
5
$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7
title: Analog Devices AD7768-1 ADC family
8
9
maintainers:
10
- Michael Hennerich <michael.hennerich@analog.com>
11
12
description: |
13
Analog Devices AD7768-1 24-Bit Single Channel Low Power sigma-delta ADC family
14
15
https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-1.pdf
16
https://www.analog.com/media/en/technical-documentation/data-sheets/adaq7767-1.pdf
17
https://www.analog.com/media/en/technical-documentation/data-sheets/adaq7768-1.pdf
18
https://www.analog.com/media/en/technical-documentation/data-sheets/adaq7769-1.pdf
19
20
properties:
21
compatible:
22
enum:
23
- adi,ad7768-1
24
- adi,adaq7767-1
25
- adi,adaq7768-1
26
- adi,adaq7769-1
27
28
reg:
29
maxItems: 1
30
31
clocks:
32
maxItems: 1
33
34
clock-names:
35
const: mclk
36
37
trigger-sources:
38
$ref: /schemas/types.yaml#/definitions/phandle-array
39
minItems: 1
40
maxItems: 2
41
description: |
42
A list of phandles referencing trigger source providers. Each entry
43
represents a trigger source for the ADC:
44
45
- First entry specifies the device responsible for driving the
46
synchronization (SYNC_IN) pin, as an alternative to adi,sync-in-gpios.
47
This can be a `gpio-trigger` or another `ad7768-1` device. If the
48
device's own SYNC_OUT pin is internally connected to its SYNC_IN pin,
49
reference the device itself or omit this property.
50
- Second entry optionally defines a GPIO3 pin used as a START signal trigger.
51
52
Use the accompanying trigger source cell to identify the type of each entry.
53
54
interrupts:
55
description:
56
DRDY (Data Ready) pin, which signals conversion results are available.
57
maxItems: 1
58
59
'#address-cells':
60
const: 1
61
62
'#size-cells':
63
const: 0
64
65
vref-supply:
66
description:
67
ADC reference voltage supply
68
69
adi,aaf-gain-bp:
70
description: |
71
Specifies the gain applied by the Analog Anti-Aliasing Filter (AAF)
72
to the ADC input in basis points (one hundredth of a percent).
73
The hardware gain is determined by which input pin(s) the signal goes
74
through into the AAF. The possible connections are:
75
* For the ADAQ7767-1: Input connected to IN1±, IN2± or IN3±.
76
* For the ADAQ7769-1: OUT_PGA pin connected to IN1_AAF+, IN2_AAF+,
77
or IN3_AAF+.
78
enum: [1430, 3640, 10000]
79
default: 10000
80
81
pga-gpios:
82
description:
83
GAIN 0, GAIN1 and GAIN2 pins for gain selection. For devices that have
84
PGA configuration input pins, pga-gpios must be defined.
85
minItems: 3
86
maxItems: 3
87
88
adi,sync-in-gpios:
89
maxItems: 1
90
description:
91
Enables synchronization of multiple devices that require simultaneous
92
sampling. A pulse is always required if the configuration is changed
93
in any way, for example if the filter decimation rate changes.
94
As the line is active low, it should be marked GPIO_ACTIVE_LOW.
95
96
regulators:
97
type: object
98
description:
99
list of regulators provided by this controller.
100
101
properties:
102
vcm-output:
103
$ref: /schemas/regulator/regulator.yaml#
104
type: object
105
unevaluatedProperties: false
106
107
additionalProperties: false
108
109
reset-gpios:
110
maxItems: 1
111
112
spi-cpol: true
113
114
spi-cpha: true
115
116
"#io-channel-cells":
117
const: 1
118
119
"#trigger-source-cells":
120
description: |
121
Cell indicates the trigger output signal: 0 = SYNC_OUT, 1 = GPIO3,
122
2 = DRDY.
123
124
For better readability, macros for these values are available in
125
dt-bindings/iio/adc/adi,ad7768-1.h.
126
const: 1
127
128
gpio-controller: true
129
130
"#gpio-cells":
131
const: 2
132
description: |
133
The first cell is for the GPIO number: 0 to 3.
134
The second cell takes standard GPIO flags.
135
136
required:
137
- compatible
138
- reg
139
- clocks
140
- clock-names
141
- vref-supply
142
- spi-cpol
143
- spi-cpha
144
145
dependencies:
146
adi,sync-in-gpios:
147
not:
148
required:
149
- trigger-sources
150
trigger-sources:
151
not:
152
required:
153
- adi,sync-in-gpios
154
155
patternProperties:
156
"^channel@([0-9]|1[0-5])$":
157
type: object
158
description: |
159
Represents the external channels which are connected to the device.
160
161
properties:
162
reg:
163
maxItems: 1
164
description: |
165
The channel number.
166
167
label:
168
description: |
169
Unique name to identify which channel this is.
170
required:
171
- reg
172
additionalProperties: false
173
174
allOf:
175
- $ref: /schemas/spi/spi-peripheral-props.yaml#
176
177
# AAF Gain property only applies to ADAQ7767-1 and ADAQ7769-1 devices
178
- if:
179
properties:
180
compatible:
181
contains:
182
enum:
183
- adi,adaq7767-1
184
- adi,adaq7769-1
185
then:
186
required:
187
- adi,aaf-gain-bp
188
else:
189
properties:
190
adi,aaf-gain-bp: false
191
192
- if:
193
properties:
194
compatible:
195
contains:
196
enum:
197
- adi,adaq7768-1
198
- adi,adaq7769-1
199
then:
200
required:
201
- pga-gpios
202
else:
203
properties:
204
pga-gpios: false
205
206
unevaluatedProperties: false
207
208
examples:
209
- |
210
#include <dt-bindings/interrupt-controller/irq.h>
211
#include <dt-bindings/gpio/gpio.h>
212
spi {
213
#address-cells = <1>;
214
#size-cells = <0>;
215
216
adc@0 {
217
compatible = "adi,ad7768-1";
218
reg = <0>;
219
spi-max-frequency = <2000000>;
220
spi-cpol;
221
spi-cpha;
222
gpio-controller;
223
#gpio-cells = <2>;
224
vref-supply = <&adc_vref>;
225
interrupts = <25 IRQ_TYPE_EDGE_RISING>;
226
interrupt-parent = <&gpio>;
227
adi,sync-in-gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
228
reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
229
clocks = <&ad7768_mclk>;
230
clock-names = "mclk";
231
232
#address-cells = <1>;
233
#size-cells = <0>;
234
235
channel@0 {
236
reg = <0>;
237
label = "channel_0";
238
};
239
240
regulators {
241
vcm_reg: vcm-output {
242
regulator-name = "ad7768-1-vcm";
243
};
244
};
245
};
246
};
247
...
248
249