Skip to content

Add support for admv1355 - #3576

Open
danmois wants to merge 4 commits into
mainfrom
staging/admv1355_prerelease
Open

danmois wants to merge 4 commits into
mainfrom
staging/admv1355_prerelease

Conversation

@danmois

@danmois danmois commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

PR Description

The ADMV1355 is a highly integrated microwave upconverter optimized
for wideband radio designs operating in the 17.7 GHz to 55 GHz RF range.

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have conducted a self-review of my own code changes
  • I have compiled my changes, including the documentation
  • I have tested the changes on the relevant hardware
  • I have updated the documentation outside this repo accordingly
  • I have provided links for the relevant upstream lore

The ADMV1355 is a highly integrated microwave upconverter optimized
for wideband radio designs operating in the 17.7 GHz to 55 GHz RF
range.

Signed-off-by: George Mois <[email protected]>
Make sure the ADMV1355 driver is built.

Signed-off-by: George Mois <[email protected]>
Add device tree bindings for the ADMV1355 upconverter.

Signed-off-by: George Mois <[email protected]>
Add ADMV1355 devicetree for ZedBoard.

Signed-off-by: George Mois <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

LLM review

This series adds the ADMV1355 microwave upconverter IIO driver, its DT
binding, a Kconfig.adi imply, and a ZedBoard example devicetree.

Session: 36707494438

eaa815bdf024 - iio: frequency: admv1355: Add support

Switch/case ordering bug: build_llvm_x86_64 fails strict CI with
drivers/iio/frequency/admv1355.c:388:2: error: cannot jump from switch statement to this case label. In admv1355_read_raw(), guard(mutex)()
(a cleanup-attribute variable) is declared directly under
case IIO_CHAN_INFO_PROCESSED: in a switch that also has a default:
label. Jumping to default: bypasses construction of the guard variable,
which C disallows; clang errors on it (and separately warns about it as a
C23 extension). Reproduced locally with clang-19 using the CI flags, and
verified the fix (wrapping the case body in { }) removes both the error
and the C23-extension warning.

Everywhere else in the file, guard(mutex) is taken before entering a
switch, so this is the only instance of the bug.

CI warnings

The checkpatch/coccicheck warnings (macro argument reuse in
ADMV1355_REG_ENUM/ADMV1355_FILTER_ENUM, missing blank lines, mutex
comment, str_true_false() opportunities) are all non-strict/style-only;
the macro arguments are always plain identifiers with no side effects, so
the "argument reuse" warning is a false positive. Not fixed.

The dtc unit_address_vs_reg warnings on clock@0 in the new dts, and
the gcc_fanalyzer warning inside include/linux/cleanup.h, are
pre-existing patterns unrelated to this series (checked against other
zynq-zed*.dts files and the generic guard()/DEFINE_CLASS macro).

Verification data

Datasheet admv1355.md (docling-converted, /tmp/docling.1pa) was used to
verify: the temperature-sensor equation and ADC register sequence in
admv1355_read_temp() against datasheet Equation 3 and the "ADC
Configuration" procedure (register addresses/values match 1:1), and the LO
×4/×3/×1 tunable-filter lookup tables against Table 17 and the
REG0800/0801/0802 bit-field descriptions (all band boundaries and register
codes match exactly). No datasheet-correctness issues found.

make dt_binding_check for adi,admv1355.yaml passes with no errors, and
the example DT builds. The new zynq-zed-adv7511-admv1355.dts is not added
to arch/arm/boot/dts/xilinx/Makefile's dtb-y list, but this matches the
established convention for ADI board dts files in this tree (only upstream
boards are listed there; ADI board dts files are built directly by CI).

Suggested patches

  • 0001-fixup-iio-frequency-admv1355-Add-support.patch (eaa815bdf024) —
    wraps the IIO_CHAN_INFO_PROCESSED case body in braces in
    admv1355_read_raw() to fix the clang build failure.

Apply with:

cd path/to/repository
export GITHUB_TOKEN=ghp_***
apply-patches --repo=analogdevicesinc/linux 36707494438
Install instructions

The following one-liner installs the script if not present already:

curl -fSsL "https://raw.githubusercontent.com/analogdevicesinc/doctools/refs/heads/main/ci/scripts/apply-patches.sh"      -o ~/.local/bin/apply-patches.sh &&   grep -q "/apply-patches.sh" ~/.bashrc || echo "source ~/.local/bin/apply-patches.sh" >> $_ ; . $_

More information at AI Usage.

@nunojsa

nunojsa commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

Hey @danmois, so this is going to be a fun one. For starters this looks to be very upstreamable so I hope that to be the ultimate goal (naturally without the clocking scale out of tree thingy).

Having said the above, all the custom attributes need to have a proper justification for why we need them and have to be documented in Documentation/ABI/testing. For the binary attrs consider using:

https://elixir.bootlin.com/linux/v7.3-rc5/source/drivers/base/firmware_loader/sysfs_upload.c#L294

IIRC @rodrigo455 also used it for loading some metadata to a DDS driver in some operating mode so there's precedence for this kind of stuff.

Last but not least, the driver has 2k+ LOC, consider splitting it into more logical features so it makes it easier to review each patch

ADMV1355_DSAI_MSK, admv1355_dsa_iq_items);
ADMV1355_REG_ENUM(dsaq, ADMV1355_REG_IF_GAIN,
ADMV1355_DSAQ_MSK, admv1355_dsa_iq_items);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have merged recently the support to hierarchical channels, so that mode/profile based channels can be a "child/sub" channel of a top-level one. That could help here when trying to set "hardwaregain" in different channels that could be part of a single "(in|out)_altvoltage" channel.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants