AD4134
AD4134 ADC Linux Driver.
Supported Devices
Evaluation Boards
HDL Reference Designs
Supported FPGA carriers
Status
Files
Function |
File |
|
|---|---|---|
driver |
||
device tree bindings |
||
device tree bindings |
Documentation/devicetree/bindings/iio/adc/adi,ad4134-spi-engine.yaml |
|
devicetree |
||
devicetree |
||
devicetree |
||
devicetree |
||
devicetree |
||
devicetree |
||
devicetree |
||
devicetree |
||
devicetree |
Quick Start Guide
Flash Kuiper Linux to the SD card
Install Kuiper Linux to the SD card. Step by step guides for imaging Kuiper are available for Linux and Windows.
Configuring the SD Card
Use the boot files below or follow the next subsections to get BOOT.BIN, uImage, and devicetree.dtb files.
Follow the Configuring the SD Card for FPGA Projects section of the Kuiper page.
Copy the following files onto the BOOT partition to configure the SD card:
BOOT.BIN: Binary blob file which includes first stage boot loader and FPGA bitstream.
devicetree.dtb: Binary blob containing the specification of what hardware is present in the system.
uImage: Linux kernel image is the computer program that provides OS functionality.
Get BOOT.BIN from HDL project
To achieve high performance with AD4134 and similar ADCs, the hardware platform must have an integrated FPGA. To configure the FPGA to properly support them, ADI engineers provide HDL reference projects from which one may use ad4134_fmc, ad7134_fmc, or cn0561.
Follow the build instructions on the Build an HDL project page to build the appropriate HDL project and generate a BOOT.BIN file from that.
Get uImage and devicetree.dtb from Linux project
Follow the Linux build guide to build a new Linux kernel image and devicetree blob. After that, replace Kuiper Linux image with the newly built uImage and copy the proper .dtb file your platform to the BOOT partition as devicetree.dtb.
Adding Linux driver support
Enabling the driver
Configure kernel with make menuconfig (alternatively use make xconfig or
make qconfig)
Note
The AD4134 Driver depends on CONFIG_SPI
Linux Kernel Configuration
Device Drivers --->
...
<*> Industrial I/O support --->
--- Industrial I/O support
...
Analog to digital converters --->
...
<*> Analog Devices AD4134 ADC driver
...
...
...
Driver testing
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.
Tip
An example program whiroot@analog:/sys/bus/iio/devices# ls -lch uses the interface can be found here:
Show device name
root@analog:~# cat /sys/bus/iio/devices/iio:device0/name
adc
Show channel scale
Description: Scale to be applied to in_voltageX_raw in order to obtain the measured voltage in millivolts
root@analog:~# cat /sys/bus/iio/devices/iio:device0/in_voltage_scale
0.000488281
Inspect IIO device sysfs interface.
root@analog:~# ls -l /sys/bus/iio/devices/iio:device0/
total 0
-rw-r--r-- 1 root root 4096 Feb 27 09:10 ad7134_sync
drwxr-xr-x 2 root root 0 Feb 27 11:39 buffer
drwxr-xr-x 2 root root 0 Feb 27 11:39 buffer0
-r--r--r-- 1 root root 4096 Feb 27 11:39 dev
-rw-r--r-- 1 root root 4096 Feb 27 11:39 filter_type
-r--r--r-- 1 root root 4096 Feb 27 11:39 filter_type_available
-rw-r--r-- 1 root root 4096 Feb 27 14:11 in_voltage_sampling_frequency
-r--r--r-- 1 root root 4096 Feb 27 11:39 in_voltage_sampling_frequency_available
-rw-r--r-- 1 root root 4096 Feb 27 11:39 in_voltage_scale
-r--r--r-- 1 root root 4096 Feb 27 11:39 name
-rw-r--r-- 1 root root 4096 Feb 27 14:08 odr_set_freq
lrwxrwxrwx 1 root root 0 Feb 27 11:39 of_node -> ../../../../../../../../firmware/devicetree/base/axi/spi@e0006000/adc@0
drwxr-xr-x 2 root root 0 Feb 27 11:39 power
drwxr-xr-x 2 root root 0 Feb 27 11:39 scan_elements
lrwxrwxrwx 1 root root 0 Feb 27 11:39 subsystem -> ../../../../../../../../bus/iio
-rw-r--r-- 1 root root 4096 Feb 27 11:39 uevent
-r--r--r-- 1 root root 4096 Feb 27 11:39 waiting_for_supplier