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

Linux 6.18.37 · IIO

AD7944 driver

AD7944 계열의 3선식·4선식·체인 SPI 배선, 채널 속성과 offload 버퍼를 설명합니다.

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

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

1. 요약·해설

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

요약·해설

ad7944.rst:1-178

AD7944 드라이버는 세 가지 SPI 배선과 세 가지 기준 전압 경로를 지원합니다. ADC 입력 형식에 따라 IIO 채널 이름이 달라지고, AXI SPI Engine offload에서는 trigger·timestamp 대신 샘플 속도 속성을 사용합니다.

문서 개요
항목
SourceDocumentation/iio/ad7944.rst
분량178 source lines
지원 장치AD7944, AD7985, AD7986
지원 배선3-wire, 4-wire, chain

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

통합 흐름
ADC 형식과 SPI 배선 선택Device Tree 속성 구성기준 전압 선택IIO 채널 이름 확인Triggered buffer 또는 SPI offload 수집

설정에서 데이터 수집까지의 순서를 압축해 보여 줍니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0-only
2
3 =============
4 AD7944 driver
5 =============
6
7 ADC driver for Analog Devices Inc. AD7944 and similar devices. The module name
8 is ``ad7944``.
9
10
11 Supported devices
12 =================
13
14 The following chips are supported by this driver:
15
16 * `AD7944 <https://www.analog.com/AD7944>`_
17 * `AD7985 <https://www.analog.com/AD7985>`_
18 * `AD7986 <https://www.analog.com/AD7986>`_
19
20
21 Supported features
22 ==================
23
24 SPI wiring modes
25 ----------------
26
27 The driver currently supports three of the many possible SPI wiring configurations.
28
29 CS mode, 3-wire, without busy indicator
30 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31
32 .. code-block::
33
34 +-------------+
35 +--------------------| CS |
36 v | |
37 VIO +--------------------+ | HOST |
38 | | CNV | | |
39 +--->| SDI AD7944 SDO |-------->| SDI |
40 | SCK | | |
41 +--------------------+ | |
42 ^ | |
43 +--------------------| SCLK |
44 +-------------+
45
46 To select this mode in the device tree, set the ``adi,spi-mode`` property to
47 ``"single"`` and omit the ``cnv-gpios`` property.
48
49 This is the only wiring configuration supported when using `SPI offload support`_.
50
51 CS mode, 4-wire, without busy indicator
52 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
53
54 .. code-block::
55
56 +-------------+
57 +-----------------------------------| CS |
58 | | |
59 | +--------------------| GPIO |
60 | v | |
61 | +--------------------+ | HOST |
62 | | CNV | | |
63 +--->| SDI AD7944 SDO |-------->| SDI |
64 | SCK | | |
65 +--------------------+ | |
66 ^ | |
67 +--------------------| SCLK |
68 +-------------+
69
70 To select this mode in the device tree, omit the ``adi,spi-mode`` property and
71 provide the ``cnv-gpios`` property.
72
73 Chain mode, without busy indicator
74 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
75
76 .. code-block::
77
78 +-------------+
79 +-------------------------+--------------------| CS |
80 v v | |
81 +--------------------+ +--------------------+ | HOST |
82 | CNV | | CNV | | |
83 +--->| SDI AD7944 SDO |--->| SDI AD7944 SDO |-------->| SDI |
84 | | SCK | | SCK | | |
85 GND +--------------------+ +--------------------+ | |
86 ^ ^ | |
87 +-------------------------+--------------------| SCLK |
88 +-------------+
89
90 To select this mode in the device tree, set the ``adi,spi-mode`` property to
91 ``"chain"``, add the ``spi-cs-high`` flag, add the ``#daisy-chained-devices``
92 property, and omit the ``cnv-gpios`` property.
93
94 Reference voltage
95 -----------------
96
97 All 3 possible reference voltage sources are supported:
98
99 - Internal reference
100 - External 1.2V reference and internal buffer
101 - External reference
102
103 The source is determined by the device tree. If ``ref-supply`` is present, then
104 the external reference is used. If ``refin-supply`` is present, then the internal
105 buffer is used. If neither is present, then the internal reference is used.
106
107 Unimplemented features
108 ----------------------
109
110 - ``BUSY`` indication
111
112
113 Device attributes
114 =================
115
116 There are two types of ADCs in this family, pseudo-differential and fully
117 differential. The channel name is different depending on the type of ADC.
118
119 Pseudo-differential ADCs
120 ------------------------
121
122 AD7944 and AD7985 are pseudo-differential ADCs and have the following attributes:
123
124 +---------------------------------------+--------------------------------------------------------------+
125 | Attribute | Description |
126 +=======================================+==============================================================+
127 | ``in_voltage0_raw`` | Raw ADC voltage value (*IN+* referenced to ground sense). |
128 +---------------------------------------+--------------------------------------------------------------+
129 | ``in_voltage0_scale`` | Scale factor to convert raw value to mV. |
130 +---------------------------------------+--------------------------------------------------------------+
131
132 In "chain" mode, additional chips will appear as additional voltage input
133 channels, e.g. ``in_voltage1_raw``.
134
135 Fully-differential ADCs
136 -----------------------
137
138 AD7986 is a fully-differential ADC and has the following attributes:
139
140 +---------------------------------------+--------------------------------------------------------------+
141 | Attribute | Description |
142 +=======================================+==============================================================+
143 | ``in_voltage0-voltage1_raw`` | Raw ADC voltage value (*IN+* - *IN-*). |
144 +---------------------------------------+--------------------------------------------------------------+
145 | ``in_voltage0-voltage1_scale`` | Scale factor to convert raw value to mV. |
146 +---------------------------------------+--------------------------------------------------------------+
147
148 In "chain" mode, additional chips will appear as additional voltage input
149 channels, e.g. ``in_voltage2-voltage3_raw``.
150
151 SPI offload support
152 ===================
153
154 To be able to achieve the maximum sample rate, the driver can be used with the
155 `AXI SPI Engine`_ to provide SPI offload support.
156
157 .. _AXI SPI Engine: http://analogdevicesinc.github.io/hdl/projects/pulsar_adc/index.html
158
159 When SPI offload is being used, some attributes will be different.
160
161 * ``trigger`` directory is removed.
162 * ``in_voltage0_sampling_frequency`` attribute is added for setting the sample
163 rate.
164 * ``in_voltage0_sampling_frequency_available`` attribute is added for querying
165 the max sample rate.
166 * ``timestamp`` channel is removed.
167 * Buffer data format may be different compared to when offload is not used,
168 e.g. the ``in_voltage0_type`` attribute.
169
170 If the ``turbo-gpios`` property is present in the device tree, the driver will
171 turn on TURBO during buffered reads and turn it off otherwise.
172
173 Device buffers
174 ==============
175
176 This driver supports IIO triggered buffers.
177
178 See :doc:`iio_devbuf` for more information.
179

