Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/sys/contrib/device-tree/Bindings/iio/adc/adi,ad7606.yaml
48406 views
1
# SPDX-License-Identifier: GPL-2.0
2
%YAML 1.2
3
---
4
$id: http://devicetree.org/schemas/iio/adc/adi,ad7606.yaml#
5
$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7
title: Analog Devices AD7606 Simultaneous Sampling ADC
8
9
maintainers:
10
- Michael Hennerich <michael.hennerich@analog.com>
11
12
description: |
13
Analog Devices AD7606 Simultaneous Sampling ADC
14
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7605-4.pdf
15
https://www.analog.com/media/en/technical-documentation/data-sheets/ad7606_7606-6_7606-4.pdf
16
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7606B.pdf
17
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7616.pdf
18
19
properties:
20
compatible:
21
enum:
22
- adi,ad7605-4
23
- adi,ad7606-4
24
- adi,ad7606-6
25
- adi,ad7606-8 # Referred to as AD7606 (without -8) in the datasheet
26
- adi,ad7606b
27
- adi,ad7616
28
29
reg:
30
maxItems: 1
31
32
spi-cpha: true
33
34
spi-cpol: true
35
36
avcc-supply: true
37
38
vdrive-supply:
39
description:
40
Determines the voltage level at which the interface logic pins will
41
operate.
42
43
refin-supply:
44
description:
45
The voltage supply for optional external reference voltage.
46
47
interrupts:
48
description:
49
The BUSY pin falling edge indicates that the conversion is over, and thus
50
new data is available.
51
maxItems: 1
52
53
adi,conversion-start-gpios:
54
description:
55
Must be the device tree identifier of the CONVST pin(s). This logic input
56
is used to initiate conversions on the analog input channels. As the line
57
is active high, it should be marked GPIO_ACTIVE_HIGH.
58
minItems: 1
59
maxItems: 2
60
61
reset-gpios:
62
description:
63
Must be the device tree identifier of the RESET pin. If specified, it will
64
be asserted during driver probe. On the AD7606x, as the line is active
65
high, it should be marked GPIO_ACTIVE_HIGH. On the AD7616, as the line is
66
active low, it should be marked GPIO_ACTIVE_LOW.
67
maxItems: 1
68
69
standby-gpios:
70
description:
71
Must be the device tree identifier of the STBY pin. This pin is used to
72
place the AD7606 into one of two power-down modes, Standby mode or
73
Shutdown mode. As the line is active low, it should be marked
74
GPIO_ACTIVE_LOW.
75
maxItems: 1
76
77
adi,first-data-gpios:
78
description:
79
Must be the device tree identifier of the FRSTDATA pin. The FRSTDATA
80
output indicates when the first channel, V1, is being read back on either
81
the parallel, byte or serial interface. As the line is active high, it
82
should be marked GPIO_ACTIVE_HIGH.
83
maxItems: 1
84
85
adi,range-gpios:
86
description:
87
Must be the device tree identifier of the RANGE pin. The state on this
88
pin determines the input range of the analog input channels. If this pin
89
is tied to a logic high, the analog input range is ±10V for all channels.
90
On the AD760X, if this pin is tied to a logic low, the analog input range
91
is ±5V for all channels. As the line is active high, it should be marked
92
GPIO_ACTIVE_HIGH. On the AD7616, there are 2 pins, and if the 2 pins are
93
tied to a logic high, software mode is enabled, otherwise one of the 3
94
possible range values is selected.
95
minItems: 1
96
maxItems: 2
97
98
adi,oversampling-ratio-gpios:
99
description:
100
Must be the device tree identifier of the over-sampling mode pins. As the
101
line is active high, it should be marked GPIO_ACTIVE_HIGH. On the AD7606X
102
parts that support it, if all 3 pins are tied to a logic high, software
103
mode is enabled.
104
maxItems: 3
105
106
adi,sw-mode:
107
description:
108
Software mode of operation, so far available only for AD7616 and AD7606B.
109
It is enabled when all three oversampling mode pins are connected to high
110
level for the AD7606B, or both the range selection are connected to high
111
level for the AD7616. The device is configured by the corresponding
112
registers. If the adi,oversampling-ratio-gpios property is defined, then
113
the driver will set the oversampling gpios to high. Otherwise, it is
114
assumed that the pins are hardwired to VDD.
115
type: boolean
116
117
required:
118
- compatible
119
- reg
120
- spi-cpha
121
- avcc-supply
122
- vdrive-supply
123
- interrupts
124
- adi,conversion-start-gpios
125
126
allOf:
127
- $ref: /schemas/spi/spi-peripheral-props.yaml#
128
129
- if:
130
properties:
131
compatible:
132
contains:
133
const: adi,ad7616
134
then:
135
properties:
136
adi,first-data-gpios: false
137
standby-gpios: false
138
adi,range-gpios:
139
maxItems: 2
140
else:
141
properties:
142
adi,range-gpios:
143
maxItems: 1
144
145
- if:
146
properties:
147
compatible:
148
contains:
149
enum:
150
- adi,ad7605-4
151
- adi,ad7616
152
then:
153
properties:
154
adi,oversampling-ratio-gpios: false
155
156
- if:
157
properties:
158
compatible:
159
contains:
160
enum:
161
- adi,ad7605-4
162
- adi,ad7606-4
163
- adi,ad7606-6
164
- adi,ad7606-8
165
then:
166
properties:
167
adi,sw-mode: false
168
else:
169
properties:
170
adi,conversion-start-gpios:
171
maxItems: 1
172
173
unevaluatedProperties: false
174
175
examples:
176
- |
177
#include <dt-bindings/gpio/gpio.h>
178
#include <dt-bindings/interrupt-controller/irq.h>
179
spi {
180
#address-cells = <1>;
181
#size-cells = <0>;
182
183
adc@0 {
184
compatible = "adi,ad7606-8";
185
reg = <0>;
186
spi-max-frequency = <1000000>;
187
spi-cpol;
188
spi-cpha;
189
190
avcc-supply = <&adc_vref>;
191
vdrive-supply = <&vdd_supply>;
192
193
interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
194
interrupt-parent = <&gpio>;
195
196
adi,conversion-start-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
197
reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
198
adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
199
adi,oversampling-ratio-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>,
200
<&gpio 23 GPIO_ACTIVE_HIGH>,
201
<&gpio 26 GPIO_ACTIVE_HIGH>;
202
standby-gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
203
};
204
};
205
...
206
207