iio: logic: Add ADSY1100 Apollo SOM Nyx RFFE controller - #3331
iio: logic: Add ADSY1100 Apollo SOM Nyx RFFE controller#3331mhennerich wants to merge 7 commits into
Conversation
cf2d539 to
5ec39d0
Compare
LLM reviewThis series adds the run: 26163731542
|
|
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>
5ec39d0 to
2a3f496
Compare
|
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. |
| device_get_named_child_node(dev, group_name); | ||
| struct fwnode_handle *child; | ||
| int ret; | ||
|
|
There was a problem hiding this comment.
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
There was a problem hiding this comment.
ok - that's easy
| fwnode_for_each_child_node(group, child) { | ||
| u32 reg; | ||
|
|
||
| ret = fwnode_property_read_u32(child, "reg", ®); |
There was a problem hiding this comment.
fwnode_for_each_child_node_scoped()
There was a problem hiding this comment.
fwnode_for_each_child_node_scoped() — this macro doesn't exist in the 6.12-based tree, shall I cherry-pick it?
There was a problem hiding this comment.
added the missing fwnode_for_each_child_node_scoped() as a separate commit
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>
63bb808 to
038cadd
Compare
LLM reviewThis 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 run: 31609484770 Previous review round follow-upBoth issues raised in the previous AI review (fractional-dB The two human review comments (declare
|
Summary
adsy1100_nyxfor 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 viaoutput-channels(TX) /input-channels(RX) subnodes.dt-bindings/iio/logic/adi,adsy1100-nyx.hheader with the filter-mode enum macros.vu11p-ad9084-vpx-adsy1100-nyx.dtsowires 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 dormantadsy1100_nyxstub node.DEVICE_PROFILE_NAME.adi_zynqmp_adsy1100_defconfigenablesCONFIG_ADSY1100_NYX=y.Test plan
make ARCH=arm64 adi_zynqmp_adsy1100_defconfigkeepsCONFIG_ADSY1100_NYX=ydrivers/iio/logic/adsy1100_nyx.o)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 withdtschemaavailable — not run locally)iio:device*exposes 4 IIO_VOLTAGE input + 4 output channels withhardwaregain,filter_mode/filter_mode_available,powerdown, and (RX only)bypass_amplifier_enattributes