Skip to content

Commit 945b954

Browse files
committed
fix(ad9081): mode-table M/F now match the jesd204b mode-10/9 reality
The ADC (jtx) mode 10 jesd204b and DAC (jrx) mode 9 jesd204b entries in ``_AD9081_{RX,TX}_MODE_TABLE`` were set to ``M=4``, but the AD9081 API mode table and the stock Kuiper ``zynqmp-zcu102-rev10-ad9081-m8-l4`` reference DTS both set ``M=8`` for those modes. The XSA path emits ``converters-per-device = <8>`` because it sources framing straight from the pyadi-jif solver (which asks for ``M=8, L=4`` and returns mode 10/9) — so the XSA hw test works. The System-API path goes through ``ConverterSide.set_jesd204_mode`` which filled framing from our mode table, so ``converters-per-device`` came out ``<4>``. On hardware the kernel AD9081 driver then programmed the TPL + ADXCVR for fewer converters than the part's jtx actually frames, and the JESD PLL never locked ("ad9081 ...: JESD PLL is not locked. Failed to initialize: -24"). Correct both table entries to ``M=8, L=4, F=4``. RX mode 10's ``F=2`` was also wrong — the reference DTS and the XSA solver both use ``octets-per-frame = <4>``, so the ADC's 4-octet framing now matches. Unit tests still pass (no fixed-M=4 expectation anywhere).
1 parent 032cc1e commit 945b954

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

adidt/devices/converters/ad9081.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,23 @@
1515

1616
_AD9081_RX_MODE_TABLE: dict[tuple[int, str] | int, dict[str, int]] = {
1717
(1, "jesd204c"): {"M": 2, "L": 1, "F": 4, "K": 32, "Np": 16, "S": 1},
18-
(10, "jesd204b"): {"M": 4, "L": 4, "F": 2, "K": 32, "Np": 16, "S": 1},
18+
# JTX mode 10 jesd204b on AD9081-FMCA-EBZ/ZCU102 uses M=8 (per the
19+
# AD9081 API mode table and the stock Kuiper
20+
# ``zynqmp-zcu102-rev10-ad9081-m8-l4`` reference DTS: the
21+
# ``adi,rx-adcs`` block emits ``converters-per-device = <8>``).
22+
# Using M=4 here breaks the kernel's JESD PLL lock step
23+
# ("ad9081 ...: JESD PLL is not locked.") because the TPL + xcvr
24+
# are programmed for fewer converters than the part's jtx actually
25+
# frames.
26+
(10, "jesd204b"): {"M": 8, "L": 4, "F": 4, "K": 32, "Np": 16, "S": 1},
1927
(18, "jesd204c"): {"M": 4, "L": 8, "F": 1, "K": 32, "Np": 16, "S": 1},
2028
}
2129

2230
_AD9081_TX_MODE_TABLE: dict[tuple[int, str] | int, dict[str, int]] = {
2331
(1, "jesd204c"): {"M": 2, "L": 1, "F": 4, "K": 32, "Np": 16, "S": 1},
24-
(9, "jesd204b"): {"M": 4, "L": 4, "F": 4, "K": 32, "Np": 16, "S": 1},
32+
# JRX mode 9 jesd204b on the same FMC: M=8 per the AD9081 API
33+
# mode table and the reference ``adi,tx-dacs`` block (F=4).
34+
(9, "jesd204b"): {"M": 8, "L": 4, "F": 4, "K": 32, "Np": 16, "S": 1},
2535
(17, "jesd204c"): {"M": 4, "L": 8, "F": 2, "K": 32, "Np": 16, "S": 1},
2636
}
2737

0 commit comments

Comments
 (0)