← Documents Documentation/iio/ad4000.rst GitHub 원문 ↗

Linux 6.18.37 · IIO

AD4000 driver

AD4000 계열 ADC의 SPI 배선 모드, differential·pseudo-differential IIO 채널과 SPI offload 제약을 설명합니다.

Source pathDocumentation/iio/ad4000.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

ad4000.rst:1-220

AD4000 계열은 SDI와 CNV 연결에 따라 구성 레지스터 접근과 SPI 컨트롤러 요구가 달라집니다. 최대 샘플 속도에는 CS-CNV 배선과 SPI offload가 필요하며 첫 버퍼 샘플은 한 샘플 지연 때문에 폐기해야 합니다.

문서 개요
항목
SourceDocumentation/iio/ad4000.rst
분량220 source lines
지원 장치31
배선 모드4

원문 분량과 핵심 검토 대상을 요약합니다.

핵심 흐름
ADC 유형과 배선 모드 선택Device Tree의 adi,sdi-pin 설정IIO scale 구성필요하면 SPI offload 활성화첫 지연 샘플 폐기 후 데이터 사용

장치 설정과 데이터 경로를 압축합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0-only
2
3 =============
4 AD4000 driver
5 =============
6
7 Device driver for Analog Devices Inc. AD4000 series of ADCs and similar devices.
8
9 Supported devices
10 =================
11
12 * `AD4000 <https://www.analog.com/AD4000>`_
13 * `AD4001 <https://www.analog.com/AD4001>`_
14 * `AD4002 <https://www.analog.com/AD4002>`_
15 * `AD4003 <https://www.analog.com/AD4003>`_
16 * `AD4004 <https://www.analog.com/AD4004>`_
17 * `AD4005 <https://www.analog.com/AD4005>`_
18 * `AD4006 <https://www.analog.com/AD4006>`_
19 * `AD4007 <https://www.analog.com/AD4007>`_
20 * `AD4008 <https://www.analog.com/AD4008>`_
21 * `AD4010 <https://www.analog.com/AD4010>`_
22 * `AD4011 <https://www.analog.com/AD4011>`_
23 * `AD4020 <https://www.analog.com/AD4020>`_
24 * `AD4021 <https://www.analog.com/AD4021>`_
25 * `AD4022 <https://www.analog.com/AD4022>`_
26 * `ADAQ4001 <https://www.analog.com/ADAQ4001>`_
27 * `ADAQ4003 <https://www.analog.com/ADAQ4003>`_
28 * `AD7685 <https://www.analog.com/AD7685>`_
29 * `AD7686 <https://www.analog.com/AD7686>`_
30 * `AD7687 <https://www.analog.com/AD7687>`_
31 * `AD7688 <https://www.analog.com/AD7688>`_
32 * `AD7690 <https://www.analog.com/AD7690>`_
33 * `AD7691 <https://www.analog.com/AD7691>`_
34 * `AD7693 <https://www.analog.com/AD7693>`_
35 * `AD7942 <https://www.analog.com/AD7942>`_
36 * `AD7946 <https://www.analog.com/AD7946>`_
37 * `AD7980 <https://www.analog.com/AD7980>`_
38 * `AD7982 <https://www.analog.com/AD7982>`_
39 * `AD7983 <https://www.analog.com/AD7983>`_
40 * `AD7984 <https://www.analog.com/AD7984>`_
41 * `AD7988-1 <https://www.analog.com/AD7988-1>`_
42 * `AD7988-5 <https://www.analog.com/AD7988-5>`_
43
44 Wiring connections
45 ------------------
46
47 Devices of the AD4000 series can be connected to the SPI host controller in a
48 few different modes.
49
50 CS mode, 3-wire turbo mode
51 ^^^^^^^^^^^^^^^^^^^^^^^^^^
52
53 Datasheet "3-wire" mode is what most resembles standard SPI connection which,
54 for these devices, comprises of connecting the controller CS line to device CNV
55 pin and other SPI lines as usual. This configuration is (misleadingly) called
56 "CS Mode, 3-Wire Turbo Mode" connection in datasheets.
57 NOTE: The datasheet definition of 3-wire mode for the AD4000 series is NOT the
58 same of standard spi-3wire mode.
59 This is the only connection mode that allows configuration register access but
60 it requires the SPI controller to support the ``SPI_MOSI_IDLE_HIGH`` feature.
61
62 Omit the ``adi,sdi-pin`` property in device tree to select this mode.
63
64 ::
65
66 +-------------+
67 + ----------------------------------| SDO |
68 | | |
69 | +-------------------| CS |
70 | v | |
71 | +--------------------+ | HOST |
72 | | CNV | | |
73 +--->| SDI AD4000 SDO |-------->| SDI |
74 | SCK | | |
75 +--------------------+ | |
76 ^ | |
77 +--------------------| SCLK |
78 +-------------+
79
80 CS mode, 3-wire, without busy indicator
81 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82
83 Another wiring configuration supported as "3-wire" mode has the SDI pin
84 hard-wired to digital input/output interface supply (VIO). In this setup, the
85 controller is not required to support ``SPI_MOSI_IDLE_HIGH`` but register access
86 is not possible. This connection mode saves one wire and works with any SPI
87 controller.
88
89 Set the ``adi,sdi-pin`` device tree property to ``"high"`` to select this mode.
90
91 ::
92
93 +-------------+
94 +--------------------| CS |
95 v | |
96 VIO +--------------------+ | HOST |
97 | | CNV | | |
98 +--->| SDI AD4000 SDO |-------->| SDI |
99 | SCK | | |
100 +--------------------+ | |
101 ^ | |
102 +--------------------| SCLK |
103 +-------------+
104
105 Alternatively, a GPIO may be connected to the device CNV pin. This is similar to
106 the previous wiring configuration but saves the use of a CS line.
107
108 ::
109
110 +-------------+
111 +--------------------| GPIO |
112 v | |
113 VIO +--------------------+ | HOST |
114 | | CNV | | |
115 +--->| SDI AD4000 SDO |-------->| SDI |
116 | SCK | | |
117 +--------------------+ | |
118 ^ | |
119 +--------------------| SCLK |
120 +-------------+
121
122 CS mode, 4-wire without busy indicator
123 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124
125 In datasheet "4-wire" mode, the controller CS line is connected to the ADC SDI
126 pin and a GPIO is connected to the ADC CNV pin. This connection mode may better
127 suit scenarios where multiple ADCs can share one CNV trigger.
128
129 Set ``adi,sdi-pin`` to ``"cs"`` to select this mode.
130
131
132 ::
133
134 +-------------+
135 + ----------------------------------| CS |
136 | | |
137 | +-------------------| GPIO |
138 | v | |
139 | +--------------------+ | HOST |
140 | | CNV | | |
141 +--->| SDI AD4000 SDO |-------->| SDI |
142 | SCK | | |
143 +--------------------+ | |
144 ^ | |
145 +--------------------| SCLK |
146 +-------------+
147
148 IIO Device characteristics
149 ==========================
150
151 The AD4000 series driver supports differential and pseudo-differential ADCs.
152
153 The span compression feature available in AD4000 series devices can be
154 enabled/disabled by changing the ``_scale_available`` attribute of the voltage
155 channel. Note that span compression configuration requires writing to AD4000
156 configuration register, which is only possible when the ADC is wired in 3-wire
157 turbo mode, and the SPI controller is ``SPI_MOSI_IDLE_HIGH`` capable. If those
158 conditions are not met, no ``_scale_available`` attribute is provided.
159
160 Besides that, differential and pseudo-differential voltage channels present
161 slightly different sysfs interfaces.
162
163 Pseudo-differential ADCs
164 ------------------------
165
166 Typical voltage channel attributes of a pseudo-differential AD4000 series device:
167
168 +-------------------------------------------+------------------------------------------+
169 | Voltage Channel Attributes | Description |
170 +===========================================+==========================================+
171 | ``in_voltage0_raw`` | Raw ADC output code. |
172 +-------------------------------------------+------------------------------------------+
173 | ``in_voltage0_offset`` | Offset to convert raw value to mV. |
174 +-------------------------------------------+------------------------------------------+
175 | ``in_voltage0_scale`` | Scale factor to convert raw value to mV. |
176 +-------------------------------------------+------------------------------------------+
177 | ``in_voltage0_scale_available`` | Toggles input span compression |
178 +-------------------------------------------+------------------------------------------+
179
180 Differential ADCs
181 -----------------
182
183 Typical voltage channel attributes of a differential AD4000 series device:
184
185 +-------------------------------------------+------------------------------------------+
186 | Voltage Channel Attributes | Description |
187 +===========================================+==========================================+
188 | ``in_voltage0-voltage1_raw`` | Raw ADC output code. |
189 +-------------------------------------------+------------------------------------------+
190 | ``in_voltage0-voltage1_scale`` | Scale factor to convert raw value to mV. |
191 +-------------------------------------------+------------------------------------------+
192 | ``in_voltage0-voltage1_scale_available`` | Toggles input span compression |
193 +-------------------------------------------+------------------------------------------+
194
195 SPI offload support
196 -------------------
197
198 To be able to achieve the maximum sample rate, the driver can be used with SPI
199 offload engines such as the one usually present in `AXI SPI Engine`_, to provide
200 SPI offload support.
201
202 .. _AXI SPI Engine: http://analogdevicesinc.github.io/hdl/projects/pulsar_adc/index.html
203
204 To keep up with SPI offloading transfer speeds, the ADC must be connected either
205 in 3-wire turbo mode or in 3-wire without busy indicator mode and have SPI
206 controller CS line connected to the CNV pin.
207
208 When set for SPI offload support, the IIO device will provide different
209 interfaces.
210
211 * Either ``in_voltage0_sampling_frequency`` or
212 ``in_voltage0-voltage1_sampling_frequency`` file is provided to allow setting
213 the sample rate.
214 * IIO trigger device is not provided (no ``trigger`` directory).
215 * ``timestamp`` channel is not provided.
216
217 Also, because the ADC output has a one sample latency (delay) when the device is
218 wired in "3-wire" mode and only one transfer per sample is done when using SPI
219 offloading, the first data sample in the buffer is not valid because it contains
220 the output of an earlier conversion result.
221

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

