Skip to content

Commit 84c5641

Browse files
committed
fix(adrv937x): wire jesd_rx_clk + jesd_tx_clk into ad9371-phy clocks
After the GPIO fix (commit b095aaf) the Mykonos probe and JESD204 link-bring-up now progress past the earlier ``RESET Failed`` / -ENODEV gates on bq — the FSM reaches ``link_running`` — but then fails in ``opt_post_running_stage`` with -EFAULT and rolls back into a retry loop. Root cause: the AD9371 driver's post-running callback reaches into the ``jesd_rx_clk`` / ``jesd_tx_clk`` clocks on its own node (for lane-rate / post-link-up verification); if those refs aren't present the callback dereferences NULL and returns -EFAULT. Add them to the phy node's ``clocks`` / ``clock-names`` to match the Kuiper reference DT: clocks = <&axi_ad9371_rx_jesd>, <&axi_ad9371_tx_jesd>, <&clk0_ad9528 13>, <&clk0_ad9528 1>, <&clk0_ad9528 12>, <&clk0_ad9528 3>; clock-names = "jesd_rx_clk", "jesd_tx_clk", "dev_clk", "fmc_clk", "sysref_dev_clk", "sysref_fmc_clk"; The obs-path JESD clock (``jesd_rx_os_clk``) + the observation receiver's jesd204-inputs/link-id are still not emitted — deferred to a follow-up if the driver needs them. The AD9371 reference also includes them; skipping here buys a minimal-diff iteration. Fixture regenerated from the new builder output. 449 unit tests still pass.
1 parent b095aaf commit 84c5641

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

adidt/xsa/builders/adrv937x.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,20 @@ def build_model(
344344
reset_gpio=trx_reset_gpio,
345345
sysref_req_gpio=trx_sysref_req_gpio,
346346
)
347+
# AD9371 clocks: the Mykonos driver's
348+
# ``opt_post_running_stage`` callback reaches into the JESD204
349+
# RX/TX AXI clocks (``jesd_rx_clk``, ``jesd_tx_clk``) to verify
350+
# link state, and fails with -EFAULT if they aren't listed here.
351+
# Match the working Kuiper DT's clock ordering: JESD clocks
352+
# first (1-cell phandles to the axi-jesd204 nodes), then the
353+
# AD9528 output channels with explicit indices.
347354
trx_clocks_value = (
348-
"<&clk0_ad9528 13>, <&clk0_ad9528 1>, <&clk0_ad9528 12>, <&clk0_ad9528 3>"
355+
f"<&{rx_jesd_label}>, <&{tx_jesd_label}>, "
356+
"<&clk0_ad9528 13>, <&clk0_ad9528 1>, "
357+
"<&clk0_ad9528 12>, <&clk0_ad9528 3>"
349358
)
350359
trx_clock_names_value = (
360+
'"jesd_rx_clk", "jesd_tx_clk", '
351361
'"dev_clk", "fmc_clk", "sysref_dev_clk", "sysref_fmc_clk"'
352362
)
353363
trx_link_ids_value = f"{rx_link_id} {tx_link_id}"

test/devices/fixtures/adrv9371_zc706_xsa_reference.dts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,8 @@
252252
jesd204-top-device = <0>;
253253
jesd204-device;
254254
reg = <1>;
255-
clocks = <&clk0_ad9528 13>, <&clk0_ad9528 1>, <&clk0_ad9528 12>, <&clk0_ad9528 3>;
256-
clock-names = "dev_clk", "fmc_clk", "sysref_dev_clk", "sysref_fmc_clk";
255+
clocks = <&axi_ad9371_rx_jesd_rx_axi>, <&axi_ad9371_tx_jesd_tx_axi>, <&clk0_ad9528 13>, <&clk0_ad9528 1>, <&clk0_ad9528 12>, <&clk0_ad9528 3>;
256+
clock-names = "jesd_rx_clk", "jesd_tx_clk", "dev_clk", "fmc_clk", "sysref_dev_clk", "sysref_fmc_clk";
257257
reset-gpios = <&gpio0 106 0>;
258258
sysref-req-gpios = <&gpio0 112 0>;
259259
jesd204-link-ids = <1 0>;

0 commit comments

Comments
 (0)