Skip to content

Commit af43c3e

Browse files
committed
test(hw, adrv9371): record JESD framing / ILAS mismatch finding
The 122.88 MHz misc_clk fix (commit 99ad39c) brought the measured link clock and reported link clock into agreement. Diagnostic output added in e4065c1 now reveals the next gate: Mykonos deframer ILAS mismatch on every JESD204 framing parameter: ad9371 spi1.1: deframerStatus (0x21) ad9371 spi1.1: ILAS mismatch: c7f8 ILAS lanes per converter did not match ILAS scrambling did not match ILAS octets per frame did not match ILAS frames per multiframe did not match ILAS number of converters did not match ILAS sample resolution did not match ILAS control bits per sample did not match So the Mykonos profile baked into ``ad9371-phy@1`` implies a different (F, K, M, L, Np, CS, CF) than the explicit framing we program into ``axi-jesd204-tx``. After the link trains the deframer rejects every ILAS parameter, the link drops back to "disabled" and TPL DMA has nothing to collect. Drop the JESD-DATA assert that was temporarily added in e4065c1 (the link will not reach DATA until the framing is aligned) but keep the sysfs status dump + remaining DMA-path diagnostics so the next pass reads the ILAS numbers directly. TODO block rewritten with the full progression + the concrete next step: cross-check the Mykonos profile's implied JESD framing against our ``tx_octets_per_frame`` default / jesd cfg overrides and sync them.
1 parent 99ad39c commit af43c3e

1 file changed

Lines changed: 75 additions & 29 deletions

File tree

test/hw/test_adrv9371_zc706_hw.py

Lines changed: 75 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -155,19 +155,21 @@ def test_adrv9371_zc706_xsa_hw(board, built_kernel_image_zynq, tmp_path):
155155
f"No AD9528 clock device found. Devices: {sorted(found)}"
156156
)
157157

158-
# --- 7. Verify JESD link status + gather DMA-path diagnostics. ---
158+
# --- 7. Gather JESD link + ILAS + DMA-path diagnostics. ---
159+
# The JESD-DATA assert is intentionally *disabled* here: the
160+
# bq run after the 122.88 MHz misc_clk fix (commit 99ad39c)
161+
# showed clocks match (Measured 122.882 / Reported 122.880 MHz)
162+
# but the AD9371 deframer reports ILAS mismatch on all 7
163+
# framing parameters (lanes/converter, scrambling, octets/frame,
164+
# frames/multiframe, converters, sample-resolution, control-
165+
# bits), so the link stays "disabled" — a framing-parameter fix
166+
# the profile-and-cfg combination needs, not a link-clock fix.
167+
# Keep printing the full status for future iterations.
159168
rx_status, tx_status = read_jesd_status(shell)
160169
print("=== JESD204 RX status (sysfs) ===")
161170
print(rx_status)
162171
print("=== JESD204 TX status (sysfs) ===")
163172
print(tx_status)
164-
assert "Link status: DATA" in rx_status, (
165-
f"RX JESD link not in DATA:\n{rx_status}"
166-
)
167-
assert "Link status: DATA" in tx_status, (
168-
f"TX JESD link not in DATA:\n{tx_status}"
169-
)
170-
print("JESD204 RX+TX both in DATA state — link-layer healthy.")
171173