AD4000 계열 ADC와 지원 장치

1-43

이 문서는 Analog Devices Inc. AD4000 계열 ADC와 유사 장치의 드라이버를 설명합니다.

지원 목록에는 AD4000~AD4008, AD4010·AD4011, AD4020~AD4022, ADAQ4001·ADAQ4003, AD7685~AD7688, AD7690·AD7691·AD7693, AD7942·AD7946, AD7980·AD7982·AD7983·AD7984, AD7988-1·AD7988-5가 포함됩니다.

AD4000 드라이버 지원 제품군
제품군지원 모델
AD400xAD4000, AD4001, AD4002, AD4003, AD4004, AD4005, AD4006, AD4007, AD4008
AD401xAD4010, AD4011
AD402xAD4020, AD4021, AD4022
ADAQ400xADAQ4001, ADAQ4003
AD768xAD7685, AD7686, AD7687, AD7688
AD769xAD7690, AD7691, AD7693
AD794xAD7942, AD7946
AD798xAD7980, AD7982, AD7983, AD7984, AD7988-1, AD7988-5

지원 모델 31개를 계열별로 묶었습니다.

.. SPDX-License-Identifier: GPL-2.0-only

=============
AD4000 driver
=============

Device driver for Analog Devices Inc. AD4000 series of ADCs and similar devices.

