요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0-only
=============
AD7606 driver
=============
ADC driver for Analog Devices Inc. AD7606 and similar devices. The module name
is ``ad7606``.
Supported devices
=================
The following chips are supported by this driver:
* `AD7605 <https://www.analog.com/en/products/ad7605.html>`_
* `AD7606 <https://www.analog.com/en/products/ad7606.html>`_
* `AD7606B <https://www.analog.com/en/products/ad7606b.html>`_
* `AD7616 <https://www.analog.com/en/products/ad7616.html>`_
Supported features
==================
SPI wiring modes
----------------
These ADCs can output data on several SDO lines (1/2/4/8). The driver
currently supports only 1 SDO line.
SPI offload wiring
------------------
When used with a SPI offload, the supported wiring configuration is:
.. code-block::
+-------------+ +-------------+
| BUSY |-------->| TRIGGER |
| CS |<--------| CS |
| | | |
| ADC | | SPI |
| | | |
| SDI |<--------| SDO |
| DOUTA |-------->| SDI |
| SCLK |<--------| SCLK |
| | | |
| | +-------------+
| CONVST |<--------| PWM |
+-------------+ +-------------+
In this case, the ``pwms`` property is required.
The ``#trigger-source-cells = <1>`` property is also required to connect back
to the SPI offload. The SPI offload will have ``trigger-sources`` property
with a cell to indicate the busy signal:
``<&ad7606 AD4695_TRIGGER_EVENT_BUSY>``.
.. seealso:: `SPI offload support`_
Parallel wiring mode
--------------------
There is also a parallel interface, with 16 lines (that can be reduced to 8 in
byte mode). The parallel interface is selected by declaring the device as
platform in the device tree (with no io-backends node defined, see below).
IIO-backend mode
----------------
This mode allows to reach the best sample rates, but it requires an external
hardware (eg HDL or APU) to handle the low level communication.
The backend mode is enabled when through the definition of the "io-backends"
property in the device tree.
The reference configuration for the current implementation of IIO-backend mode
is the HDL reference provided by ADI:
https://wiki.analog.com/resources/eval/user-guides/ad7606x-fmc/hdl
This implementation embeds an IIO-backend compatible IP (adi-axi-adc) and a PWM
connected to the conversion trigger pin.
.. code-block::
+---+ +----------------------------
| | +-------+ |AD76xx
| A | controls | | |
| D |-------------->| PWM |-------------->| cnvst
| 7 | | | |
| 6 | +-------+ |
| 0 | controls +-----------+-----------+ |
| 6 |---------->| | |<--| frstdata
| | | Backend | Backend |<--| busy
| D | | Driver | | |
| R | | | |-->| clk
| I | requests |+---------+| DMA | |
| V |----------->| Buffer ||<---- |<=>| DATA
| E | |+---------+| | |
| R | +-----------+-----------+ |
| |-------------------------------------->| reset/configuration gpios
+---+ +-----------------------------
Software and hardware modes
---------------------------
While all the AD7606/AD7616 series parts can be configured using GPIOs, some of
them can be configured using register.
The chips that support software mode have more values available for configuring
the device, as well as more settings, and allow to control the range and
calibration per channel.
The following settings are available per channel in software mode:
- Scale
Also, there is a broader choice of oversampling ratios in software mode.
Conversion triggering
---------------------
The conversion can be triggered by two distinct ways:
- A GPIO is connected to the conversion trigger pin, and this GPIO is controlled
by the driver directly. In this configuration, the driver sets back the
conversion trigger pin to high as soon as it has read all the conversions.
- An external source is connected to the conversion trigger pin. In the
current implementation, it must be a PWM. In this configuration, the driver
does not control directly the conversion trigger pin. Instead, it can
control the PWM's frequency. This trigger is enabled only for iio-backend.
Reference voltage
-----------------
2 possible reference voltage sources are supported:
- Internal reference (2.5V)
- External reference (2.5V)
The source is determined by the device tree. If ``refin-supply`` is present,
then the external reference is used, otherwise the internal reference is used.
Oversampling
------------
This family supports oversampling to improve SNR.
In software mode, the following ratios are available:
1 (oversampling disabled)/2/4/8/16/32/64/128/256.
Unimplemented features
----------------------
- 2/4/8 SDO lines
- CRC indication
- Calibration
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: https://analogdevicesinc.github.io/hdl/library/spi_engine/index.html
When SPI offload is being used, some attributes will be different.
* ``trigger`` directory is removed.
* ``sampling_frequency`` attribute is added for setting the 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.
Device buffers
==============
IIO triggered buffer
--------------------
This driver supports IIO triggered buffers, with a "built in" trigger, i.e the
trigger is allocated and linked by the driver, and a new conversion is triggered
as soon as the samples are transferred, and a timestamp channel is added to make
up for the potential jitter induced by the delays in the interrupt handling.
IIO backend buffer
------------------
When IIO backend is used, the trigger is not needed, and the sample rate is
considered as stable. There is no timestamp channel. The communication is
delegated to an external logic, called a backend, and the backend's driver
handles the buffer. When this mode is enabled, the driver cannot control the
conversion pin, because the busy pin is bound to the backend.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
지원 장치와 SPI·parallel 배선
1-64이 문서는 Analog Devices Inc. AD7606과 유사 장치의 ADC 드라이버를 설명합니다. 모듈 이름은 `ad7606`이고 지원 칩은 AD7605, AD7606, AD7606B, AD7616입니다.
이 ADC들은 1·2·4·8개의 SDO 선으로 데이터를 출력할 수 있지만 현재 드라이버는 한 선만 지원합니다.
SPI offload 배선에서는 ADC BUSY를 SPI TRIGGER에, CS를 CS에 연결합니다. ADC SDI는 SPI SDO, DOUTA는 SPI SDI, SCLK는 SCLK에 연결하며 CONVST는 PWM이 구동합니다.
원문의 ADC·SPI ASCII 그림을 동일한 신호 방향으로 재구성합니다.
이 구성에는 `pwms` 속성이 필수입니다. SPI offload로 되돌아갈 trigger 연결에는 `#trigger-source-cells = <1>`이 필요하고, offload의 `trigger-sources`는 busy event 셀을 지정합니다. 원문 예시는 `<&ad7606 AD4695_TRIGGER_EVENT_BUSY>`입니다.
Parallel 인터페이스는 16개 선을 사용하며 byte 모드에서는 8개로 줄일 수 있습니다. Device Tree에서 장치를 platform 장치로 선언하고 `io-backends` 노드를 정의하지 않으면 parallel 인터페이스를 선택합니다.
직렬 offload와 parallel 모드의 선택 조건입니다.
.. SPDX-License-Identifier: GPL-2.0-only
=============
AD7606 driver
=============
ADC driver for Analog Devices Inc. AD7606 and similar devices. The module name
is ``ad7606``.
Supported devices
=================
The following chips are supported by this driver:
* `AD7605 <https://www.analog.com/en/products/ad7605.html>`_
* `AD7606 <https://www.analog.com/en/products/ad7606.html>`_
* `AD7606B <https://www.analog.com/en/products/ad7606b.html>`_
* `AD7616 <https://www.analog.com/en/products/ad7616.html>`_
Supported features
==================
SPI wiring modes
----------------
These ADCs can output data on several SDO lines (1/2/4/8). The driver
currently supports only 1 SDO line.
SPI offload wiring
------------------
When used with a SPI offload, the supported wiring configuration is:
.. code-block::
+-------------+ +-------------+
| BUSY |-------->| TRIGGER |
| CS |<--------| CS |
| | | |
| ADC | | SPI |
| | | |
| SDI |<--------| SDO |
| DOUTA |-------->| SDI |
| SCLK |<--------| SCLK |
| | | |
| | +-------------+
| CONVST |<--------| PWM |
+-------------+ +-------------+
In this case, the ``pwms`` property is required.
The ``#trigger-source-cells = <1>`` property is also required to connect back
to the SPI offload. The SPI offload will have ``trigger-sources`` property
with a cell to indicate the busy signal:
``<&ad7606 AD4695_TRIGGER_EVENT_BUSY>``.
.. seealso:: `SPI offload support`_
Parallel wiring mode
--------------------
There is also a parallel interface, with 16 lines (that can be reduced to 8 in
byte mode). The parallel interface is selected by declaring the device as
platform in the device tree (with no io-backends node defined, see below).
IIO-backend 고속 데이터 경로
65-100IIO-backend 모드는 최상의 샘플률에 도달할 수 있지만 HDL 또는 APU 같은 외부 하드웨어가 저수준 통신을 처리해야 합니다. Device Tree에 `io-backends` 속성을 정의하면 활성화됩니다.
현재 구현의 기준 구성은 ADI가 제공하는 HDL reference입니다. 이 구현은 IIO-backend 호환 `adi-axi-adc` IP와 conversion trigger 핀에 연결된 PWM을 포함합니다.
원문의 큰 ASCII 블록을 같은 제어·데이터 관계로 재구성합니다.
드라이버 제어와 외부 IP 데이터 경로를 분리합니다.
IIO-backend mode
----------------
This mode allows to reach the best sample rates, but it requires an external
hardware (eg HDL or APU) to handle the low level communication.
The backend mode is enabled when through the definition of the "io-backends"
property in the device tree.
The reference configuration for the current implementation of IIO-backend mode
is the HDL reference provided by ADI:
https://wiki.analog.com/resources/eval/user-guides/ad7606x-fmc/hdl
This implementation embeds an IIO-backend compatible IP (adi-axi-adc) and a PWM
connected to the conversion trigger pin.
.. code-block::
+---+ +----------------------------
| | +-------+ |AD76xx
| A | controls | | |
| D |-------------->| PWM |-------------->| cnvst
| 7 | | | |
| 6 | +-------+ |
| 0 | controls +-----------+-----------+ |
| 6 |---------->| | |<--| frstdata
| | | Backend | Backend |<--| busy
| D | | Driver | | |
| R | | | |-->| clk
| I | requests |+---------+| DMA | |
| V |----------->| Buffer ||<---- |<=>| DATA
| E | |+---------+| | |
| R | +-----------+-----------+ |
| |-------------------------------------->| reset/configuration gpios
+---+ +-----------------------------
Software mode, conversion trigger와 reference
101-154AD7606·AD7616 계열은 모두 GPIO로 설정할 수 있고 일부는 레지스터를 사용하는 software mode도 지원합니다.
Software mode 지원 칩은 더 많은 설정값과 기능을 제공하며 채널별 range와 calibration을 제어할 수 있습니다. 현재 문서가 나열하는 채널별 설정은 scale이며, oversampling ratio 선택 폭도 더 넓습니다.
변환은 두 방식으로 시작할 수 있습니다. 첫째, conversion trigger 핀에 GPIO를 연결해 드라이버가 직접 제어합니다. 드라이버는 모든 변환 결과를 읽은 즉시 trigger 핀을 다시 high로 설정합니다.
둘째, 외부 source를 conversion trigger 핀에 연결합니다. 현재 구현에서는 PWM이어야 하며 드라이버는 핀을 직접 제어하지 않고 PWM frequency를 조절합니다. 이 방식은 IIO-backend에서만 활성화됩니다.
직접 GPIO와 외부 PWM의 책임을 비교합니다.
Reference는 내부 2.5V와 외부 2.5V를 지원합니다. Device Tree에 `refin-supply`가 있으면 외부 reference를 쓰고, 없으면 내부 reference를 사용합니다.
Device Tree 속성 유무가 전압원을 정합니다.
이 계열은 SNR 향상을 위해 oversampling을 지원합니다. Software mode에서는 1(비활성), 2, 4, 8, 16, 32, 64, 128, 256을 사용할 수 있습니다.
지원 OSR 범위입니다.
아직 구현되지 않은 기능은 2·4·8 SDO 선, CRC indication과 calibration입니다.
현재 드라이버가 제공하지 않는 항목입니다.
Software and hardware modes
---------------------------
While all the AD7606/AD7616 series parts can be configured using GPIOs, some of
them can be configured using register.
The chips that support software mode have more values available for configuring
the device, as well as more settings, and allow to control the range and
calibration per channel.
The following settings are available per channel in software mode:
- Scale
Also, there is a broader choice of oversampling ratios in software mode.
Conversion triggering
---------------------
The conversion can be triggered by two distinct ways:
- A GPIO is connected to the conversion trigger pin, and this GPIO is controlled
by the driver directly. In this configuration, the driver sets back the
conversion trigger pin to high as soon as it has read all the conversions.
- An external source is connected to the conversion trigger pin. In the
current implementation, it must be a PWM. In this configuration, the driver
does not control directly the conversion trigger pin. Instead, it can
control the PWM's frequency. This trigger is enabled only for iio-backend.
Reference voltage
-----------------
2 possible reference voltage sources are supported:
- Internal reference (2.5V)
- External reference (2.5V)
The source is determined by the device tree. If ``refin-supply`` is present,
then the external reference is used, otherwise the internal reference is used.
Oversampling
------------
This family supports oversampling to improve SNR.
In software mode, the following ratios are available:
1 (oversampling disabled)/2/4/8/16/32/64/128/256.
Unimplemented features
----------------------
- 2/4/8 SDO lines
- CRC indication
- Calibration
SPI offload와 두 버퍼 모델
155-189최대 샘플 속도를 위해 드라이버는 `AXI SPI Engine`과 함께 SPI offload를 제공할 수 있습니다.
Offload에서는 `trigger` 디렉터리와 `timestamp` 채널을 제거하고 샘플률 설정용 `sampling_frequency`를 추가합니다. 버퍼 형식도 달라질 수 있으며 예로 `in_voltage0_type`이 있습니다.
일반 trigger 경로와 달라지는 항목입니다.
일반 IIO triggered buffer에서는 드라이버가 built-in trigger를 할당하고 연결합니다. 샘플 전송이 끝나는 즉시 새 변환을 시작하며 interrupt 처리 지연의 jitter를 보완하기 위해 timestamp 채널을 추가합니다.
IIO-backend buffer에서는 trigger가 필요 없고 sample rate를 안정적이라고 간주하므로 timestamp 채널도 없습니다. 외부 backend 로직에 통신을 위임하고 backend 드라이버가 버퍼를 처리합니다.
IIO-backend를 활성화하면 BUSY 핀이 backend에 묶여 있으므로 AD7606 드라이버가 conversion 핀을 제어할 수 없습니다.
Trigger·timestamp·통신 소유권을 비교합니다.
하드웨어 경로에 따라 변환과 버퍼 책임을 나눕니다.
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: https://analogdevicesinc.github.io/hdl/library/spi_engine/index.html
When SPI offload is being used, some attributes will be different.
* ``trigger`` directory is removed.
* ``sampling_frequency`` attribute is added for setting the 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.
Device buffers
==============
IIO triggered buffer
--------------------
This driver supports IIO triggered buffers, with a "built in" trigger, i.e the
trigger is allocated and linked by the driver, and a new conversion is triggered
as soon as the samples are transferred, and a timestamp channel is added to make
up for the potential jitter induced by the delays in the interrupt handling.
IIO backend buffer
------------------
When IIO backend is used, the trigger is not needed, and the sample rate is
considered as stable. There is no timestamp channel. The communication is
delegated to an external logic, called a backend, and the backend's driver
handles the buffer. When this mode is enabled, the driver cannot control the
conversion pin, because the busy pin is bound to the backend.
요약·해설
ad7606.rst:1-189AD7606 드라이버는 직접 SPI, parallel, SPI offload와 IIO-backend 경로를 지원합니다. 일반 경로는 드라이버 built-in trigger와 timestamp를 쓰고, backend 경로는 외부 PWM·IP·DMA가 안정된 rate로 버퍼를 소유합니다.
원문 분량과 핵심 검토 대상을 요약합니다.
설정과 데이터 수집 순서를 압축합니다.