This is an old revision of the document!
This driver is used in conjunction with the AXI ADC HDL Linux Driver
This driver supports the
The AD9208 is a dual, 14-bit, 3 GSPS analog-to-digital converter (ADC). The device has an on-chip buffer and a sample-and-hold circuit designed for low power, small size, and ease of use. This product is designed to support communications applications capable of direct sampling wide bandwidth analog signals of up to 5 GHz. The −3 dB bandwidth of the ADC input is 9 GHz. The AD9208 is optimized for wide input bandwidth, high sampling rate, excellent linearity, and low power in a small package.
The dual ADC cores feature a multistage, differential pipelined architecture with integrated output error correction logic. Each ADC features wide bandwidth inputs supporting a variety of user-selectable input ranges. An integrated voltage reference eases design considerations. The analog input and clock signals are differential inputs. The ADC data outputs are internally connected to four digital downconverters (DDCs) through a crossbar mux. Each DDC consists of up to five cascaded signal processing stages: a 48-bit frequency translator (numerically controlled oscillator (NCO)), and up to four half-band decimation filters. The NCO has the option to select preset bands over the general-purpose input/output (GPIO) pins, which enables the selection of up to three bands. Operation of the AD9208 between the DDC modes is selectable via SPI-programmable profiles. In addition to the DDC blocks, the AD9208 has several functions that simplify the automatic gain control (AGC) function in a communications receiver. The programmable threshold detector allows monitoring of the incoming signal power using the fast detect control bits in Register 0x0245 of the ADC. If the input signal level exceeds the programmable threshold, the fast detect indicator goes high. Because this threshold indicator has low latency, the user can quickly turn down the system gain to avoid an overrange condition at the ADC input. In addition to the fast detect outputs, the AD9208 also offers signal monitoring capability. The signal monitoring block provides additional information about the signal being digitized by the ADC. The user can configure the Subclasss 1 JESD204B-based high speed serialized output in a variety of one-lane, two-lane, four-lane, and eight-lane configurations, depending on the DDC configuration and the acceptable lane rate of the receiving logic device. Multidevice synchronization is supported through the SYSREF± and SYNCINB± input pins. The AD9208 has flexible power-down options that allow significant power savings when desired. All of these features can be programmed using a 3-wire serial port interface (SPI). This product is protected by a U.S. patent.
Source | Mainlined? |
---|---|
drivers/iio/adc/ad9208.c | WIP |
Function | File |
---|---|
driver | drivers/iio/adc/ad9208.c |
API driver | drivers/iio/adc/ad9208 |
core driver | drivers/iio/adc/cf_axi_adc_core.c |
core driver | drivers/iio/adc/cf_axi_adc_ring_stream.c |
core include | drivers/iio/adc/cf_axi_adc.h |
Documentation | adi,ad9208.txt |
Example device trees
Function | File |
---|---|
dtsi | adi-dual-ad9208.dtsi |
dts | vcu118_dual_ad9208.dts |
dts | zynqmp-zcu102-rev10-ad9208.dts |
Analog Devices AD9208 (and similar) JESD204B Analog-to-Digital Converter (ADC)
Required properties:
Optional properties:
Example:
&spi0 { status = "okay"; adc0_ad9208: ad9208@1 { compatible = "adi,ad9208x2"; spi-cpol; spi-cpha; spi-max-frequency = <10000000>; reg = <1>; clocks = <&axi_ad9208_0_jesd_rx>, <&hmc7044 2>; clock-names = "jesd_adc_clk", "adc_clk"; adi,powerdown-mode = <AD9208_PDN_MODE_POWERDOWN>; adi,sampling-frequency = /bits/ 64 <3000000000>; adi,input-clock-divider-ratio = <1>; adi,duty-cycle-stabilizer-enable; adi,analog-input-neg-buffer-current = <AD9208_BUFF_CURR_600_UA>; adi,analog-input-pos-buffer-current = <AD9208_BUFF_CURR_600_UA>; adi,sysref-lmfc-offset = <0>; adi,sysref-pos-window-skew = <0>; adi,sysref-neg-window-skew = <0>; adi,sysref-mode = <AD9208_SYSREF_ONESHOT>; adi,sysref-nshot-ignore-count = <15>; /* JESD204 parameters */ adi,converters-per-device = <2>; /* JESD204 (M) */ adi,lanes-per-device = <4>; /* JESD204 (L) */ adi,octets-per-frame = <1>; /* JESD204 (F) */ adi,frames-per-multiframe = <32>; /* JESD204 (K) */ adi,converter-resolution = <14>; /* JESD204 (N) */ adi,bits-per-sample = <16>; /* JESD204 (N') */ adi,control-bits-per-sample = <2>; /* JESD204 (CS) */ adi,subclass = <1>; /* JESD204 (SUBCLASSV) */ /* DDC setup */ adi,ddc-channel-number = <AD9208_FULL_BANDWIDTH_MODE>; #address-cells = <1>; #size-cells = <0>; ad9208_0_ddc0: channel@0 { /* Ignored in AD9208_FULL_BANDWIDTH_MODE */ reg = <0>; adi,decimation = <2>; adi,nco-mode-select = <AD9208_NCO_MODE_VIF>; adi,nco-channel-carrier-frequency-hz = /bits/ 64 <70000000>; adi,nco-channel-phase-offset = /bits/ 64 <0>; adi,ddc-gain-6dB-enable; }; }; };
AD9680 Example Using: JESD204 (FSM) Interface Linux Kernel Framework
adc0_ad9680: ad9680@2 { #address-cells = <1>; #size-cells = <0>; compatible = "adi,ad9680"; reg = <2>; spi-cpol; spi-cpha; spi-max-frequency = <1000000>; clocks = <&axi_ad9680_jesd>, <&clk0_ad9523 13>, <&clk0_ad9523 5>; clock-names = "jesd_adc_clk", "adc_clk", "adc_sysref"; /* jesd204-fsm support */ jesd204-device; #jesd204-cells = <2>; jesd204-top-device = <0>; /* This is the TOP device */ jesd204-link-ids = <0>; jesd204-inputs = <&axi_ad9680_core 0 0>; adi,powerdown-mode = <AD9208_PDN_MODE_POWERDOWN>; adi,sampling-frequency = /bits/ 64 <1000000000>; adi,input-clock-divider-ratio = <1>; adi,sysref-lmfc-offset = <0>; adi,sysref-pos-window-skew = <0>; adi,sysref-neg-window-skew = <0>; adi,sysref-mode = <AD9208_SYSREF_CONT>; adi,sysref-nshot-ignore-count = <0>; /* JESD204 parameters */ adi,octets-per-frame = <1>; adi,frames-per-multiframe = <32>; adi,converter-resolution = <14>; adi,bits-per-sample = <16>; adi,converters-per-device = <2>; adi,control-bits-per-sample = <2>; adi,lanes-per-device = <4>; adi,subclass = <1>; /* DDC setup */ adi,ddc-channel-number = <AD9208_FULL_BANDWIDTH_MODE>; ad9208_ddc0: channel@0 { reg = <0>; adi,decimation = <2>; adi,nco-mode-select = <AD9208_NCO_MODE_VIF>; adi,nco-channel-carrier-frequency-hz = /bits/ 64 <70000000>; adi,nco-channel-phase-offset = /bits/ 64 <0>; }; };
Configure kernel with “make menuconfig” (alternatively use “make xconfig” or “make qconfig”)
The AD9208 driver depends on CONFIG_SPI
Configure kernel with “make menuconfig” (alternatively use “make xconfig” or “make qconfig”)
Linux Kernel Configuration Device Drivers ---> <*> Industrial I/O support ---> --- Industrial I/O support -*- Enable ring buffer support within IIO -*- Industrial I/O lock free software ring -*- Enable triggered sampling support *** Analog to digital converters *** [--snip--] -*- Analog Devices High-Speed AXI ADC driver core <*> Analog Devices AD9208 and similar high speed ADCs [--snip--]
In case the driver probes and the device instantiates without errors. Your systems kernel messages should include some lines, which may look like the one shown below.
This specifies the root console running on the target
axi_adxcvr 44a60000.axi-adxcvr-rx: AXI-ADXCVR-RX (17.01.a) using GTY4 at 0x44A60000 mapped to 0xb0110000. Number of lanes: 8. axi_adxcvr 44b60000.axi-adxcvr-rx: AXI-ADXCVR-RX (17.01.a) using GTY4 at 0x44B60000 mapped to 0xb0330000. Number of lanes: 8. ad9208 spi0.1: AD9208 PLL LOCKED ad9208 spi0.1: AD9208 DUAL (MASTER with DMA) Rev. 3 Grade 0 (API 1.0.1) probed ad9208 spi0.2: AD9208 PLL LOCKED ad9208 spi0.2: AD9208 Rev. 3 Grade 0 (API 1.0.1) probed iio_dmaengine_buffer_alloc:227 width 0 (DMA width >= 256-bits ?) cf_axi_adc 44a10000.axi-ad9208-0-hpc: ADI AIM (10.01.b) at 0x44A10000 mapped to 0xb0101000, probed ADC AD9208 DUAL (MASTER with DMA) as MASTER cf_axi_adc 44b10000.axi-ad9208-1-hpc: ADI AIM (10.01.b) at 0x44B10000 mapped to 0xb010b000, probed ADC AD9208 as MASTER
Each and every IIO device, typically a hardware chip, has a device folder under /sys/bus/iio/devices/iio:deviceX. Where X is the IIO index of the device. Under every of these directory folders reside a set of files, depending on the characteristics and features of the hardware device in question. These files are consistently generalized and documented in the IIO ABI documentation. In order to determine which IIO deviceX corresponds to which hardware device, the user can read the name file /sys/bus/iio/devices/iio:deviceX/name. In case the sequence in which the iio device drivers are loaded/registered is constant, the numbering is constant and may be known in advance.
Some device attributes control the ADC HDL Core, others features of the ADC and associated clock providers.
This specifies any shell prompt running on the target
analog:/sys/bus/iio/devices/iio:device1# cd /sys/bus/iio/devices/ root@analog:/sys/bus/iio/devices# ls iio:device0 iio:device1 iio:device2 root@analog:/sys/bus/iio/devices# root@analog:/sys/bus/iio/devices# cd iio\:device1 root@analog:/sys/bus/iio/devices/iio:device1# ls -l total 0 drwxr-xr-x 5 root root 0 Jan 1 00:00 . drwxr-xr-x 3 root root 0 Jan 1 00:00 .. drwxr-xr-x 2 root root 0 Jan 1 00:00 buffer -r--r--r-- 1 root root 4096 Jan 1 00:00 dev drwxr-xr-x 2 root root 0 Jan 1 00:00 events -rw-r--r-- 1 root root 4096 Jan 1 00:00 in_voltage0_test_mode -rw-r--r-- 1 root root 4096 Jan 1 00:00 in_voltage1_test_mode -rw-r--r-- 1 root root 4096 Jan 1 00:00 in_voltage_dc_filter_enable -rw-r--r-- 1 root root 4096 Jan 1 00:00 in_voltage_sampling_frequency -rw-r--r-- 1 root root 4096 Jan 1 00:00 in_voltage_scale -r--r--r-- 1 root root 4096 Jan 1 00:00 in_voltage_scale_available -r--r--r-- 1 root root 4096 Jan 1 00:00 in_voltage_test_mode_available -r--r--r-- 1 root root 4096 Jan 1 00:00 name lrwxrwxrwx 1 root root 0 Jan 1 00:00 of_node -> ../../../../../firmware/devicetree/base/amba_pl/axi-ad9208-0-hpc@44a10000 drwxr-xr-x 2 root root 0 Jan 1 00:00 scan_elements lrwxrwxrwx 1 root root 0 Jan 1 00:00 subsystem -> ../../../../../bus/iio -rw-r--r-- 1 root root 4096 Jan 1 00:00 uevent root@analog:/sys/bus/iio/devices/iio:device1#
Documentation for IIO device the subfolders, device and channel attributes can be found here: AXI ADC HDL Linux Driver
This specifies any shell prompt running on the target
root@analog:/sys/bus/iio/devices/iio:device1# cat name axi-ad9208-0-hpc