Supported devices
=================

* `AD4000 <https://www.analog.com/AD4000>`_
* `AD4001 <https://www.analog.com/AD4001>`_
* `AD4002 <https://www.analog.com/AD4002>`_
* `AD4003 <https://www.analog.com/AD4003>`_
* `AD4004 <https://www.analog.com/AD4004>`_
* `AD4005 <https://www.analog.com/AD4005>`_
* `AD4006 <https://www.analog.com/AD4006>`_
* `AD4007 <https://www.analog.com/AD4007>`_
* `AD4008 <https://www.analog.com/AD4008>`_
* `AD4010 <https://www.analog.com/AD4010>`_
* `AD4011 <https://www.analog.com/AD4011>`_
* `AD4020 <https://www.analog.com/AD4020>`_
* `AD4021 <https://www.analog.com/AD4021>`_
* `AD4022 <https://www.analog.com/AD4022>`_
* `ADAQ4001 <https://www.analog.com/ADAQ4001>`_
* `ADAQ4003 <https://www.analog.com/ADAQ4003>`_
* `AD7685 <https://www.analog.com/AD7685>`_
* `AD7686 <https://www.analog.com/AD7686>`_
* `AD7687 <https://www.analog.com/AD7687>`_
* `AD7688 <https://www.analog.com/AD7688>`_
* `AD7690 <https://www.analog.com/AD7690>`_
* `AD7691 <https://www.analog.com/AD7691>`_
* `AD7693 <https://www.analog.com/AD7693>`_
* `AD7942 <https://www.analog.com/AD7942>`_
* `AD7946 <https://www.analog.com/AD7946>`_
* `AD7980 <https://www.analog.com/AD7980>`_
* `AD7982 <https://www.analog.com/AD7982>`_
* `AD7983 <https://www.analog.com/AD7983>`_
* `AD7984 <https://www.analog.com/AD7984>`_
* `AD7988-1 <https://www.analog.com/AD7988-1>`_
* `AD7988-5 <https://www.analog.com/AD7988-5>`_

