Skip to content

Commit 83e3c7c

Browse files
committed
docs(sphinx): note merged-DTB IIO names + ADRV9009 ZC706 fixes
Two narrow Sphinx updates so future contributors don't have to rediscover the merged-DTB realities: * `xsa.rst` — generalise the "Hardware test note" beyond FMCDAQ2: spell out *why* sdtgen-built XSAs land different IIO names than Kuiper-built DTs (`cf_axi_adc` reads the IIO name from `of_node->name`). Call out the ADRV9009 ZC706 case where two IIO devices share the name `ad_ip_jesd204_tpl_adc` (RX + OBS) and tests need to disambiguate by `of_node` reg, plus the pyadi-iio `_rxadc = None` partial-init pattern. * `xsa_developer.rst` — add an "ADRV9009 ZC706 specifics" subsection documenting the two builder workarounds: `sampl_clk` on TPL cores (cf_axi_adc reads its rate to size the DMA buffer) and the `zc706`-only DMA-done IRQ override (`PCW_IRQ_F2P_MODE = REVERSE` in the XSA vs the DIRECT-mode SPIs the bitstream actually fires on).
1 parent 5d2ba98 commit 83e3c7c

2 files changed

Lines changed: 54 additions & 5 deletions

File tree

doc/source/xsa.rst

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -833,11 +833,33 @@ the parser implementation.
833833
Hardware test note
834834
~~~~~~~~~~~~~~~~~~
835835

836-
Some XSA-derived FMCDAQ2 designs expose tpl-core IIO names instead of legacy
837-
core names. Hardware tests therefore accept either set:
838-
839-
- legacy: ``axi-ad9680-hpc``, ``axi-ad9144-hpc``
840-
- tpl-core: ``ad_ip_jesd204_tpl_adc``, ``ad_ip_jesd204_tpl_dac``
836+
The Kuiper kernel's ``cf_axi_adc_core.c`` sets the IIO device name from
837+
``pdev->dev.of_node->name``, so the IIO name follows the DT *node-name*.
838+
Production Kuiper DTs spell the buffered ADC node ``axi-<chip>-rx-hpc``;
839+
sdtgen-built XSAs spell the same node ``ad_ip_jesd204_tpl_<adc|dac>``.
840+
Hardware tests therefore accept either set, e.g.:
841+
842+
- FMCDAQ2: ``axi-ad9680-hpc`` / ``axi-ad9144-hpc`` *or*
843+
``ad_ip_jesd204_tpl_adc`` / ``ad_ip_jesd204_tpl_dac``
844+
- ADRV9009 ZC706: ``axi-adrv9009-rx-hpc`` /
845+
``axi-adrv9009-rx-obs-hpc`` *or* both ADC frontends as
846+
``ad_ip_jesd204_tpl_adc``
847+
848+
ADRV9009 ZC706 in particular binds two IIO devices both named
849+
``ad_ip_jesd204_tpl_adc`` — RX (``@44a00000``, via ``cf_axi_adc``) and
850+
OBS (``@44a08000``, via ``ad_adc.c`` matching
851+
``adi,axi-adrv9009-obs-1.0``). ``ctx.find_device(name)`` returns
852+
whichever probed first. Tests that need the RX path (the one Talise
853+
``radio_on`` actually streams) disambiguate by ``of_node`` reg
854+
address; ``test/hw/xsa/test_adrv9009_zc706_overlay.py::test_dma_loopback``
855+
shows the pattern.
856+
857+
``pyadi-iio`` looks up the buffered ADC by the production name
858+
(``axi-adrv9009-rx-hpc``). On the merged DTB that name is absent, so
859+
``adi.adrv9009(uri=...)`` returns successfully but with
860+
``_rxadc = None``. Tests that drop down to ``pyadi-iio`` therefore
861+
need to gate on ``getattr(dev, "_rxadc", None) is not None`` and skip
862+
the high-level path when the merged-DTB names are in play.
841863

842864
Profile validation
843865
~~~~~~~~~~~~~~~~~~

doc/source/xsa_developer.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,33 @@ Template catalogue
525525
* - ``axi_ad9081.tmpl``
526526
- AXI AD9081 MXFE PL core overlay.
527527

528+
ADRV9009 ZC706 specifics
529+
~~~~~~~~~~~~~~~~~~~~~~~~
530+
531+
The ADRV9009 builder applies two ZC706-only fixes to make
532+
buffered RX capture work on the sdtgen-merged DTB:
533+
534+
1. **``sampl_clk`` on TPL cores.** ``cf_axi_adc`` calls
535+
``clk_get_rate(sampl_clk)`` to size the DMA buffer. Without it,
536+
the driver still binds and the JESD link reaches ``DATA``, but
537+
``iio_buffer_refill`` never triggers and capture hangs. The
538+
builder wires ``sampl_clk`` in two passes: pass 1 points at the
539+
PS reference (``clkc``); pass 2 redirects to the ADRV9009 chip's
540+
per-direction clock-provider outputs (``trx0_adrv9009 0/1/2``)
541+
once the phy label is resolvable.
542+
543+
2. **DMA-done IRQ override.** The Kuiper ZC706 ADRV9009 XSA
544+
declares ``PCW_IRQ_F2P_MODE = REVERSE`` on the PS, and sdtgen
545+
follows that — emitting DT cell 31 (SPI 63) for ``In13`` /
546+
``rx_dma``. The bitstream actually fires DMA-done on the
547+
*DIRECT*-mode SPIs the production
548+
``zynq-zc706-adv7511-adrv9009.dts`` uses (DT cells 57/56/55
549+
for rx/tx/rx-obs). With the sdtgen vectors,
550+
``/proc/interrupts`` shows zero counts during refill and capture
551+
stalls. The builder overrides ``interrupts`` on the rx / tx /
552+
rx-obs ``axi_dmac`` nodes for ``platform == "zc706"`` only;
553+
ZynqMP boards keep their sdtgen interrupts unchanged.
554+
528555
Context builders
529556
----------------
530557

0 commit comments

Comments
 (0)