3. 한국어 전문 번역

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

지원 장치와 3선식 단일 모드

1-50

이 문서는 Analog Devices Inc.의 AD7944와 유사 ADC용 드라이버를 설명합니다. 커널 모듈 이름은 `ad7944`입니다.

지원하는 칩은 AD7944, AD7985, AD7986입니다. 드라이버는 가능한 여러 SPI 배선 구성 가운데 세 가지를 현재 지원합니다.

AD7944 계열 지원 장치
장치입력 형식모듈
AD7944Pseudo-differential`ad7944`
AD7985Pseudo-differential`ad7944`
AD7986Fully-differential`ad7944`

세 장치의 입력 구조는 뒤의 IIO 채널 이름에도 반영됩니다.

첫 번째 구성은 BUSY 표시가 없는 CS 모드 3선식 배선입니다. VIO를 ADC의 SDI에 연결하고, HOST의 CS를 ADC CNV에 연결합니다. ADC SDO는 HOST SDI로 향하며 HOST SCLK는 ADC SCK를 구동합니다.

3선식 단일 모드 배선
출발점신호도착점역할
VIO고정 highADC SDI단일 모드 선택
HOSTCSADC CNV변환 제어
ADCSDOHOST SDI변환 데이터
HOSTSCLKADC SCK직렬 클록

원문의 ASCII 배선도를 신호별 연결과 방향을 보존해 구조화했습니다.

Device Tree에서 이 모드를 선택하려면 `adi,spi-mode`를 `"single"`로 설정하고 `cnv-gpios` 속성은 생략합니다. SPI offload를 사용할 때 지원되는 배선은 이 구성뿐입니다.

3선식 단일 모드 설정
VIO를 ADC SDI에 연결HOST CS를 ADC CNV에 연결`adi,spi-mode = "single"` 설정`cnv-gpios` 생략필요하면 SPI offload 사용

배선과 Device Tree 선택 조건을 함께 나타냅니다.

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

=============
AD7944 driver
=============

ADC driver for Analog Devices Inc. AD7944 and similar devices. The module name
is ``ad7944``.


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

The following chips are supported by this driver:

* `AD7944 <https://www.analog.com/AD7944>`_
* `AD7985 <https://www.analog.com/AD7985>`_
* `AD7986 <https://www.analog.com/AD7986>`_


Supported features
==================

SPI wiring modes
----------------

The driver currently supports three of the many possible SPI wiring configurations.

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

.. code-block::

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

To select this mode in the device tree, set the ``adi,spi-mode`` property to
``"single"`` and omit the ``cnv-gpios`` property.

This is the only wiring configuration supported when using `SPI offload support`_.

4선식·체인 모드와 기준 전압

51-112

두 번째 구성은 BUSY 표시가 없는 CS 모드 4선식 배선입니다. HOST CS는 ADC SDI에 연결하고 별도의 HOST GPIO가 ADC CNV를 구동합니다. ADC SDO는 HOST SDI로 연결하며 HOST SCLK는 ADC SCK를 구동합니다.

4선식 모드 배선
출발점신호도착점역할
HOSTCSADC SDI직렬 인터페이스 선택
HOSTGPIOADC CNV변환 시작
ADCSDOHOST SDI변환 데이터
HOSTSCLKADC SCK직렬 클록

CS와 CNV를 서로 다른 호스트 출력으로 분리한 원문 구조입니다.

Device Tree에서는 `adi,spi-mode` 속성을 생략하고 `cnv-gpios` 속성을 제공해야 4선식 모드가 선택됩니다.

세 번째 구성은 BUSY 표시가 없는 체인 모드입니다. 둘 이상의 ADC가 같은 CNV/CS와 SCLK를 공유합니다. 첫 번째 ADC의 SDI는 GND에 연결하고, 각 ADC의 SDO를 다음 ADC의 SDI로 연결하며, 마지막 ADC의 SDO만 HOST SDI로 연결합니다.

체인 모드 배선
구간연결의미
체인 시작GND → 첫 ADC SDI직렬 데이터 입력의 시작점 고정
ADC 사이앞 ADC SDO → 다음 ADC SDI변환 데이터 데이지 체인
체인 끝마지막 ADC SDO → HOST SDI전체 체인 데이터 수신
공통 제어HOST CS/CNV → 모든 ADC CNV동시 변환·선택
공통 클록HOST SCLK → 모든 ADC SCK동기 직렬 전송

원문의 두 ADC ASCII 연결을 확장 가능한 데이지 체인으로 다시 그렸습니다.

AD7944 체인 데이터 이동
GND가 첫 ADC SDI를 고정모든 ADC가 공통 CNV에서 동시에 변환첫 ADC SDO가 다음 ADC SDI로 이동체인의 각 ADC 결과가 차례로 밀려 나옴마지막 ADC SDO에서 HOST SDI가 전체 결과 수신

두 개 이상의 변환 결과가 호스트까지 직렬로 전달되는 순서입니다.

체인 모드를 선택하려면 `adi,spi-mode`를 `"chain"`으로 설정하고 `spi-cs-high` 플래그와 `#daisy-chained-devices` 속성을 추가하며 `cnv-gpios` 속성은 생략합니다.