AD4000 SPI 배선 모드

44-147

AD4000 계열 장치는 여러 방식으로 SPI 호스트 컨트롤러에 연결할 수 있습니다.

데이터시트의 `CS Mode, 3-Wire Turbo Mode`는 표준 SPI 연결과 가장 비슷합니다. 컨트롤러 CS를 장치 CNV 핀에 연결하고 다른 SPI 선은 일반적으로 연결합니다. 다만 AD4000 데이터시트의 3-wire는 표준 `spi-3wire` 모드와 같지 않습니다.

이 모드만 구성 레지스터 접근을 허용하지만 SPI 컨트롤러가 `SPI_MOSI_IDLE_HIGH`를 지원해야 합니다. Device Tree에서 `adi,sdi-pin` 속성을 생략하면 이 모드를 선택합니다.

CS mode, 3-wire turbo 배선
호스트 핀AD4000 핀방향·의미
SDOSDI호스트 → ADC 구성 데이터
CSCNV호스트 → ADC 변환 시작
SDISDOADC → 호스트 변환 결과
SCLKSCK호스트 → ADC 직렬 클록

첫 번째 ASCII 그림의 호스트·ADC 신호 관계입니다.

두 번째 `CS mode, 3-wire, without busy indicator`에서는 ADC의 SDI 핀을 디지털 I/O 공급 전압 VIO에 고정합니다. 컨트롤러가 `SPI_MOSI_IDLE_HIGH`를 지원하지 않아도 되지만 구성 레지스터에는 접근할 수 없습니다. 선 하나를 줄이고 모든 SPI 컨트롤러에서 동작합니다.

Device Tree에서 `adi,sdi-pin = "high"`로 이 모드를 선택합니다. 호스트 CS는 CNV, 호스트 SDI는 ADC SDO, 호스트 SCLK는 ADC SCK에 연결하고 ADC SDI는 VIO에 연결합니다.

3-wire without busy indicator 배선
신호 원점연결 대상역할
VIOAD4000 SDI디지털 high 고정
HOST CSAD4000 CNV변환 시작
AD4000 SDOHOST SDI변환 결과
HOST SCLKAD4000 SCK직렬 클록

SDI를 VIO에 고정하는 두 번째 ASCII 구성을 구조화했습니다.