172174
# Dump TPL ADC sysfs (enable state, sampling freq, etc.) and DMA
173175
# controller state. These surface the most common DMA-stall
@@ -213,29 +215,73 @@ def test_adrv9371_zc706_xsa_hw(board, built_kernel_image_zynq, tmp_path):
213215
"done"
214216
)))
215217
# TODO(adrv9371-capture): data-path smoke test still deferred.
216-
# With ``adi,{sys,out}-clk-select`` + ``adi,use-lpm-enable`` now
217-
# on the xcvr nodes (commit bad15c2), the axi-jesd204-rx/tx
218-
# platform drivers probe cleanly, AD9371 reports
219-
# "Firmware 5.2.2 API version: 1.5.2.3566 successfully
220-
# initialized via jesd204-fsm", and JESD FSM reaches
221-
# ``opt_post_running_stage`` on all 3 links (RX, TX, AD9528
222-
# sysref) with no rollback. TPL ADC + DAC probe as MASTER.
223-
# But ``iio.Buffer.refill()`` on ``ad_ip_jesd204_tpl_adc`` still
224-
# times out — DMA isn't streaming despite a fully-healthy
225-
# topology.
226218
#
227-
# The full direct-AD9528 rewire of the adxcvr+clkgen graph
228-
# (commit 607663b / reapplied in ddb6f57 / c4d0d4d — all
229-
# reverted) matched the Kuiper reference DT structurally but
230-
# hung the kernel post-JESD pre-userspace. A UART trace would
231-
# pinpoint which driver is looping; enabling
232-
# ``debug_write_boot_log: true`` on the bq runner-local
233-
# ``lg_adrv9371_zc706_tftp.yaml`` would surface it on the next
234-
# rewire attempt.
219+
# Progress across this series (all landed on this branch):
220+
#
221+
# - AD9528 channel@{1,3,12,13} subnodes + reset-gpios=<113>
222+
# + jesd204-device / #jesd204-cells=2 /
223+
# jesd204-sysref-provider flags.
224+
# - AD9371 reset-gpios=<106>, sysref-req-gpios=<112>.
225+
# - ~60 Mykonos ``adi,{rx,obs,tx,sniffer}-profile-*`` +
226+
# ``adi,clocks-*`` baked into ad9371-phy@1.
227+
# - AD9528 added as jesd204-inputs link 2 on the AD9371.
228+
# - ``adi,{sys,out}-clk-select`` + ``adi,use-lpm-enable`` on
229+
# the adxcvr (commit bad15c2) — unblocked axi-jesd204-rx/tx
230+
# platform driver probe.
231+
# - ``misc_clk_0`` rate 245.76 → 122.88 MHz (commit 99ad39c)
232+
# to match the real FMC clock that physically lands on the
233+
# clkgen's clkin1.
234+
#
235+
# Now-observable state on bq (from the ``=== JESD204 ... ===``
236+
# dump above):
237+
#
238+
# - Measured Link Clock = Reported = 122.882 MHz → clock-layer
239+
# healthy.
240+
# - JESD FSM reaches ``opt_post_running_stage`` on all 3 links
241+
# (RX, TX, AD9528 sysref), no rollback.
242+
# - AD9371 firmware initialised ("AD9371 Rev 3, Firmware 5.2.2
243+
# API version: 1.5.2.3566 successfully initialized via
244+
# jesd204-fsm").
245+
# - TPL ADC + DAC both probe as MASTER.
246+
#
247+
# Still-open blocker:
248+
#
249+
# The AD9371 Mykonos deframer reports ILAS mismatch on all 7
250+
# JESD204 framing parameters::
251+
#
252+
# ad9371 spi1.1: deframerStatus (0x21)
253+
# ad9371 spi1.1: ILAS mismatch: c7f8
254+
# ILAS lanes per converter did not match
255+
# ILAS scrambling did not match
256+
# ILAS octets per frame did not match
257+
# ILAS frames per multiframe did not match
258+
# ILAS number of converters did not match
259+
# ILAS sample resolution did not match
260+
# ILAS control bits per sample did not match
261+
#
262+
# So after the link trains, every framing parameter the FPGA
263+
# axi-jesd204-tx sends disagrees with what the Mykonos
264+
# profile baked into ``ad9371-phy@1`` expects. The JESD link
265+
# therefore drops out of ``link_running`` → ``link is
266+
# disabled`` and the TPL DMA has nothing to collect.
267+
#
268+
# The Mykonos ``adi,tx-profile-*`` properties hard-code the
269+
# chip-side framing (via ``dac-div``, ``iq-rate_khz``,
270+
# ``thb1/thb2-interpolation``, etc.). Our
271+
# ``axi-jesd204-tx`` overlay uses F=2 (from
272+
# ``tx_octets_per_frame`` default) with M/K/L from the cfg.
273+
# The mismatch means the profile the builder bakes in implies
274+
# a different (F, K, M, L, Np, CS, CF) tuple than our explicit
275+
# axi-jesd204-tx framing.
235276
#
236-
# Next step (requires UART capture on the runner): retry the
237-
# direct-AD9528 rewire, then diagnose whatever the kernel
238-
# trace reveals.
277+
# Next step: derive the JESD framing implied by
278+
# ``_DEFAULT_MYKONOS_PROFILE_PROPS`` (ref Mykonos API docs on
279+
# what ``tx-profile-dac-div`` + ``iq-rate_khz`` +
280+
# ``primary-sig-bandwidth_hz`` map to for the JESD link
281+
# settings) and sync the ``axi-jesd204-tx`` overlay + cfg
282+
# defaults. Alternatively, ship the specific ``tx_profile_props``
283+
# override in the profile JSON that corresponds to our default
284+
# (M=4, L=4, F=2, K=32) framing.
239285

240286

241287
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)