요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. 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`_.
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
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 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.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
지원 장치와 3선식 단일 모드
1-50이 문서는 Analog Devices Inc.의 AD7944와 유사 ADC용 드라이버를 설명합니다. 커널 모듈 이름은 `ad7944`입니다.
지원하는 칩은 AD7944, AD7985, AD7986입니다. 드라이버는 가능한 여러 SPI 배선 구성 가운데 세 가지를 현재 지원합니다.
세 장치의 입력 구조는 뒤의 IIO 채널 이름에도 반영됩니다.
첫 번째 구성은 BUSY 표시가 없는 CS 모드 3선식 배선입니다. VIO를 ADC의 SDI에 연결하고, HOST의 CS를 ADC CNV에 연결합니다. ADC SDO는 HOST SDI로 향하며 HOST SCLK는 ADC SCK를 구동합니다.
원문의 ASCII 배선도를 신호별 연결과 방향을 보존해 구조화했습니다.
Device Tree에서 이 모드를 선택하려면 `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를 구동합니다.
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로 연결합니다.
원문의 두 ADC ASCII 연결을 확장 가능한 데이지 체인으로 다시 그렸습니다.
두 개 이상의 변환 결과가 호스트까지 직렬로 전달되는 순서입니다.
체인 모드를 선택하려면 `adi,spi-mode`를 `"chain"`으로 설정하고 `spi-cs-high` 플래그와 `#daisy-chained-devices` 속성을 추가하며 `cnv-gpios` 속성은 생략합니다.
세 가지 기준 전압 소스를 모두 지원합니다. 내부 기준 전압, 외부 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로 변환하는 배율입니다.
AD7944와 AD7985에 노출되는 기본 전압 채널입니다.
체인 모드에서는 추가 칩이 추가 전압 입력 채널로 나타납니다. 예를 들어 두 번째 장치는 `in_voltage1_raw`로 노출됩니다.
AD7986은 fully-differential ADC입니다. `in_voltage0-voltage1_raw`는 IN+에서 IN-를 뺀 원시 ADC 전압 값이고, `in_voltage0-voltage1_scale`은 이를 mV로 변환하는 배율입니다.
AD7986의 차동 채널 쌍에 노출되는 속성입니다.
AD7986 체인 모드의 추가 칩은 다음 차동 입력 쌍으로 나타납니다. 예를 들어 두 번째 장치는 `in_voltage2-voltage3_raw`로 노출됩니다.
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` 같은 속성으로 실제 형식을 확인해야 합니다.
일반 triggered-buffer 경로와 offload 경로의 인터페이스 차이입니다.
Device Tree에 `turbo-gpios` 속성이 있으면 드라이버는 버퍼 읽기 중에만 TURBO를 켜고, 그 밖의 시간에는 TURBO를 끕니다.
이 드라이버는 IIO triggered buffer를 지원합니다. 일반적인 IIO 장치 버퍼 설명은 `iio_devbuf` 문서를 참고합니다.
일반 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.
요약·해설
ad7944.rst:1-178AD7944 드라이버는 세 가지 SPI 배선과 세 가지 기준 전압 경로를 지원합니다. ADC 입력 형식에 따라 IIO 채널 이름이 달라지고, AXI SPI Engine offload에서는 trigger·timestamp 대신 샘플 속도 속성을 사용합니다.
원문 분량과 핵심 검토 지점을 요약합니다.
설정에서 데이터 수집까지의 순서를 압축해 보여 줍니다.