같은 모드에서 CS 선 대신 GPIO를 ADC CNV에 연결할 수도 있습니다. SDI는 계속 VIO에 고정하고, ADC SDO는 호스트 SDI, SCK는 SCLK에 연결합니다. 이전 구성과 유사하지만 전용 CS 선 사용을 줄입니다.

GPIO CNV 변형 배선
신호 원점연결 대상역할
VIOAD4000 SDI디지털 high 고정
HOST GPIOAD4000 CNV변환 시작
AD4000 SDOHOST SDI변환 결과
HOST SCLKAD4000 SCK직렬 클록

세 번째 ASCII 그림에서 CS를 GPIO로 대체합니다.

데이터시트의 `CS mode, 4-wire without busy indicator`에서는 컨트롤러 CS를 ADC SDI에 연결하고 GPIO를 ADC CNV에 연결합니다. 여러 ADC가 하나의 CNV 트리거를 공유하는 구성에 더 적합할 수 있습니다.

Device Tree에서 `adi,sdi-pin = "cs"`로 4-wire 모드를 선택합니다.

CS mode, 4-wire 배선
호스트 핀AD4000 핀역할
CSSDI직렬 인터페이스 선택·입력
GPIOCNV변환 트리거
SDISDO변환 결과 입력
SCLKSCK직렬 클록

네 번째 ASCII 그림의 CS·GPIO 분리 구성을 구조화했습니다.

AD4000 배선 모드 선택
모드`adi,sdi-pin`CNV 제어레지스터 접근요구사항
3-wire turbo생략HOST CS가능`SPI_MOSI_IDLE_HIGH`
3-wire, no busy`"high"`HOST CS불가일반 SPI
3-wire GPIO CNV`"high"`HOST GPIO불가일반 SPI
4-wire, no busy`"cs"`HOST GPIO연결 정의에 따름CS를 ADC SDI에 연결

Device Tree 속성, 레지스터 접근과 컨트롤러 조건을 비교합니다.

Wiring connections
------------------

Devices of the AD4000 series can be connected to the SPI host controller in a
few different modes.

CS mode, 3-wire turbo mode
^^^^^^^^^^^^^^^^^^^^^^^^^^

Datasheet "3-wire" mode is what most resembles standard SPI connection which,
for these devices, comprises of connecting the controller CS line to device CNV
pin and other SPI lines as usual. This configuration is (misleadingly) called
"CS Mode, 3-Wire Turbo Mode" connection in datasheets.
NOTE: The datasheet definition of 3-wire mode for the AD4000 series is NOT the
same of standard spi-3wire mode.
This is the only connection mode that allows configuration register access but
it requires the SPI controller to support the ``SPI_MOSI_IDLE_HIGH`` feature.

Omit the ``adi,sdi-pin`` property in device tree to select this mode.

::

                                         +-------------+
     + ----------------------------------| SDO         |
     |                                   |             |
     |               +-------------------| CS          |
     |               v                   |             |
     |    +--------------------+         |     HOST    |
     |    |        CNV         |         |             |
     +--->| SDI   AD4000   SDO |-------->| SDI         |
          |        SCK         |         |             |
          +--------------------+         |             |
                    ^                    |             |
                    +--------------------| SCLK        |
                                         +-------------+

CS mode, 3-wire, without busy indicator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Another wiring configuration supported as "3-wire" mode has the SDI pin
hard-wired to digital input/output interface supply (VIO). In this setup, the
controller is not required to support ``SPI_MOSI_IDLE_HIGH`` but register access
is not possible. This connection mode saves one wire and works with any SPI
controller.

Set the ``adi,sdi-pin`` device tree property to ``"high"`` to select this mode.

::

                                         +-------------+
                    +--------------------| CS          |
                    v                    |             |
    VIO   +--------------------+         |     HOST    |
     |    |        CNV         |         |             |
     +--->| SDI   AD4000   SDO |-------->| SDI         |
          |        SCK         |         |             |
          +--------------------+         |             |
                    ^                    |             |
                    +--------------------| SCLK        |
                                         +-------------+

