1 .. SPDX-License-Identifier: GPL-2.0-only
7 ADC driver for Analog Devices Inc. AD7606 and similar devices. The module name
13 The following chips are supported by this driver:
15 * `AD7605 <https://www.analog.com/en/products/ad7605.html>`_
16 * `AD7606 <https://www.analog.com/en/products/ad7606.html>`_
17 * `AD7606B <https://www.analog.com/en/products/ad7606b.html>`_
18 * `AD7616 <https://www.analog.com/en/products/ad7616.html>`_
26 These ADCs can output data on several SDO lines (1/2/4/8). The driver
27 currently supports only 1 SDO line.
32 There is also a parallel interface, with 16 lines (that can be reduced to 8 in
33 byte mode). The parallel interface is selected by declaring the device as
34 platform in the device tree (with no io-backends node defined, see below).
39 This mode allows to reach the best sample rates, but it requires an external
40 hardware (eg HDL or APU) to handle the low level communication.
41 The backend mode is enabled when through the definition of the "io-backends"
42 property in the device tree.
44 The reference configuration for the current implementation of IIO-backend mode
45 is the HDL reference provided by ADI:
46 https://wiki.analog.com/resources/eval/user-guides/ad7606x-fmc/hdl
48 This implementation embeds an IIO-backend compatible IP (adi-axi-adc) and a PWM
49 connected to the conversion trigger pin.
53 +---+ +----------------------------
56 | D |-------------->| PWM |-------------->| cnvst
59 | 0 | controls +-----------+-----------+ |
60 | 6 |---------->| | |<--| frstdata
61 | | | Backend | Backend |<--| busy
64 | I | requests |+---------+| DMA | |
65 | V |----------->| Buffer ||<---- |<=>| DATA
66 | E | |+---------+| | |
67 | R | +-----------+-----------+ |
68 | |-------------------------------------->| reset/configuration gpios
69 +---+ +-----------------------------
72 Software and hardware modes
73 ---------------------------
75 While all the AD7606/AD7616 series parts can be configured using GPIOs, some of
76 them can be configured using register.
78 The chips that support software mode have more values available for configuring
79 the device, as well as more settings, and allow to control the range and
80 calibration per channel.
82 The following settings are available per channel in software mode:
85 Also, there is a broader choice of oversampling ratios in software mode.
90 The conversion can be triggered by two distinct ways:
92 - A GPIO is connected to the conversion trigger pin, and this GPIO is controlled
93 by the driver directly. In this configuration, the driver sets back the
94 conversion trigger pin to high as soon as it has read all the conversions.
96 - An external source is connected to the conversion trigger pin. In the
97 current implementation, it must be a PWM. In this configuration, the driver
98 does not control directly the conversion trigger pin. Instead, it can
99 control the PWM's frequency. This trigger is enabled only for iio-backend.
104 2 possible reference voltage sources are supported:
106 - Internal reference (2.5V)
107 - External reference (2.5V)
109 The source is determined by the device tree. If ``refin-supply`` is present,
110 then the external reference is used, otherwise the internal reference is used.
115 This family supports oversampling to improve SNR.
116 In software mode, the following ratios are available:
117 1 (oversampling disabled)/2/4/8/16/32/64/128/256.
119 Unimplemented features
120 ----------------------
132 This driver supports IIO triggered buffers, with a "built in" trigger, i.e the
133 trigger is allocated and linked by the driver, and a new conversion is triggered
134 as soon as the samples are transferred, and a timestamp channel is added to make
135 up for the potential jitter induced by the delays in the interrupt handling.
140 When IIO backend is used, the trigger is not needed, and the sample rate is
141 considered as stable. There is no timestamp channel. The communication is
142 delegated to an external logic, called a backend, and the backend's driver
143 handles the buffer. When this mode is enabled, the driver cannot control the
144 conversion pin, because the busy pin is bound to the backend.