Wiki

This version is outdated by a newer approved version.DiffThis version (08 Nov 2023 02:20) was approved by Kim Seer Paller.

This is an old revision of the document!


ADMFM2000 0.5 GHz to 32 GHz Microwave Downconverter Linux Driver

The ADMFM2000 is a dual-channel microwave downconverter, system-in-package (SiP) module, with input RF and local oscillator (LO) frequency ranges covering 5 GHz to 32 GHz, with an output intermediate frequency (IF) frequency range from 0.5 GHz to 8 GHz. A common LO input signal is split to feed two separate buffer amplifiers to drive the mixer in each channel. Each down conversion path consists of an LNA, a mixer, an IF filter, a digital step attenuator (DSA), and an IF amplifier.

Supported Devices

This driver supports the

Description

This is a Linux industrial I/O (IIO) 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 IIO for more information.

Source Code

Status

Source Mainlined?
git [In-progress]

Files

Function File
driver admfm2000.c
device tree bindings adi,admfm2000.yaml

Example Linux Device-Tree Initialization

The ADMFM2000 driver is a platform driver and can currently only be instantiated via device tree.

Required properties:

  • compatible: Must be of “adi,admfm2000”.
  • switch1-gpios:: Must contain an array of 2 GPIO specifiers, referring to the GPIO pins connected to the channel 1 switch controls.
  • switch2-gpios:: Must contain an array of 2 GPIO specifiers, referring to the GPIO pins connected to the channel 2 switch controls.
  • attenuation1-gpios:: Must contain an array of 5 GPIO specifiers, referring to the GPIO pins connected to the DSA attenuation controls.
  • attenuation2-gpios:: Must contain an array of 5 GPIO specifiers, referring to the GPIO pins connected to the DSA attenuation controls.
  • #address-cells: Must be set to 1
  • #size-cells: Must be set to 0

Optional properties:

  • adi,direct-if-mode:: Bypass mixer mode.

Example:

#include <dt-bindings/gpio/gpio.h>
&{/} {
	admfm2000 {
                compatible = "adi,admfm2000";
                switch1-gpios = <&gpio 1 GPIO_ACTIVE_LOW>,
                        <&gpio 2 GPIO_ACTIVE_HIGH>;
                switch2-gpios = <&gpio 3 GPIO_ACTIVE_LOW>,
                        <&gpio 4 GPIO_ACTIVE_HIGH>;
                attenuation1-gpios = <&gpio 17 GPIO_ACTIVE_LOW>,
                        <&gpio 22 GPIO_ACTIVE_LOW>,
                        <&gpio 23 GPIO_ACTIVE_LOW>,
                        <&gpio 24 GPIO_ACTIVE_LOW>,
                        <&gpio 25 GPIO_ACTIVE_LOW>;
                attenuation2-gpios = <&gpio 0 GPIO_ACTIVE_LOW>,
                        <&gpio 5 GPIO_ACTIVE_LOW>,
                        <&gpio 6 GPIO_ACTIVE_LOW>,
                        <&gpio 16 GPIO_ACTIVE_LOW>,
                        <&gpio 26 GPIO_ACTIVE_LOW>;
                        
                #address-cells = <1>;
                #size-cells = <0>;

                channel@0 {
                        reg = <0>;
                        adi,direct-if-mode;
                };

                channel@1 {
                        reg = <1>;
                        adi,direct-if-mode;
                };
        };
};

Enabling Linux driver support

Configure kernel with “make menuconfig” (alternatively use “make xconfig” or “make qconfig”)

The ADMFM2000 driver depends on GPIOLIB

Linux Kernel Configuration
	Device Drivers  --->
		<*>     Industrial I/O support --->
		    --- Industrial I/O support
				Frequency  --->
					<*> Analog Devices ADMFM2000 Dual Microwave Down Converter

Driver testing / API

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.

02 Mar 2011 15:16

This device can be found under /sys/bus/iio/devices/

root:/> cd /sys/bus/iio/devices/
root:/sys/bus/iio/devices> ls
iio:device0

root:/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 Oct 26 22:20 name
lrwxrwxrwx 1 root root    0 Oct 26 22:20 of_node -> ../../../../firmware/devicetree/base/admfm2000
-rw-r--r-- 1 root root 4096 Oct 26 22:20 out_voltage0_hardwaregain
-rw-r--r-- 1 root root 4096 Oct 26 22:20 out_voltage1_hardwaregain
drwxr-xr-x 2 root root    0 Oct 26 22:20 power
lrwxrwxrwx 1 root root    0 Oct 26 22:20 subsystem -> ../../../../bus/iio
-rw-r--r-- 1 root root 4096 Oct 26 22:20 uevent
-r--r--r-- 1 root root 4096 Oct 26 22:20 waiting_for_supplier
root@analog:/sys/bus/iio/devices/iio:device0# 

Show device name

This specifies any shell prompt running on the target

root@analog:/sys/bus/iio/devices/iio:device0# cat name
admfm2000

Set ChannelY Gain

/sys/bus/iio/devices/iio:deviceX/out_voltageY_hardwaregain

Hardware applied gain factor. If shared across all channels, <type>_hardwaregain is used.

This specifies any shell prompt running on the target

root@analog:/sys/bus/iio/devices/iio:device0#cat out_voltage0_hardwaregain
-31.000000 dB

root@analog:/sys/bus/iio/devices/iio:device0#echo -10 > out_voltage0_hardwaregain
root@analog:/sys/bus/iio/devices/iio:device0#cat out_voltage0_hardwaregain
-10.000000 dB

More Information

resources/tools-software/linux-drivers/iio-pll/admfm2000.1698366833.txt.gz · Last modified: 27 Oct 2023 02:33 by Kim Seer Paller