ADMV1014
ADMV1014 24 GHz to 44 GHz, Wideband, Microwave Downconverter Linux Driver.
Supported Devices
Evaluation Boards
Description
This is a Linux industrial I/O (Linux Industrial I/O Subsystem) subsystem driver, targeting serial interface Microwave converters. The industrial I/O subsystem provides a unified framework for drivers for many different types of converters and sensors using a number of different physical interfaces (i2c, spi, etc). See Linux Industrial I/O Subsystem for more information.
Source Code
Status
Files
Function |
File |
|---|---|
driver |
|
Documentation |
Unlike PCI or USB devices, SPI devices are not enumerated at the hardware level. Instead, the software must know which devices are connected on each SPI bus segment, and what slave selects these devices are using. For this reason, the kernel code must instantiate SPI devices explicitly. The most common method is to declare the SPI devices by bus number.
This method is appropriate when the SPI bus is a system bus, as in many
embedded systems, wherein each SPI bus has a number which is known in advance.
It is thus possible to pre-declare the SPI devices that inhabit this bus. This
is done with an array of struct spi_board_info, which is registered by
calling spi_register_board_info().
For more information see: Overview of Linux kernel SPI support
Hardware configuration
Use the device and evaluation-board documentation for physical wiring, power supplies and the LO connection.
Adding Linux driver support
Kernel configuration
Configure kernel with make menuconfig (alternatively use make xconfig or
make qconfig)
Note
The ADMV1014 Driver depends on CONFIG_SPI
Linux Kernel Configuration
Device Drivers --->
<*> Industrial I/O support --->
--- Industrial I/O support
Frequency --->
<*> Analog Devices ADMV1014 Microwave Downconverter
Devicetree configuration
Properties
Required properties:
compatible = "adi,admv1014".reg: SPI chip-select number.clocksandclock-names = "lo_in": The LO input clock.Supply references:
vcm-supply.vcc-if-bb-supply.vcc-vga-supply.vcc-vva-supply.vcc-lna-3p3-supply.vcc-lna-1p5-supply.vcc-bg-supply.vcc-quad-supply.vcc-mixer-supply.
Mode-selection properties:
adi,input-mode: Stringiqorif.adi,quad-se-mode: Stringdiff,se-posorse-neg.adi,detector-enable: Boolean enabling the detector.adi,p1db-compensation-enable: Boolean enabling P1dB compensation.
Example
This example selects IQ input mode and differential quadrature mode. The LO clock provider supplies the input frequency.
&spi0 {
#address-cells = <1>;
#size-cells = <0>;
converter@0 {
compatible = "adi,admv1014";
reg = <0>;
spi-max-frequency = <1000000>;
clocks = <&admv1014_lo>;
clock-names = "lo_in";
vcm-supply = <&vcm>;
vcc-if-bb-supply = <&vcc_if_bb>;
vcc-vga-supply = <&vcc_vga>;
vcc-vva-supply = <&vcc_vva>;
vcc-lna-3p3-supply = <&vcc_lna_3p3>;
vcc-lna-1p5-supply = <&vcc_lna_1p5>;
vcc-bg-supply = <&vcc_bg>;
vcc-quad-supply = <&vcc_quad>;
vcc-mixer-supply = <&vcc_mixer>;
adi,input-mode = "iq";
adi,quad-se-mode = "diff";
adi,detector-enable;
adi,p1db-compensation-enable;
};
};
Driver testing
Identify the device
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.
Select the IIO device whose name attribute is admv1014.
cd /sys/bus/iio/devices/iio:device0
cat name
ls -l
root:/> cd /sys/bus/iio/devices/iio\:device0/
root:/> cat name
admv1014
Calibrate IQ baseband gain
In IQ mode, calibration scale is a shared integer register code, not a decimal I/Q hardware-gain pair. Run in the correct device directory. IF mode instead exposes per-path calibscale_coarse and calibscale_fine attributes.
set -eu
cat in_altvoltage_calibscale
echo 1 > in_altvoltage_calibscale
cat in_altvoltage_calibscale
Set ChannelY Offset value
Use the current input-channel attribute; replace _i_ with _q_ for the Q path. Values are integer register codes.
set -eu
cat in_altvoltage0_i_offset
echo 1 > in_altvoltage0_i_offset
cat in_altvoltage0_i_offset
Set ChannelY Phase value
Use the current input-channel attribute; replace _i_ with _q_ for the Q path. Values are integer register codes.
set -eu
cat in_altvoltage0_i_phase
echo 1 > in_altvoltage0_i_phase
cat in_altvoltage0_i_phase