Skip to content

iio: logic: Add ADSY1100 Apollo SOM Nyx RFFE controller - #3331

Open
mhennerich wants to merge 7 commits into
mainfrom
staging/xlnx/adsy-1100-Nyx-RFPC-support
Open

iio: logic: Add ADSY1100 Apollo SOM Nyx RFFE controller#3331
mhennerich wants to merge 7 commits into
mainfrom
staging/xlnx/adsy-1100-Nyx-RFPC-support

Conversation

@mhennerich

Copy link
Copy Markdown
Contributor

Summary

  • New IIO driver adsy1100_nyx for the GPIO-driven RF front-end on the Analog Devices ADSY1100 Apollo SOM "Nyx" daughter board: per-channel DSA (0 .. -31.5 dB / 0.5 dB step), filter band selection (low_band / thru / x_band / ku_band), powerdown, and per-RX LNA bypass. Per-channel power-on defaults can be provided via output-channels (TX) / input-channels (RX) subnodes.
  • DT binding schema + matching dt-bindings/iio/logic/adi,adsy1100-nyx.h header with the filter-mode enum macros.
  • Overlay vu11p-ad9084-vpx-adsy1100-nyx.dtso wires up the 76 control GPIOs and includes a per-channel default template (values matching the driver built-in defaults: 0 dB / THRU / channel enabled / RX LNA bypassed). Base overlay adds a dormant adsy1100_nyx stub node.
  • AD9084 device profile (.bin + .json) referenced by the overlay via DEVICE_PROFILE_NAME.
  • adi_zynqmp_adsy1100_defconfig enables CONFIG_ADSY1100_NYX=y.

Test plan

  • make ARCH=arm64 adi_zynqmp_adsy1100_defconfig keeps CONFIG_ADSY1100_NYX=y
  • Driver builds clean for arm64 (drivers/iio/logic/adsy1100_nyx.o)
  • Overlay compiles to dtbo (vu11p-ad9084-vpx-adsy1100-nyx.dtbo)
  • make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/iio/logic/adi,adsy1100-nyx.yaml (run on a host with dtschema available — not run locally)
  • Boot on a vu11p-ad9084-vpx + Nyx target: verify iio:device* exposes 4 IIO_VOLTAGE input + 4 output channels with hardwaregain, filter_mode/filter_mode_available, powerdown, and (RX only) bypass_amplifier_en attributes
  • Toggle each control via sysfs and confirm corresponding GPIO transitions
  • Verify probe-time defaults supplied through the DT subnodes are reflected in the initial sysfs values

@mhennerich
mhennerich force-pushed the staging/xlnx/adsy-1100-Nyx-RFPC-support branch 2 times, most recently from cf2d539 to 5ec39d0 Compare May 20, 2026 08:40
@gastmaier gastmaier added the llm review Request a review from a LLM Reviewer label May 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

LLM review

This series adds the adi,adsy1100-nyx GPIO-driven RF front-end controller driver for the Analog Devices ADSY1100 Apollo SOM "Nyx" daughter board: DT binding, IIO platform driver, device-tree overlay, AD9084 device profile firmware, and defconfig entry.

run: 26163731542


e871d3e71 - iio: logic: Add ADSY1100 Nyx RF front-end driver

Write-raw bug: fractional attenuations rejected for |val| >= 1

The write_raw handler incorrectly rejects any attenuation value with a non-zero integer part and a 0.5 dB fraction (e.g. -1.5 dB, -2.5 dB, ..., -31.5 dB).

The IIO core (__iio_str_to_fixpoint in drivers/iio/industrialio-core.c:884) encodes negative fractional dB values as val = -N, val2 = +500000 — the fractional component always carries the magnitude of the sub-integer portion, not its sign (the only exception is -0.5 dB where val=0, val2=-500000).

The current guard:

if (val > 0 || val2 > 0)   /* line 187 */
    return -EINVAL;

rejects -1.5 dB (val=-1, val2=+500000) because val2 > 0, so only -0.5 dB and integer dB steps are accepted. The DSA can encode half-dB steps (0..63 in units of 0.5 dB) so 31 of the 63 non-zero steps are unreachable from sysfs.

The fix follows the pattern used by drivers/iio/frequency/admfm2000.c:

if (val > 0 || (val == 0 && val2 > 0))
    return -EINVAL;

if (val < 0)
    millidB = (-val) * 1000 + val2 / 1000;
else
    millidB = (-val2) / 1000;

869b4c274 - dt-bindings: iio: logic: Add ADSY1100 Nyx RFFE controller

Wrong header path in description text

Lines 96 and 151 of the YAML binding reference:

<dt-bindings/iio/adi,adsy1100-nyx.h>

The header actually lives at include/dt-bindings/iio/logic/adi,adsy1100-nyx.h. The #include in the binding example (line 179) is already correct with the logic/ subdirectory; only the description strings are wrong.

CI warnings

