iio:frequency:admv1014: add support for ADMV1014
Subsystems (4)
Antoniu Miclaus
maintainerPATCH v6 1/4 iio:frequency:admv1014: add support for ADMV1014
The ADMV1014 is a silicon germanium (SiGe), wideband, microwave downconverter optimized for point to point microwave radio designs operating in the 24 GHz to 44 GHz frequency range.
Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ADMV1014.pdf
---
changes in v6:
- add missing commas
- remove explicit init for spi transfer variable t
- use sizeof for transfer length
- use mult_frac when computing vcm_comp
- update quad filters comparison
- remove explicit cast cast of private in switch...case
- use kstrtoint
- update reg_name array alignment
- rework input modes dt parse
- use reversed xmas tree order for variable declaration where needed
drivers/iio/frequency/Kconfig | 10 + drivers/iio/frequency/Makefile | 1 + drivers/iio/frequency/admv1014.c | 824 +++++++++++++++++++++++++++++++ 3 files changed, 835 insertions(+) create mode 100644 drivers/iio/frequency/admv1014.c
drivers/iio/frequency/Kconfig +10 -0
@@ -50,6 +50,16 @@ config ADF4371 To compile this driver as a module, choose M here: the module will be called adf4371. +config ADMV1014 + tristate "Analog Devices ADMV1014 Microwave Downconverter" + depends on SPI && COMMON_CLK && 64BIT + help + Say yes here to build support for Analog Devices ADMV1014 + 24 GHz to 44 GHz, Wideband, Microwave Downconverter. + + To compile this driver as a module, choose M here: the + module will be called admv1014. + config ADRF6780 tristate "Analog Devices ADRF6780 Microwave Upconverter" depends on SPI
drivers/iio/frequency/Makefile +1 -0
@@ -7,4 +7,5 @@ obj-$(CONFIG_AD9523) += ad9523.o obj-$(CONFIG_ADF4350) += adf4350.o obj-$(CONFIG_ADF4371) += adf4371.o +obj-$(CONFIG_ADMV1014) += admv1014.o obj-$(CONFIG_ADRF6780) += adrf6780.o
drivers/iio/frequency/admv1014.c new file +824 -0
824 lines not on this page · raw message
Signature · 1 line
2.35.1
Antoniu Miclaus
maintainerPATCH v6 2/4 dt-bindings:iio:frequency: add admv1014 binding
Add device tree bindings for the ADMV1014 Upconverter.
---
no changes in v6.
.../bindings/iio/frequency/adi,admv1014.yaml | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/frequency/adi,admv1014.yaml
Documentation/devicetree/bindings/iio/frequency/adi,admv1014.yaml new file +137 -0
@@ -0,0 +1,137 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/frequency/adi,admv1014.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ADMV1014 Microwave Downconverter + +maintainers: + - Antoniu Miclaus <[email protected]> + +description: | + Wideband, microwave downconverter optimized for point to point microwave + radio designs operating in the 24 GHz to 44 GHz frequency range. + + https://www.analog.com/en/products/admv1014.html + +properties: + compatible: + enum: + - adi,admv1014 + + reg: + maxItems: 1 + + spi-max-frequency: + maximum: 1000000 + + clocks: + minItems: 1 + + clock-names: + items: + - const: lo_in + description: + External clock that provides the Local Oscilator input. + + vcm-supply: + description: + Common-mode voltage regulator. + + vcc-if-bb-supply: + description: + BB and IF supply voltage regulator. + + vcc-vga-supply: + description: + RF Amplifier supply voltage regulator. + + vcc-vva-supply: + description: + VVA Control Circuit supply voltage regulator. + + vcc-lna-3p3-supply: + description: + Low Noise Amplifier 3.3V supply voltage regulator. + + vcc-lna-1p5-supply: + description: + Low Noise Amplifier 1.5V supply voltage regulator. + + vcc-bg-supply: + description: + Band Gap Circuit supply voltage regulator. + + vcc-quad-supply: + description: + Quadruple supply voltage regulator. + + vcc-mixer-supply: + description: + Mixer supply voltage regulator. + + adi,input-mode: + description: + Select the input mode. + iq - in-phase quadrature (I/Q) input + if - complex intermediate frequency (IF) input + enum: [iq, if] + + adi,detector-enable: + description: + Digital Rx Detector Enable. The Square Law Detector output is + available at output pin VDET. + type: boolean + + adi,p1db-compensation-enable: + description: + Turn on bits to optimize P1dB. + type: boolean + + adi,quad-se-mode: + description: + Switch the LO path from differential to single-ended operation. + se-neg - Single-Ended Mode, Negative Side Disabled. + se-pos - Single-Ended Mode, Positive Side Disabled. + diff - Differential Mode. + enum: [se-neg, se-pos, diff] + + '#clock-cells': + const: 0 + +required: + - compatible + - reg + - clocks + - clock-names + - vcm-supply + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + admv1014@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,quad-se-mode = "diff"; + adi,detector-enable; + adi,p1db-compensation-enable; + }; + }; +...
Signature · 1 line
2.35.1
RE: [PATCH v6 2/4] dt-bindings:iio:frequency: add admv1014 binding
--
Antoniu Miclăuş
Quoted 11 lines
-----Original Message-----
From: Antoniu Miclaus <[email protected]>
Sent: Monday, February 7, 2022 3:06 PM
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: Miclaus, Antoniu <[email protected]>
Subject: [PATCH v6 2/4] dt-bindings:iio:frequency: add admv1014 bindingAdd device tree bindings for the ADMV1014 Upconverter.
Signed-off-by Antoniu Miclaus <[email protected]>
Forgot to add in v6:
(here, not in the ABI patch, my bad)
Quoted 156 lines
---
no changes in v6..../bindings/iio/frequency/adi,admv1014.yaml | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644
Documentation/devicetree/bindings/iio/frequency/adi,admv1014.yamldiff --git
a/Documentation/devicetree/bindings/iio/frequency/adi,admv1014.yamlb/Documentation/devicetree/bindings/iio/frequency/adi,admv1014.yamlnew file mode 100644
index 000000000000..fe352c01dd94
---/dev/null
+++b/Documentation/devicetree/bindings/iio/frequency/adi,admv1014.yamlDocumentation/devicetree/bindings/iio/frequency/adi,admv1014.yaml new file +13
-0@@ -0,0 +1,137 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/frequency/adi,admv1014.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ADMV1014 Microwave Downconverter + +maintainers: + - Antoniu Miclaus <[email protected]> + +description: | + Wideband, microwave downconverter optimized for point to pointmicrowave
Documentation/devicetree/bindings/iio/frequency/adi,admv1014.yaml new file +124
-1+ radio designs operating in the 24 GHz to 44 GHz frequency range. + + https://www.analog.com/en/products/admv1014.html + +properties: + compatible: + enum: + - adi,admv1014 + + reg: + maxItems: 1 + + spi-max-frequency: + maximum: 1000000 + + clocks: + minItems: 1 + + clock-names: + items: + - const: lo_in + description: + External clock that provides the Local Oscilator input. + + vcm-supply: + description: + Common-mode voltage regulator. + + vcc-if-bb-supply: + description: + BB and IF supply voltage regulator. + + vcc-vga-supply: + description: + RF Amplifier supply voltage regulator. + + vcc-vva-supply: + description: + VVA Control Circuit supply voltage regulator. + + vcc-lna-3p3-supply: + description: + Low Noise Amplifier 3.3V supply voltage regulator. + + vcc-lna-1p5-supply: + description: + Low Noise Amplifier 1.5V supply voltage regulator. + + vcc-bg-supply: + description: + Band Gap Circuit supply voltage regulator. + + vcc-quad-supply: + description: + Quadruple supply voltage regulator. + + vcc-mixer-supply: + description: + Mixer supply voltage regulator. + + adi,input-mode: + description: + Select the input mode. + iq - in-phase quadrature (I/Q) input + if - complex intermediate frequency (IF) input + enum: [iq, if] + + adi,detector-enable: + description: + Digital Rx Detector Enable. The Square Law Detector output is + available at output pin VDET. + type: boolean + + adi,p1db-compensation-enable: + description: + Turn on bits to optimize P1dB. + type: boolean + + adi,quad-se-mode: + description: + Switch the LO path from differential to single-ended operation. + se-neg - Single-Ended Mode, Negative Side Disabled. + se-pos - Single-Ended Mode, Positive Side Disabled. + diff - Differential Mode. + enum: [se-neg, se-pos, diff] + + '#clock-cells': + const: 0 + +required: + - compatible + - reg + - clocks + - clock-names + - vcm-supply + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + admv1014@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,quad-se-mode = "diff"; + adi,detector-enable; + adi,p1db-compensation-enable; + }; + }; +... --2.35.1
Antoniu Miclaus
maintainerPATCH v6 3/4 Documentation:ABI:testing:admv1014: add ABI docs
In reply to Antoniu MiclausAdd documentation for the use of the Digital Attenuator gain.
---
no changes in v6.
Documentation/ABI/testing/sysfs-bus-iio | 1 + .../testing/sysfs-bus-iio-frequency-admv1014 | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014
Documentation/ABI/testing/sysfs-bus-iio +1 -0
@@ -476,6 +476,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_i_calibscale What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_q_calibscale What: /sys/bus/iio/devices/iio:deviceX/in_voltage_i_calibscale What: /sys/bus/iio/devices/iio:deviceX/in_voltage_q_calibscale +What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage_calibscale What: /sys/bus/iio/devices/iio:deviceX/in_voltage_calibscale What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_calibscale What: /sys/bus/iio/devices/iio:deviceX/in_accel_y_calibscale
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014 new file +23 -0
@@ -0,0 +1,23 @@ +What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage0_i_calibscale_coarse +KernelVersion: 5.18 +Contact: [email protected] +Description: + Read/write value for the digital attenuator gain (IF_I) with coarse steps. + +What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage0_q_calibscale_coarse +KernelVersion: 5.18 +Contact: [email protected] +Description: + Read/write value for the digital attenuator gain (IF_Q) with coarse steps. + +What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage0_i_calibscale_fine +KernelVersion: 5.18 +Contact: [email protected] +Description: + Read/write value for the digital attenuator gain (IF_I) with fine steps. + +What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage0_q_calibscale_fine +KernelVersion: 5.18 +Contact: [email protected] +Description: + Read/write value for the digital attenuator gain (IF_Q) with fine steps.
Signature · 1 line
2.35.1
RE: [PATCH v6 3/4] Documentation:ABI:testing:admv1014: add ABI docs
--
Antoniu Miclăuş
Quoted 11 lines
-----Original Message-----
From: Antoniu Miclaus <[email protected]>
Sent: Monday, February 7, 2022 3:06 PM
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: Miclaus, Antoniu <[email protected]>
Subject: [PATCH v6 3/4] Documentation:ABI:testing:admv1014: add ABI docsAdd documentation for the use of the Digital Attenuator gain.
Signed-off-by Antoniu Miclaus <[email protected]>
Forgot to add in v6:
Quoted 62 lines
---
no changes in v6.Documentation/ABI/testing/sysfs-bus-iio | 1 + .../testing/sysfs-bus-iio-frequency-admv1014 | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014
Documentation/ABI/testing/sysfs-bus-iio +1
-0@@ -476,6 +476,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_i_calibscale What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_q_calibscale What: /sys/bus/iio/devices/iio:deviceX/in_voltage_i_calibscale What: /sys/bus/iio/devices/iio:deviceX/in_voltage_q_calibscale +What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage_calibscale What: /sys/bus/iio/devices/iio:deviceX/in_voltage_calibscale What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_calibscaleWhat: /sys/bus/iio/devices/iio:deviceX/in_accel_y_calibscale
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014 new file +1
-0@@ -0,0 +1,23 @@ +What:/sys/bus/iio/devices/iio:deviceX/in_altvoltage0_i_calibscale_coarse
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014 new file +4
-0+KernelVersion: 5.18 +Contact: [email protected] +Description: + Read/write value for the digital attenuator gain (IF_I) withcoarse steps.
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014 new file +2
-0+ +What:/sys/bus/iio/devices/iio:deviceX/in_altvoltage0_q_calibscale_coarse
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014 new file +4
-0+KernelVersion: 5.18 +Contact: [email protected] +Description: + Read/write value for the digital attenuator gain (IF_Q) withcoarse steps.
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014 new file +2
-0+ +What:/sys/bus/iio/devices/iio:deviceX/in_altvoltage0_i_calibscale_fine
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014 new file +4
-0+KernelVersion: 5.18 +Contact: [email protected] +Description: + Read/write value for the digital attenuator gain (IF_I) withfine steps.
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014 new file +2
-0+ +What:/sys/bus/iio/devices/iio:deviceX/in_altvoltage0_q_calibscale_fine
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014 new file +4
-0+KernelVersion: 5.18 +Contact: [email protected] +Description: + Read/write value for the digital attenuator gain (IF_Q) withfine steps.
--
2.35.1
Jonathan Cameron
maintainerRe: [PATCH v6 3/4] Documentation:ABI:testing:admv1014: add ABI docs
Quoted 11 lines · Antoniu
--
Antoniu MiclăuşQuoted 8 lines
-----Original Message-----
From: Antoniu Miclaus <[email protected]>
Sent: Monday, February 7, 2022 3:06 PM
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: Miclaus, Antoniu <[email protected]>
Subject: [PATCH v6 3/4] Documentation:ABI:testing:admv1014: add ABI docs
Quoted 5 lines
Quoted 3 lines
Add documentation for the use of the Digital Attenuator gain.
Signed-off-by Antoniu Miclaus <[email protected]>Forgot to add in v6:
Reviewed-by Rob Herring <[email protected]>
Ah. That will break b4 trying to pick this up (as it's in the wrong patch as you noted).
Please resend as v7 with fixed up tags.
I'm waiting to give Andy another chance to look at this if he wants anyway.
Thanks,
Jonathan
Quoted 63 lines
Quoted 62 lines
---
no changes in v6.Documentation/ABI/testing/sysfs-bus-iio | 1 + .../testing/sysfs-bus-iio-frequency-admv1014 | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014
Documentation/ABI/testing/sysfs-bus-iio +1
-0@@ -476,6 +476,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_i_calibscale What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_q_calibscale What: /sys/bus/iio/devices/iio:deviceX/in_voltage_i_calibscale What: /sys/bus/iio/devices/iio:deviceX/in_voltage_q_calibscale +What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage_calibscale What: /sys/bus/iio/devices/iio:deviceX/in_voltage_calibscale What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_calibscaleWhat: /sys/bus/iio/devices/iio:deviceX/in_accel_y_calibscale
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014 new file +1
-0@@ -0,0 +1,23 @@ +What:/sys/bus/iio/devices/iio:deviceX/in_altvoltage0_i_calibscale_coarse
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014 new file +4
-0+KernelVersion: 5.18 +Contact: [email protected] +Description: + Read/write value for the digital attenuator gain (IF_I) withcoarse steps.
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014 new file +2
-0+ +What:/sys/bus/iio/devices/iio:deviceX/in_altvoltage0_q_calibscale_coarse
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014 new file +4
-0+KernelVersion: 5.18 +Contact: [email protected] +Description: + Read/write value for the digital attenuator gain (IF_Q) withcoarse steps.
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014 new file +2
-0+ +What:/sys/bus/iio/devices/iio:deviceX/in_altvoltage0_i_calibscale_fine
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014 new file +4
-0+KernelVersion: 5.18 +Contact: [email protected] +Description: + Read/write value for the digital attenuator gain (IF_I) withfine steps.
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014 new file +2
-0+ +What:/sys/bus/iio/devices/iio:deviceX/in_altvoltage0_q_calibscale_fine
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1014 new file +4
-0+KernelVersion: 5.18 +Contact: [email protected] +Description: + Read/write value for the digital attenuator gain (IF_Q) withfine steps.
--
2.35.1
Antoniu Miclaus
maintainerPATCH v6 4/4 MAINTAINERS: add maintainer for ADMV1014 driver
In reply to Antoniu MiclausAdd myself as maintainer for the ADMV1014 driver.
---
no changes in v6.
MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+)
MAINTAINERS +8 -0
@@ -1119,6 +1119,14 @@ W: http://ez.analog.com/community/linux-device-drivers F: Documentation/devicetree/bindings/hwmon/adi,adm1177.yaml F: drivers/hwmon/adm1177.c +ANALOG DEVICES INC ADMV1014 DRIVER +M: Antoniu Miclaus <[email protected]> +L: [email protected] +S: Supported +W: https://ez.analog.com/linux-software-drivers +F: Documentation/devicetree/bindings/iio/frequency/adi,admv1014.yaml +F: drivers/iio/frequency/admv1014.c + ANALOG DEVICES INC ADP5061 DRIVER M: Michael Hennerich <[email protected]> L: [email protected]
Signature · 1 line
2.35.1