Skip to content

Commit efef9aa

Browse files
committed
Documentation: iio: Add AD7768 Documentation
Add driver documentation for AD7768 Signed-off-by: Janani Sunil <janani.sunil@analog.com>
1 parent f5c6edc commit efef9aa

2 files changed

Lines changed: 209 additions & 0 deletions

File tree

Documentation/iio/ad7768.rst

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
.. SPDX-License-Identifier: GPL-2.0-only
2+
3+
=============
4+
AD7768 driver
5+
=============
6+
7+
ADC driver for Analog Devices Inc. AD7768 and AD7768-4 devices. The module name
8+
is ``ad7768``.
9+
10+
Supported devices
11+
=================
12+
13+
The following chips are supported by this driver:
14+
15+
* `AD7768 <https://www.analog.com/en/products/ad7768.html>`_ - 8-channel, 24-bit simultaneous sampling ADC
16+
* `AD7768-4 <https://www.analog.com/en/products/ad7768-4.html>`_ - 4-channel, 24-bit simultaneous sampling ADC
17+
18+
Supported features
19+
==================
20+
21+
Power modes
22+
-----------
23+
24+
The AD7768 family supports three configurable power and performance modes:
25+
26+
* **Low power mode** - Optimized for lowest power consumption
27+
* **Median mode** - Balanced power and performance
28+
* **Fast mode** - Highest performance with maximum sampling rates
29+
30+
The power mode affects the available sampling frequencies and power consumption.
31+
Set via the ``adi,power-mode`` device tree property.
32+
33+
Data output configuration
34+
-------------------------
35+
36+
The devices support flexible serial data output configurations:
37+
38+
AD7768 data lines
39+
^^^^^^^^^^^^^^^^^
40+
41+
* 1 data line (DOUT0) - Standard single-lane output
42+
* 2 data lines (DOUT0, DOUT1) - Dual-lane output for higher throughput
43+
* 8 data lines (DOUT0-DOUT7) - Maximum throughput, one line per channel
44+
45+
AD7768-4 data lines
46+
^^^^^^^^^^^^^^^^^^^
47+
48+
* 1 data line (DOUT0) - Standard single-lane output
49+
* 4 data lines (DOUT0-DOUT3) - Maximum throughput, one line per channel
50+
51+
The number of data lines is configured via the ``adi,data-lines-number``
52+
device tree property.
53+
54+
Channel configuration
55+
---------------------
56+
57+
Each channel can be individually configured with:
58+
59+
Channel modes
60+
^^^^^^^^^^^^^
61+
62+
* **Mode A** - First set of filter and decimation settings
63+
* **Mode B** - Second set of filter and decimation settings
64+
65+
Each channel can be assigned to either Mode A or Mode B via the
66+
``adi,ch-mode`` device tree property.
67+
68+
Precharge and reference buffers
69+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
70+
71+
Per-channel buffer control for optimal signal integrity:
72+
73+
* Positive input precharge buffer (``adi,prebuf-pos-en``)
74+
* Negative input precharge buffer (``adi,prebuf-neg-en``)
75+
* Positive reference buffer (``adi,refbuf-pos-en``)
76+
* Negative reference buffer (``adi,refbuf-neg-en``)
77+
78+
Common mode voltage
79+
-------------------
80+
81+
Configurable common mode output voltage levels:
82+
83+
* (AVDD - AVSS) / 2V
84+
* 1.65V
85+
* 2.5V
86+
* 2.14V
87+
88+
Set via the ``adi,common-mode-output-v`` device tree property.
89+
The common mode buffer can be powered down using ``adi,vcm-power-down``.
90+
91+
Filter types
92+
------------
93+
94+
Two digital filter types are available:
95+
96+
* **Wideband** - Optimized for wide bandwidth applications
97+
* **Sinc5** - Fifth-order sinc filter for high rejection of out-of-band noise
98+
99+
IIO backend support
100+
-------------------
101+
102+
The driver integrates with IIO backends (e.g., AXI ADC) for high-speed data
103+
capture and DMA operations. Features include:
104+
105+
* Automatic channel enable/disable based on scan mask
106+
* CRC on data interface. CRC replaces the header every 4th output sample.
107+
* High-throughput buffered data acquisition
108+
109+
GPIO controller
110+
---------------
111+
112+
The AD7768 includes a 5-pin GPIO controller for auxiliary digital I/O
113+
operations. The GPIO pins can be configured as inputs or outputs.
114+
115+
Device attributes
116+
=================
117+
118+
The following IIO attributes are available for each enabled channel:
119+
120+
Channel data
121+
------------
122+
123+
+---------------------------------------+--------------------------------------------------------------+
124+
| Attribute | Description |
125+
+=======================================+==============================================================+
126+
| ``in_voltage<N>_raw`` | Raw ADC voltage value for channel N. |
127+
+---------------------------------------+--------------------------------------------------------------+
128+
| ``in_voltage<N>_scale`` | Scale factor to convert raw value to mV. |
129+
+---------------------------------------+--------------------------------------------------------------+
130+
131+
Sampling frequency
132+
------------------
133+
134+
+---------------------------------------+--------------------------------------------------------------+
135+
| Attribute | Description |
136+
+=======================================+==============================================================+
137+
| ``in_voltage<N>_sampling_frequency`` | Current sampling frequency in Hz for channel N. |
138+
+---------------------------------------+--------------------------------------------------------------+
139+
140+
Filter configuration
141+
---------------------
142+
143+
+---------------------------------------+--------------------------------------------------------------+
144+
| Attribute | Description |
145+
+=======================================+==============================================================+
146+
| ``in_voltage<N>_filter_type`` | Current filter type for channel N: "wideband" or "sinc5". |
147+
+---------------------------------------+--------------------------------------------------------------+
148+
| ``in_voltage<N>_filter_type_ | Available filter types for channel N: "wideband sinc5". |
149+
| available`` | |
150+
+---------------------------------------+--------------------------------------------------------------+
151+
152+
Per-channel calibration
153+
-----------------------
154+
155+
+---------------------------------------+--------------------------------------------------------------+
156+
| Attribute | Description |
157+
+=======================================+==============================================================+
158+
| ``in_voltage<N>_calibbias`` | Channel offset calibration value |
159+
+---------------------------------------+--------------------------------------------------------------+
160+
| ``in_voltage<N>_calibscale`` | Channel gain calibration value |
161+
+---------------------------------------+--------------------------------------------------------------+
162+
| ``in_voltage<N>_phase`` | Channel phase calibration value. |
163+
+---------------------------------------+--------------------------------------------------------------+
164+
165+
Device buffers
166+
==============
167+
168+
This driver supports IIO buffered data acquisition through IIO backends.
169+
When used with compatible backends like the AXI ADC, it provides:
170+
171+
* High-speed simultaneous sampling across all enabled channels
172+
* Hardware-triggered data capture
173+
* DMA-based data transfer for minimal CPU overhead
174+
* CRC error detection and correction
175+
176+
See :doc:`iio_devbuf` for more information about IIO device buffers.
177+
178+
Example usage
179+
=============
180+
181+
.. code-block:: bash
182+
183+
# Read current sampling frequency for channel 0
184+
cat /sys/bus/iio/devices/iio:device0/in_voltage0_sampling_frequency
185+
186+
# Update sampling frequency for channel 0
187+
echo 8000 > /sys/bus/iio/devices/iio:device0/in_voltage0_sampling_frequency
188+
189+
# Read current filter type for channel 0
190+
cat /sys/bus/iio/devices/iio:device0/in_voltage0_filter_type
191+
192+
# List available filter types for channel 0
193+
cat /sys/bus/iio/devices/iio:device0/in_voltage0_filter_type_available
194+
195+
# Update filter type for channel 0 to wideband
196+
echo wideband > /sys/bus/iio/devices/iio:device0/in_voltage0_filter_type
197+
198+
# Read calibration scale for channel 0
199+
cat /sys/bus/iio/devices/iio:device0/in_voltage0_calibscale
200+
201+
# Read phase calibration for channel 0
202+
cat /sys/bus/iio/devices/iio:device0/in_voltage0_phase
203+
204+
205+
Unimplemented features
206+
======================
207+
208+
* CRC message every 16 samples (CRC_SEL configuration) - currently only supports CRC every 4 samples

Documentation/iio/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Industrial I/O Kernel Drivers
2525
ad4695
2626
ad7191
2727
ad7380
28+
ad7768
2829
ad7606
2930
ad7625
3031
ad7944

0 commit comments

Comments
 (0)