세 가지 기준 전압 소스를 모두 지원합니다. 내부 기준 전압, 외부 1.2V 기준 전압과 내부 버퍼의 조합, 외부 기준 전압을 선택할 수 있습니다.

AD7944 계열 기준 전압 선택
Device Tree 설정선택되는 경로
`ref-supply` 있음외부 기준 전압
`refin-supply` 있음외부 1.2V 입력 + 내부 버퍼
둘 다 없음내부 기준 전압

Device Tree 공급 전원 속성으로 reference 경로를 결정합니다.

아직 구현되지 않은 기능은 `BUSY` 표시입니다.

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

.. code-block::

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

To select this mode in the device tree, omit the ``adi,spi-mode`` property and
provide the ``cnv-gpios`` property.

Chain mode, without busy indicator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block::

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

To select this mode in the device tree, set the ``adi,spi-mode`` property to
``"chain"``, add the ``spi-cs-high`` flag, add the ``#daisy-chained-devices``
property, and omit the ``cnv-gpios`` property.

Reference voltage
-----------------

All 3 possible reference voltage sources are supported:

- Internal reference
- External 1.2V reference and internal buffer
- External reference

The source is determined by the device tree. If ``ref-supply`` is present, then
the external reference is used. If ``refin-supply`` is present, then the internal
buffer is used. If neither is present, then the internal reference is used.

Unimplemented features
----------------------

- ``BUSY`` indication

Pseudo-differential·완전 차동 속성

113-150

이 계열에는 pseudo-differential ADC와 fully-differential ADC가 있으며, ADC 형식에 따라 IIO 채널 이름이 달라집니다.

AD7944와 AD7985는 pseudo-differential ADC입니다. `in_voltage0_raw`는 접지 감지를 기준으로 한 IN+의 원시 ADC 전압 값이고, `in_voltage0_scale`은 원시 값을 mV로 변환하는 배율입니다.

Pseudo-differential IIO 속성
속성설명
`in_voltage0_raw`Ground sense 기준 IN+ 원시 ADC 값
`in_voltage0_scale`원시 값을 mV로 변환하는 배율

AD7944와 AD7985에 노출되는 기본 전압 채널입니다.

체인 모드에서는 추가 칩이 추가 전압 입력 채널로 나타납니다. 예를 들어 두 번째 장치는 `in_voltage1_raw`로 노출됩니다.

AD7986은 fully-differential ADC입니다. `in_voltage0-voltage1_raw`는 IN+에서 IN-를 뺀 원시 ADC 전압 값이고, `in_voltage0-voltage1_scale`은 이를 mV로 변환하는 배율입니다.

Fully-differential IIO 속성
속성설명
`in_voltage0-voltage1_raw`IN+ - IN- 차동 원시 ADC 값
`in_voltage0-voltage1_scale`차동 원시 값을 mV로 변환하는 배율

AD7986의 차동 채널 쌍에 노출되는 속성입니다.

AD7986 체인 모드의 추가 칩은 다음 차동 입력 쌍으로 나타납니다. 예를 들어 두 번째 장치는 `in_voltage2-voltage3_raw`로 노출됩니다.

체인 채널 번호 확장
첫 번째 pseudo-differential ADC는 `in_voltage0_raw`다음 pseudo-differential ADC는 `in_voltage1_raw`첫 번째 fully-differential ADC는 voltage0-voltage1 쌍다음 fully-differential ADC는 voltage2-voltage3 쌍

ADC 형식에 따라 추가 장치의 IIO 채널 번호가 확장되는 방식입니다.

Device attributes
=================

There are two types of ADCs in this family, pseudo-differential and fully
differential. The channel name is different depending on the type of ADC.

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

AD7944 and AD7985 are pseudo-differential ADCs and have the following attributes:

