ADMV1013
ADMV1013 24 GHz to 44 GHz, Wideband, Microwave Upconverter 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 ADMV1013 Driver depends on CONFIG_SPI
Linux Kernel Configuration
Device Drivers --->
<*> Industrial I/O support --->
--- Industrial I/O support
Frequency --->
<*> Analog Devices ADMV1013 Microwave Upconverter
Devicetree configuration
Properties
Required properties:
compatible = "adi,admv1013".reg: SPI chip-select number.clocksandclock-names = "lo_in": The LO input clock.Supply references:
vcm-supply.vcc-drv-supply.vcc2-drv-supply.vcc-vva-supply.vcc-amp1-supply.vcc-amp2-supply.vcc-env-supply.vcc-bg-supply.vcc-bg2-supply.vcc-mixer-supply.vcc-quad-supply.
Mode-selection properties:
adi,input-mode: Stringiqorif.adi,quad-se-mode: Stringdiff,se-posorse-neg.adi,detector-enable: Boolean enabling the detector.
Example
This example selects IF input mode and differential quadrature mode. The LO clock provider supplies the input frequency.
&spi0 {
#address-cells = <1>;
#size-cells = <0>;
admv1013@0{
compatible = "adi,admv1013";
reg = <0>;
spi-max-frequency = <1000000>;
clocks = <&admv1013_lo>;
clock-names = "lo_in";
vcm-supply = <&vcm>;
vcc-drv-supply = <&vcc_drv>;
vcc2-drv-supply = <&vcc2_drv>;
vcc-vva-supply = <&vcc_vva>;
vcc-amp1-supply = <&vcc_amp1>;
vcc-amp2-supply = <&vcc_amp2>;
vcc-env-supply = <&vcc_env>;
vcc-bg-supply = <&vcc_bg>;
vcc-bg2-supply = <&vcc_bg2>;
vcc-mixer-supply = <&vcc_mixer>;
vcc-quad-supply = <&vcc_quad>;
adi,input-mode = "if";
adi,quad-se-mode = "diff";
adi,detector-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 admv1013.
cd /sys/bus/iio/devices/iio:device0
cat name
ls -l
root:/> cd /sys/bus/iio/devices/iio\:device0/
root:/> cat name
admv1013
Calibration bias
The in_altvoltageY_i_calibbias and in_altvoltageY_q_calibbias
attributes control the I-path and Q-path mixer-offset calibration codes.
Channel 0 selects the positive mixer output and channel 1 selects the negative
mixer output. These are hardware calibration codes, not a decimal I/Q voltage
pair. Read the channel’s current value before adjusting its calibration.
cat in_altvoltage0_i_calibbias
cat in_altvoltage0_q_calibbias
cat in_altvoltage1_i_calibbias
cat in_altvoltage1_q_calibbias
Calibrate I/Q phase
For a successfully registered device, set and read back the I-path phase code in the correct IIO device directory. The Q-path counterpart ends in q_calibphase.
set -eu
cat in_altvoltage0-altvoltage1_i_calibphase
echo 1 > in_altvoltage0-altvoltage1_i_calibphase
cat in_altvoltage0-altvoltage1_i_calibphase