ADMV8818
ADMV8818 2GHz to 18GHz, Digitally Tunable High-Pass and Low-PASS Filter Linux Driver.
Supported Devices
Evaluation Boards
Description
The ADMV8818-EP is a fully monolithic microwave integrated circuit (MMIC) that features a digitally selectable frequency of operation. The device features four independently controlled high-pass filters (HPFs) and four independently controlled low-pass filters (LPFs) that span the 2 GHz to 18 GHz frequency range.
The flexible architecture of the ADMV8818-EP allows the 3 dB cutoff frequency (f3dB) of the high-pass and low-pass filters to be controlled independently to generate up to 4 GHz of bandwidth. The digital logic control on each filter is 4 bits wide (16 states) and controls the on-chip reactive elements to adjust the f3dB. The typical insertion loss is 9 dB, and the wideband rejection is 35 dB, which is ideally suited for minimizing system harmonics.
This tunable filter can be used as a smaller alternative to large switched filter banks and cavity tuned filters, and this device provides a dynamically adjustable solution in advanced communications applications.
Source Code
Status
Source |
Mainlined? |
|---|---|
Yes |
Files
Function |
File |
|---|---|
driver |
|
Documentation |
|
ABI documentation |
Example device tree
Function |
File |
|
|---|---|---|
dts |
Adding Linux driver support
Kernel configuration
Configure kernel with make menuconfig (alternatively use make xconfig or
make qconfig)
Note
The ADMV8818 driver depends on SPI and selects REGMAP_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
Filters --->
<*> Analog Devices ADMV8818 High-Pass and Low-Pass Filter
Devicetree configuration
Example platform device initialization
The ADMV8818 driver is a SPI bus driver and can be instantiated via device tree.
Required properties:
compatible: Should always be one of these:
adi,admv8818
reg: SPI chip select number.
Optional clock input: clocks with clock-names = “rf_in” enables automatic filter tracking. Without this clock the driver supports manual and bypass modes.
Optional properties:
clock-scales: The Common Clock Framework max rate is limited by MAX of unsigned long. For ADF4371/ADF4372 devices this is a deficiency. If specified, this property allows arbitrary scales. The first element in the array should be the multiplier and the second element should be the divider.
Automatic tracking selects cutoffs around the input clock; this driver does not parse a bandwidth Devicetree property.
Example:
spi {
#address-cells = <1>;
#size-cells = <0>;
admv8818@0 {
compatible = "adi,admv8818";
reg = <0>;
spi-max-frequency = <10000000>;
clocks = <&admv8818_rfin>;
clock-scales = <1 5>;
clock-names = "rf_in";
};
};
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.
analog:/sys/bus/iio/devices/iio:device0# cd /sys/bus/iio/devices/
root@analog:/sys/bus/iio/devices# ls
iio:device0
root@analog:/sys/bus/iio/devices#
root@analog:/sys/bus/iio/devices# cd iio\:device0
root@analog:/sys/bus/iio/devices/iio:device0# ls -l
total 0
-r--r--r-- 1 root root 4096 Mar 24 08:38 dev
-r--r--r-- 1 root root 4096 Mar 24 08:38 name
lrwxrwxrwx 1 root root 0 Mar 24 08:38 of_node -> ../../../../../../../../firmware/devicetree/base/soc/spi@7e204000/admv8818@0
-rw-r--r-- 1 root root 4096 Mar 24 08:38 out_altvoltage0_filter_high_pass_3db_frequency
-rw-r--r-- 1 root root 4096 Mar 24 08:38 out_altvoltage0_filter_low_pass_3db_frequency
-rw-r--r-- 1 root root 4096 Mar 24 08:38 filter_mode
-r--r--r-- 1 root root 4096 Mar 24 08:38 filter_mode_available
drwxr-xr-x 2 root root 0 Mar 24 08:38 power
lrwxrwxrwx 1 root root 0 Mar 24 08:38 subsystem -> ../../../../../../../../bus/iio
-rw-r--r-- 1 root root 4096 Mar 24 08:38 uevent
root@analog:/sys/bus/iio/devices/iio:device0#
Identify the device
root@analog:/sys/bus/iio/devices/iio:device0# cat name
admv8818
Read and set filter cutoff frequencies
The current interface exposes low-pass and high-pass 3 dB cutoff frequencies in Hz as 64-bit integers. It does not expose band-pass center-frequency, bandwidth or scale attributes. Read back the selected cutoff because the hardware quantizes the requested frequency.
Run these commands in the device’s sysfs directory. Select manual mode before setting cutoffs so automatic clock tracking does not overwrite the settings.
echo manual > filter_mode
cat out_altvoltage0_filter_low_pass_3db_frequency
echo 8000000000 > out_altvoltage0_filter_low_pass_3db_frequency
cat out_altvoltage0_filter_low_pass_3db_frequency
cat out_altvoltage0_filter_high_pass_3db_frequency
echo 6000000000 > out_altvoltage0_filter_high_pass_3db_frequency
cat out_altvoltage0_filter_high_pass_3db_frequency
Filter mode
The mode allows the user to access enable/disable/register/unregister the clock rate notifier. Valid values that can be written:
root@analog:/sys/bus/iio/devices/iio:device0# cat filter_mode_available
auto manual bypass
root@analog:/sys/bus/iio/devices/iio:device0# cat filter_mode
auto
root@analog:/sys/bus/iio/devices/iio:device0# echo bypass > filter_mode
root@analog:/sys/bus/iio/devices/iio:device0# cat filter_mode
bypass