+---------------------------------------+--------------------------------------------------------------+
| Attribute                             | Description                                                  |
+=======================================+==============================================================+
| ``in_voltage0_raw``                   | Raw ADC voltage value (*IN+* referenced to ground sense).    |
+---------------------------------------+--------------------------------------------------------------+
| ``in_voltage0_scale``                 | Scale factor to convert raw value to mV.                     |
+---------------------------------------+--------------------------------------------------------------+

In "chain" mode, additional chips will appear as additional voltage input
channels, e.g. ``in_voltage1_raw``.

Fully-differential ADCs
-----------------------

AD7986 is a fully-differential ADC and has the following attributes:

+---------------------------------------+--------------------------------------------------------------+
| Attribute                             | Description                                                  |
+=======================================+==============================================================+
| ``in_voltage0-voltage1_raw``          | Raw ADC voltage value (*IN+* - *IN-*).                       |
+---------------------------------------+--------------------------------------------------------------+
| ``in_voltage0-voltage1_scale``        | Scale factor to convert raw value to mV.                     |
+---------------------------------------+--------------------------------------------------------------+

In "chain" mode, additional chips will appear as additional voltage input
channels, e.g. ``in_voltage2-voltage3_raw``.

SPI offload와 장치 버퍼

151-178

최대 샘플 속도를 달성하려면 드라이버를 `AXI SPI Engine`과 함께 사용해 SPI offload를 구성할 수 있습니다. 원문은 Pulsar ADC HDL 프로젝트의 AXI SPI Engine 문서로 연결됩니다.

SPI offload를 사용하면 일반 경로와 비교해 일부 IIO 인터페이스가 달라집니다. `trigger` 디렉터리와 `timestamp` 채널은 제거됩니다.

샘플 속도를 설정하는 `in_voltage0_sampling_frequency`와 최대 샘플 속도를 조회하는 `in_voltage0_sampling_frequency_available` 속성이 추가됩니다. 버퍼 데이터 형식도 달라질 수 있으므로 `in_voltage0_type` 같은 속성으로 실제 형식을 확인해야 합니다.

SPI offload에서 바뀌는 IIO 항목
항목Offload 동작
`trigger`디렉터리 제거
`in_voltage0_sampling_frequency`추가, sample rate 설정
`in_voltage0_sampling_frequency_available`추가, 최대 sample rate 조회
`timestamp`채널 제거
`in_voltage0_type`일반 경로와 다른 buffer format일 수 있음

일반 triggered-buffer 경로와 offload 경로의 인터페이스 차이입니다.

Device Tree에 `turbo-gpios` 속성이 있으면 드라이버는 버퍼 읽기 중에만 TURBO를 켜고, 그 밖의 시간에는 TURBO를 끕니다.

이 드라이버는 IIO triggered buffer를 지원합니다. 일반적인 IIO 장치 버퍼 설명은 `iio_devbuf` 문서를 참고합니다.

AD7944 버퍼 수집 경로
일반 경로에서는 IIO trigger로 변환 시작Offload 경로에서는 sampling_frequency로 속도 설정`turbo-gpios`가 있으면 buffered read 동안 TURBO 활성화AXI SPI Engine이 고속 전송 수행실제 `in_voltage0_type` 형식으로 버퍼 해석

일반 triggered buffer와 고속 SPI offload에서 달라지는 제어 흐름을 정리합니다.

SPI offload support
===================

To be able to achieve the maximum sample rate, the driver can be used with the
`AXI SPI Engine`_ to provide SPI offload support.

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

When SPI offload is being used, some attributes will be different.

* ``trigger`` directory is removed.
* ``in_voltage0_sampling_frequency`` attribute is added for setting the sample
  rate.
* ``in_voltage0_sampling_frequency_available`` attribute is added for querying
  the max sample rate.
* ``timestamp`` channel is removed.
* Buffer data format may be different compared to when offload is not used,
  e.g. the ``in_voltage0_type`` attribute.

If the ``turbo-gpios`` property is present in the device tree, the driver will
turn on TURBO during buffered reads and turn it off otherwise.

Device buffers
==============

This driver supports IIO triggered buffers.

See :doc:`iio_devbuf` for more information.