Based on kernel version 6.12.4
. Page generated on 2024-12-12 21:02 EST
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | .. SPDX-License-Identifier: GPL-2.0-only ============= AD7380 driver ============= ADC driver for Analog Devices Inc. AD7380 and similar devices. The module name is ``ad7380``. Supported devices ================= The following chips are supported by this driver: * `AD7380 <https://www.analog.com/en/products/ad7380.html>`_ * `AD7381 <https://www.analog.com/en/products/ad7381.html>`_ * `AD7383 <https://www.analog.com/en/products/ad7383.html>`_ * `AD7384 <https://www.analog.com/en/products/ad7384.html>`_ * `AD7386 <https://www.analog.com/en/products/ad7386.html>`_ * `AD7387 <https://www.analog.com/en/products/ad7387.html>`_ * `AD7388 <https://www.analog.com/en/products/ad7388.html>`_ * `AD7380-4 <https://www.analog.com/en/products/ad7380-4.html>`_ * `AD7381-4 <https://www.analog.com/en/products/ad7381-4.html>`_ * `AD7383-4 <https://www.analog.com/en/products/ad7383-4.html>`_ * `AD7384-4 <https://www.analog.com/en/products/ad7384-4.html>`_ * `AD7386-4 <https://www.analog.com/en/products/ad7386-4.html>`_ * `AD7387-4 <https://www.analog.com/en/products/ad7387-4.html>`_ * `AD7388-4 <https://www.analog.com/en/products/ad7388-4.html>`_ Supported features ================== SPI wiring modes ---------------- ad738x ADCs can output data on several SDO lines (1/2/4). The driver currently supports only 1 SDO line. Reference voltage ----------------- ad7380-4 ~~~~~~~~ ad7380-4 supports only an external reference voltage (2.5V to 3.3V). It must be declared in the device tree as ``refin-supply``. All other devices from ad738x family ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All other devices from ad738x support 2 possible reference voltage sources: - Internal reference (2.5V) - External reference (2.5V to 3.3V) The source is determined by the device tree. If ``refio-supply`` is present, then it is used as external reference, else the internal reference is used. Oversampling and resolution boost --------------------------------- This family supports 2 types of oversampling: normal average and rolling average. Only normal average is supported by the driver, as rolling average can be achieved by processing a captured data buffer. The following ratios are available: 1 (oversampling disabled)/2/4/8/16/32. When the on-chip oversampling function is enabled the performance of the ADC can exceed the default resolution. To accommodate the performance boost achievable, it is possible to enable an additional two bits of resolution. Because the resolution boost feature can only be enabled when oversampling is enabled and oversampling is not as useful without the resolution boost, the driver automatically enables the resolution boost if and only if oversampling is enabled. Since the resolution boost feature causes 16-bit chips to now have 18-bit data which means the storagebits has to change from 16 to 32 bits, we use the new ext_scan_type feature to allow changing the scan_type at runtime. Unfortunately libiio does not support it. So when enabling or disabling oversampling, user must restart iiod using the following command: .. code-block:: bash root:~# systemctl restart iiod Channel selection and sequencer (single-end chips only) ------------------------------------------------------- Single-ended chips of this family (ad7386/7/8(-4)) have a 2:1 multiplexer in front of each ADC. They also include additional configuration registers that allow for either manual selection or automatic switching (sequencer mode), of the multiplexer inputs. From an IIO point of view, all inputs are exported, i.e ad7386/7/8 export 4 channels and ad7386-4/7-4/8-4 export 8 channels. Inputs ``AinX0`` of multiplexers correspond to the first half of IIO channels (i.e 0-1 or 0-3) and inputs ``AinX1`` correspond to second half (i.e 2-3 or 4-7). Example for AD7386/7/8 (2 channels parts): .. code-block:: IIO | AD7386/7/8 | +---------------------------- | | _____ ______ | | | | | | voltage0 | AinA0 --|--->| | | | | | | mux |----->| ADCA |--- voltage2 | AinA1 --|--->| | | | | | |_____| |_____ | | | _____ ______ | | | | | | voltage1 | AinB0 --|--->| | | | | | | mux |----->| ADCB |--- voltage3 | AinB1 --|--->| | | | | | |_____| |______| | | | +---------------------------- When enabling sequencer mode, the effective sampling rate is divided by two. Unimplemented features ---------------------- - 2/4 SDO lines - Rolling average oversampling - Power down mode - CRC indication - Alert Device buffers ============== This driver supports IIO triggered buffers. See :doc:`iio_devbuf` for more information. |