The checkpatch warning "added, moved or deleted file(s), does MAINTAINERS need updating?" fires for the three new-file commits. No MAINTAINERS entry exists for drivers/iio/logic/adsy1100_nyx.c or the associated binding.

The "DT binding docs and includes should be a separate patch" warning is a false positive caused by running checkpatch on the combined series output; the binding commit (869b4c274) correctly contains only the YAML and header.

Verification data

  • Compiled drivers/iio/logic/adsy1100_nyx.o for arm64 with gcc_aarch64 — clean.
  • Validated adi,adsy1100-nyx.yaml with make dt_binding_check (dtschema 2024.9) — passes.
  • Traced __iio_str_to_fixpoint() in drivers/iio/industrialio-core.c:884 to confirm IIO encoding of negative fractional dB.
  • Cross-checked correct write_raw pattern against drivers/iio/frequency/admfm2000.c.
  • Confirmed 76 GPIO entries in the overlay match ADSY1100_NYX_GPIO_COUNT.

Suggested patches

Apply the suggested patches with:

cd path/to/repository
export GITHUB_TOKEN=ghp_***
apply-patches --repo=analogdevicesinc/linux 26163731542
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 Jun 1, 2026

Copy link
Copy Markdown
Collaborator

AI seems to have a point in the raised concerns

Add the YAML schema for the Analog Devices ADSY1100 Apollo SOM "Nyx"
RF front-end controller (drivers/iio/logic/adsy1100_nyx.c). The
binding describes the 76-entry out-gpios array and the optional
per-channel power-on defaults supplied through the output-channels
(TX) and input-channels (RX) container nodes: adi,attenuation-millidb,
adi,filter-mode, adi,powerdown, and adi,amplifier-enable (RX only).

Filter-mode enumerations are exported through the new header
include/dt-bindings/iio/logic/adi,adsy1100-nyx.h.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
@mhennerich
mhennerich force-pushed the staging/xlnx/adsy-1100-Nyx-RFPC-support branch from 5ec39d0 to 2a3f496 Compare June 24, 2026 15:05
@mhennerich

Copy link
Copy Markdown
Contributor Author

pushed a new version which addresses the AI raised issues. There is also another fix for axi-ion-trig that fixes an issue found during CI.

@nunojsa nunojsa left a comment

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.

Just minor things

device_get_named_child_node(dev, group_name);
struct fwnode_handle *child;
int ret;

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.

This one of the places where the declaring all of things in the beginning is not enforced. With the cleanup stuff we want to declare right before the place we check it. So. moving struct fwnode_handle *group __free(fwnode_handle) = ... before the below check

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok - that's easy