Alternatively, a GPIO may be connected to the device CNV pin. This is similar to
the previous wiring configuration but saves the use of a CS line.

::

                                         +-------------+
                    +--------------------| GPIO        |
                    v                    |             |
    VIO   +--------------------+         |     HOST    |
     |    |        CNV         |         |             |
     +--->| SDI   AD4000   SDO |-------->| SDI         |
          |        SCK         |         |             |
          +--------------------+         |             |
                    ^                    |             |
                    +--------------------| SCLK        |
                                         +-------------+

CS mode, 4-wire without busy indicator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

In datasheet "4-wire" mode, the controller CS line is connected to the ADC SDI
pin and a GPIO is connected to the ADC CNV pin. This connection mode may better
suit scenarios where multiple ADCs can share one CNV trigger.

Set ``adi,sdi-pin`` to ``"cs"`` to select this mode.


::

                                         +-------------+
     + ----------------------------------| CS          |
     |                                   |             |
     |               +-------------------| GPIO        |
     |               v                   |             |
     |    +--------------------+         |     HOST    |
     |    |        CNV         |         |             |
     +--->| SDI   AD4000   SDO |-------->| SDI         |
          |        SCK         |         |             |
          +--------------------+         |             |
                    ^                    |             |
                    +--------------------| SCLK        |
                                         +-------------+

IIO 채널과 span compression

148-194

AD4000 계열 드라이버는 differential ADC와 pseudo-differential ADC를 지원합니다.

AD4000 계열의 span compression은 전압 채널의 `_scale_available` 속성을 변경해 켜거나 끕니다. 이 설정은 AD4000 구성 레지스터에 써야 하므로 ADC가 3-wire turbo로 배선되고 SPI 컨트롤러가 `SPI_MOSI_IDLE_HIGH`를 지원해야 합니다. 조건을 만족하지 않으면 `_scale_available` 속성을 제공하지 않습니다.

Differential과 pseudo-differential 전압 채널은 sysfs 인터페이스가 조금 다릅니다.

Pseudo-differential 전압 속성
속성설명
`in_voltage0_raw`원시 ADC 출력 코드
`in_voltage0_offset`원시 값을 mV로 변환할 offset
`in_voltage0_scale`원시 값을 mV로 변환할 scale factor
`in_voltage0_scale_available`입력 span compression 전환

단일 입력 채널의 raw·offset·scale 인터페이스입니다.

Differential 전압 속성
속성설명
`in_voltage0-voltage1_raw`원시 ADC 출력 코드
`in_voltage0-voltage1_scale`원시 값을 mV로 변환할 scale factor
`in_voltage0-voltage1_scale_available`입력 span compression 전환

voltage0-voltage1 쌍의 raw·scale 인터페이스입니다.

채널 유형 차이
채널 유형이름offset 속성span compression
Pseudo-differential`in_voltage0_*`제공조건 충족 시 제공
Differential`in_voltage0-voltage1_*`없음조건 충족 시 제공

두 입력 형식의 sysfs 차이를 요약합니다.

IIO Device characteristics
==========================

The AD4000 series driver supports differential and pseudo-differential ADCs.

The span compression feature available in AD4000 series devices can be
enabled/disabled by changing the ``_scale_available`` attribute of the voltage
channel. Note that span compression configuration requires writing to AD4000
configuration register, which is only possible when the ADC is wired in 3-wire
turbo mode, and the SPI controller is ``SPI_MOSI_IDLE_HIGH`` capable. If those
conditions are not met, no ``_scale_available`` attribute is provided.

Besides that, differential and pseudo-differential voltage channels present
slightly different sysfs interfaces.

Pseudo-differential ADCs
------------------------

Typical voltage channel attributes of a pseudo-differential AD4000 series device:

+-------------------------------------------+------------------------------------------+
| Voltage Channel Attributes                | Description                              |
+===========================================+==========================================+
| ``in_voltage0_raw``                       | Raw ADC output code.                     |
+-------------------------------------------+------------------------------------------+
| ``in_voltage0_offset``                    | Offset to convert raw value to mV.       |
+-------------------------------------------+------------------------------------------+
| ``in_voltage0_scale``                     | Scale factor to convert raw value to mV. |
+-------------------------------------------+------------------------------------------+
| ``in_voltage0_scale_available``           | Toggles input span compression           |
+-------------------------------------------+------------------------------------------+

Differential ADCs
-----------------

Typical voltage channel attributes of a differential AD4000 series device:

+-------------------------------------------+------------------------------------------+
| Voltage Channel Attributes                | Description                              |
+===========================================+==========================================+
| ``in_voltage0-voltage1_raw``              | Raw ADC output code.                     |
+-------------------------------------------+------------------------------------------+
| ``in_voltage0-voltage1_scale``            | Scale factor to convert raw value to mV. |
+-------------------------------------------+------------------------------------------+
| ``in_voltage0-voltage1_scale_available``  | Toggles input span compression           |
+-------------------------------------------+------------------------------------------+

최대 샘플 속도를 위한 SPI offload

195-220

최대 샘플 속도에 도달하려면 드라이버를 `AXI SPI Engine` 등에 있는 SPI offload 엔진과 함께 사용할 수 있습니다.

Offload 전송 속도를 따라가려면 ADC를 3-wire turbo 또는 3-wire without busy indicator로 연결하고, SPI 컨트롤러 CS 선을 CNV 핀에 연결해야 합니다.

SPI offload를 사용하도록 설정하면 IIO 인터페이스가 달라집니다. Pseudo-differential이면 `in_voltage0_sampling_frequency`, differential이면 `in_voltage0-voltage1_sampling_frequency`를 제공해 샘플 속도를 설정합니다.

Offload 모드에서는 IIO trigger 장치를 제공하지 않아 `trigger` 디렉터리가 없고, `timestamp` 채널도 제공하지 않습니다.

3-wire 배선에서 ADC 출력에는 한 샘플의 지연이 있습니다. SPI offload는 샘플당 전송을 한 번만 수행하므로 버퍼의 첫 데이터 샘플은 더 이전 변환 결과를 담아 유효하지 않습니다.

SPI offload IIO 변화
항목Offload 모드
샘플 속도`in_voltage0_sampling_frequency` 또는 differential 이름으로 설정
IIO trigger제공하지 않음, `trigger` 디렉터리 없음
Timestamp`timestamp` 채널 없음
첫 버퍼 샘플3-wire 1-sample latency 때문에 무효

일반 트리거 경로와 다른 사용자 인터페이스입니다.

AD4000 SPI offload
CS-CNV 3-wire 배선 선택SPI offload engine 설정sampling_frequency 지정샘플당 한 번의 고속 전송버퍼 첫 샘플 폐기이후 변환 결과 사용

고속 변환에서 버퍼로 이어지는 데이터 경로입니다.

SPI offload support
-------------------

To be able to achieve the maximum sample rate, the driver can be used with SPI
offload engines such as the one usually present in `AXI SPI Engine`_, to provide
SPI offload support.

.. _AXI SPI Engine: http://analogdevicesinc.github.io/hdl/projects/pulsar_adc/index.html

To keep up with SPI offloading transfer speeds, the ADC must be connected either
in 3-wire turbo mode or in 3-wire without busy indicator mode and have SPI
controller CS line connected to the CNV pin.

When set for SPI offload support, the IIO device will provide different
interfaces.

* Either ``in_voltage0_sampling_frequency`` or
  ``in_voltage0-voltage1_sampling_frequency`` file is provided to allow setting
  the sample rate.
* IIO trigger device is not provided (no ``trigger`` directory).
* ``timestamp`` channel is not provided.

Also, because the ADC output has a one sample latency (delay) when the device is
wired in "3-wire" mode and only one transfer per sample is done when using SPI
offloading, the first data sample in the buffer is not valid because it contains
the output of an earlier conversion result.