fwnode_for_each_child_node(group, child) {
u32 reg;

ret = fwnode_property_read_u32(child, "reg", &reg);

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.

fwnode_for_each_child_node_scoped()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fwnode_for_each_child_node_scoped() — this macro doesn't exist in the 6.12-based tree, shall I cherry-pick it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added the missing fwnode_for_each_child_node_scoped() as a separate commit

jefflessard and others added 6 commits August 12, 2026 11:27
Add scoped versions of fwnode child node iterators that automatically
handle reference counting cleanup using the __free() attribute:

- fwnode_for_each_child_node_scoped()
- fwnode_for_each_available_child_node_scoped()

These macros follow the same pattern as existing scoped iterators in the
kernel, ensuring fwnode references are automatically released when the
iterator variable goes out of scope. This prevents resource leaks and
eliminates the need for manual cleanup in error paths.

The implementation mirrors the non-scoped variants but uses
__free(fwnode_handle) for automatic resource management, providing a
safer and more convenient interface for drivers iterating over firmware
node children.

Signed-off-by: Jean-François Lessard <jefflessard3@gmail.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
(cherry picked from commit 448097b)
Add an IIO platform driver that drives the GPIO-controlled RF
front-end on the Analog Devices ADSY1100 Apollo SOM "Nyx" daughter
board. The driver consumes the 76-entry out-gpios array and exposes
high-level per-channel controls instead of the raw bit GPIOs:

  - hardwaregain: 0 .. -31.5 dB digital step attenuator (0.5 dB step)
  - filter_mode:  low_band / thru / x_band / ku_band
  - powerdown:    enable/disable each RF channel
  - bypass_amplifier_en (RX only): bypass the receive LNA

Channels are presented as IIO_VOLTAGE in/out indices 0..3 for the
four RX and four TX paths.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Add a dedicated device-tree overlay that instantiates the new
adi,adsy1100-nyx high-level RF front-end driver on top of the
vu11p-ad9084-vpx-revb base overlay. The dormant generic
one-bit-adc-dac stub provided by the base overlay is left disabled,
and a fresh node is added under vu11p_fpga_region wiring up the 76
control GPIOs that drive the four RX and four TX paths on the Nyx
daughter board.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Add the AD9084 device profile (.bin + matching .json descriptor)
referenced by the vu11p-ad9084-vpx-adsy1100-nyx overlay via
DEVICE_PROFILE_NAME.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Enable CONFIG_ADSY1100_NYX so the high-level GPIO-driven RF
front-end controller on the ADSY1100 Apollo SOM "Nyx" daughter board
is available out of the box.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Fixes:
ERROR: modpost: "__devm_regmap_init_mmio_clk" [drivers/iio/logic/axi-aion-trig.ko] undefined!

Fixes: ec391b4 ("iio: logic: axi-aion-trig: New driver for the AXI AION HDL IP Core")

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
@mhennerich
mhennerich force-pushed the staging/xlnx/adsy-1100-Nyx-RFPC-support branch from 63bb808 to 038cadd Compare August 12, 2026 12:53
@mhennerich mhennerich added llm review Request a review from a LLM Reviewer and removed llm review Request a review from a LLM Reviewer labels Aug 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

LLM review

This series is a re-spin of the ADSY1100 Apollo SOM "Nyx" RF front-end series (DT binding, IIO driver, DT overlay, AD9084 firmware profile, defconfig entry), plus an unrelated one-line Kconfig fix for axi-aion-trig, and a cherry-picked upstream helper macro.

run: 31609484770

Previous review round follow-up

Both issues raised in the previous AI review (fractional-dB write_raw rejection, wrong header include path in the binding description) are fixed in 042e072cf89b / e5a9dcc48b8c. I re-traced the hardwaregain encode/decode by hand (0.5 dB step, val/val2 signs) and it round-trips correctly for the full 0..-31.5 dB range now.

The two human review comments (declare group right before its use-check; use a scoped fwnode iterator) are also addressed. Since fwnode_for_each_child_node_scoped() didn't exist in this 6.12-based tree, it was cherry-picked separately in e8b4b3bea7f3 (matches upstream 448097bbd383).

1b46ef6327bf - axi-aion-trig: Select REGMAP_MMIO

Confirmed by building: multi_v7_defconfig + AXI_AION_TRIG=m, full vmlinux+modules build for arm now links axi-aion-trig.ko cleanly (__devm_regmap_init_mmio_clk resolves). Without this patch the module fails to link, matching the CI failure.

e5a9dcc48b8c - dt-bindings: minor doc nit

include/dt-bindings/iio/logic/adi,adsy1100-nyx.h still describes the adi,filter-mode property as being used "with the per-channel dac@N / adc@N subnodes", but the binding (and the driver/overlay) actually use channel@N subnodes under output-channels/input-channels. See suggested fixup.

079cb1d01064 - overlay base revision mismatch in commit message

The commit log says the new overlay builds "on top of the vu11p-ad9084-vpx-revb base overlay", but both the new file's #include "vu11p-ad9084-vpx-reva.dtso" and the new adsy1100_nyx label added to the base file are in vu11p-ad9084-vpx-reva.dtso, not revb.dtso. Purely a commit-message inaccuracy (the code is internally consistent), not fixed with a patch.

CI/tooling gap

The overlay (vu11p-ad9084-vpx-adsy1100-nyx.dtso) is not exercised by the CI compile_devicetree step: that step's file filter only matches names ending in the literal string dts (grep dts$), which excludes *.dtso files. I manually added a dtb-y line for it and compiled it with dtc for arm64 — it builds cleanly and the decompiled output shows the 76-entry out-gpios and the channel@N subnodes resolving correctly through the &adsy1100_nyx label — but this means overlay syntax errors in this series (and likely others) would not be caught by CI today. Worth raising separately with the CI maintainers, no code change suggested here.

Verification data

  • Datasheet adsy1100.pdf was located via the ADI PDF sitemap and fetched pre-converted as adsy1100.md (docling), confirming Tx DSA range 0..31.5 dB in 0.5 dB steps and the "No Filter" / "X Band (8-12GHz)" / "Ku Band (12-18GHz)" RF paths, matching the driver's low_band/thru/x_band/ku_band model.
  • dt-doc-validate and make dt_binding_check DT_SCHEMA_FILES=...adi,adsy1100-nyx.yaml both pass with no errors.
  • Built drivers/iio/logic/adsy1100_nyx.o for arm64 with W=1 and sparse (C=2): clean.
  • checkpatch.pl per-commit: only the expected "MAINTAINERS need updating?" warning on new-file commits and pre-existing-style macro-argument warnings on the cherry-picked property.h macros (same pattern as the existing device_for_each_child_node_scoped()).
  • Confirmed none of the smatch failures in the CI log (arch/arm/kernel/devtree.c, setup.c, drivers/base/power/qos.c, drivers/char/random.c, kernel/rcu/tree_plugin.h, ...) touch any file changed by this series — unrelated, pre-existing whole-tree noise from the build_gcc_arm job.

Suggested patches

Apply the suggested patches with:

cd path/to/repository
export GITHUB_TOKEN=ghp_***
apply-patches --repo=analogdevicesinc/linux 31609484770
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.

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

Labels

llm review Request a review from a LLM Reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants