Post Go back to editing

ADRV9029 on-chip DPD: `TrackingCalsEnableSet(TX_DPD)` silently declined; `DpdReset` returns "device in correct state (3)"

Thread Summary

The user encountered issues enabling on-chip DPD tracking on the ADRV9029 with a ZynqMP SoC, where DPD tracking was silently refused. The solution involved running TX_QEC_INIT at boot in internal mode and then at runtime, performing external path-delay calibration, a two-step DpdReset, and enabling tracking without re-running TX_QEC. This sequence resolved the issue, allowing DPD to fully adapt with Error Code 0 and climbing Iteration Count. The mainline 7.0.0.14 firmware was used, and the 5.1.0 DPD firmware was incompatible due to different image sizes.
AI Generated Content
Category: Software
Software Version: adrv9025 API 7.0.0.14, FW 7.0.0.11, Stream 9.4.0.1), Rev 176. adi-linux 6.12.y

## Setup

- **Device:** ADRV9029 (adrv9025 API 7.0.0.14, FW 7.0.0.11, Stream 9.4.0.1), Rev 176.
- **SoC / driver:** Xilinx ZynqMP, mainline-derived `adrv9025` Linux IIO driver (`drivers/iio/adc/adrv902x`), controlled from `/sys/bus/iio/devices/iio:deviceN` (`adrv9025-phy` = `spi0.0`).
- **Topology: on-chip (internal) DPD only.** The FPGA implements **only the Tx/deframer JESD204 path** (`DEFRAMER0_LINK_TX`, M=8 = 4 Tx × I/Q, L=4). **There is NO Rx or ORx AXI-JESD framer in the PL** — the ORx observation used by DPD stays entirely inside the ADRV9029. Profile = ADI **UC51 LinkSharing** (`ActiveUseCase.profile`), `ActiveUtilInit.profile` init cals.
- **RF path is proven good:** the Tx transmits a clean DVB-S2 (QPSK1/2, 30 Mbaud) carrier that an external demod (Newtec MDM6000) **locks with 0 errored frames**. Tx1 → 3-way splitter → ORx1 + demod. LO1 = 1350 MHz. Tx atten 0 dB, ORx atten 0 dB.

## Symptom

After a clean init + calibration sequence (all cals return rc=0), enabling DPD tracking is **silently declined** and `DpdReset` fails:

```
# echo 1 > out_voltage0_dpd_en # TrackingCalsEnableSet(ADI_ADRV9025_TRACK_TX1_DPD, ENABLE)
# cat out_voltage0_dpd_en
0 # <-- NOT enabled (TX_QEC and TX_LOL enable fine, only TX_DPD is refused)

# echo 1 > dpd_reset
kernel: adrv9025 spi0.0: adrv9025_phy_store, 408: failed with CpuCmdStatusWait() failed due to thrown CPU error. Is device in correct state for calling command? (3)
kernel: adrv9025 spi0.0: DPD reset diag: calError=0x10000 txDpdState[1..4]=0x65/0x25/0x25/0x25
```

`txDpdState` decode (from `adi_adrv9025_TrackingCalAllStateGet`): `0x25` = SUSPENDED|INACTIVE|**DISABLED**; `0x65` = + ERROR. `adi_adrv9025_DpdStatusGet` shows **0 iterations, Mean Tx/ORx Power = -2147483.648 (never measured)** — DPD tracking never runs.

**Key observation:** `out_voltage0_quadrature_tracking_en` (`TRACK_TX1_QEC`) and `out_voltage0_lo_leakage_tracking_en` (`TRACK_TX1_LOL`) both enable and read back **1**. Only `out_voltage0_dpd_en` (`TRACK_TX1_DPD`) reads back **0**. Adding a delay between enabling QEC/LOL tracking and DPD (per EZ 575269) does not help.

## The full sequence we run (all steps rc=0 except the DPD reset/enable)

```sh
# RF/JESD up (FSM at opt_post_running_stage); Tx1 on, 0 dB; ORx1 on, 0 dB, mapped to Tx1:
echo 1 > out_voltage0_en ; echo 0 > out_voltage0_hardwaregain
echo 0x1 > /sys/kernel/debug/iio/iio:device17/orx1_to_tx_mapping
echo 1 > in_voltage4_en ; echo ORX1_ON_ORX2_OFF > in_voltage4_rf_port_select ; echo 0 > in_voltage4_hardwaregain

echo 0x1 > calibrate_mask # restrict cals to Tx0 <-- REQUIRED (see note 1)

# Combined QEC/LOL init cals (with a modulated Tx signal playing):
echo 1 > calibrate_rx_qec_en ; echo 1 > calibrate_tx_lol_en ; echo 1 > calibrate_tx_qec_en
echo 1 > calibrate # rc=0 OK <-- combined; see note 2
echo 0 > calibrate_rx_qec_en ; echo 0 > calibrate_tx_lol_en ; echo 0 > calibrate_tx_qec_en

echo 1 > calibrate_ext_path_delay_en ; echo 1 > calibrate # rc=0 OK (locks; too-low correlated power if <0 dB drive)
echo 0 > calibrate_ext_path_delay_en

echo 1 > calibrate_dpd_en ; echo 1 > calibrate # runtime DPD init cal, rc=0 OK
echo 0 > calibrate_dpd_en

cat ADRV9025_DPD_63Coeff_Model_10.txt > dpd_coef_model # stock 63-coeff model, OK
echo 0x1 > dpd_tx_mask
echo 1 > dpd_reset # <-- FAILS "(3)", txDpdState 0x25/0x65
echo 1 > dpd_tracking_config_set # rc=0
echo 1 > out_voltage0_quadrature_tracking_en # TRACK_TX1_QEC -> readback 1
echo 1 > out_voltage0_lo_leakage_tracking_en # TRACK_TX1_LOL -> readback 1
echo 1 > out_voltage0_dpd_en # TRACK_TX1_DPD -> readback 0 <-- DECLINED
```

**Note 1 — `calibrate_mask=0x1` is mandatory:** with the default `0xF`, `TX_QEC_INIT` runs on all 4 Tx and Tx2/3/4 (no signal/observation set up) fail `TxQECInit: Incrementing fine phase, coarse value railed (3086)`, aborting the whole `calibrate`. Restricting to Tx0 lets it converge.

**Note 2 — QEC cals must be run COMBINED:** `calibrate_tx_qec_en` alone rails; running `rx_qec + tx_lol(internal) + tx_qec` together in one `calibrate` converges.

## Boot-time init cals — the suspected root cause

Boot init cals run automatically via `adi_adrv9025_PostMcsInit()` from `ActiveUtilInit.profile` `initCals` (`channelMask=15`, `calMask` includes `ADI_ADRV9025_DPD` = 0x100000 but originally NOT `ADI_ADRV9025_TX_QEC_INIT` = 0x1000).

**Putting `TX_QEC_INIT` in the boot mask breaks bring-up entirely:**
```
kernel: adrv9025 spi0.0: adrv9025_jesd204_setup_stage2, 2763: failed with TxQECInit:Channel estimate never reached variance (3)
kernel: jesd204: adrv9025-phy@0: JESD204[0:0] In opt_setup_stage2 got error from cb: -14 (FSM rolls back, adrv9025-phy never probes)
```

So at boot (PA off, no Tx signal) TX QEC init fails "channel estimate never reached variance"; only at **runtime with a Tx signal + `calibrate_mask=0x1`** does it pass. We can therefore only run the DPD **init** cal at boot **without** a completed TX QEC init — which we suspect is why `TrackingCalsEnableSet(TX_DPD)` is later refused.

**Follow-up experiment (`initCals.channelMask=15 -> 1`, `TX_QEC_INIT` added to boot mask):** restricting the boot init cals to Tx0 changed the boot failure to a **different, more specific** error:
```
kernel: adrv9025 spi0.0: adrv9025_jesd204_setup_stage2, 2763: failed with TxQECInit:No pathdelay estimate present (3)
```
i.e. boot **TX QEC init requires a path-delay estimate**, but `ADI_ADRV9025_EXTERNAL_PATH_DELAY` (0x200000) is a **PA-on, runtime** cal (Table 263 step 4) and is not present during `PostMcsInit`. `ADI_ADRV9025_INTERNAL_PATH_DELAY` (0x200) IS in the boot mask but does not satisfy it. This looks like a hard ordering conflict: **TX QEC init (needed for DPD init) depends on a path-delay estimate that only exists after a runtime PA-on external path-delay cal** — so neither TX QEC init nor DPD init can complete at boot for this device/profile.

## Questions for ADI

**Q1 — Is on-chip DPD supported in this topology, and what is the exact init sequence?**
Our design uses **on-chip DPD only: no Rx/ORx AXI-JESD framer to the SoC** (the ORx observation stays internal to the ADRV9029). Is on-chip DPD supported without framing ORx to the SoC? If yes, please give the **exact, ordered init + calibration sequence** (which cals in `PostMcsInit` vs at runtime, PA state, mask/channel values) that makes `TrackingCalsEnableSet(TX_DPD)` succeed for this topology.

**Q2 — Why is only `TX_DPD` refused by `TrackingCalsEnableSet`?**
The same `TrackingCalsEnableSet` call enables `TX_QEC` and `TX_LOL` (readback 1) but **silently refuses `TX_DPD`** — no error returned, `out_voltage0_dpd_en` reads back 0. What single precondition gates `TX_DPD` enablement, and **how can we query the firmware for the reason it is refused** (an error/status object we can read)?

**Q3 — How can boot `TX_QEC_INIT` satisfy its path-delay dependency (PA off)?**
Adding `TX_QEC_INIT` to the `PostMcsInit` mask fails `No pathdelay estimate present (3)`. But `EXTERNAL_PATH_DELAY` (0x200000) is a runtime, PA-on cal, and `INTERNAL_PATH_DELAY` (0x200, already in the boot mask) does not satisfy it. What is the intended way to provide a path-delay estimate at boot — e.g. pre-programming a factory value via `ExternalPathDelaySet()` before running the boot init cals? Which path-delay does TX QEC init actually require?

**Q4 — Can the DPD init cal be completed at *runtime*?**
Our runtime `InitCalsRun(ADI_ADRV9025_DPD)` returns **success**, yet `TrackingCalsEnableSet(TX_DPD)` is still refused and `DpdReset` returns "(3)". Does DPD tracking **strictly require the DPD init cal to run during `PostMcsInit`**, or can a successful runtime `InitCalsRun(DPD)` satisfy it? If runtime is allowed, what is the required ordering relative to path-delay and TX QEC init, and does the DPD init cal require TX QEC init in the **same** `InitCalsRun`?

**Q5 — Is the required TX QEC init grouping/mask expected?**
On our device, `InitCalsRun(TX_QEC_INIT)` **alone** fails `Incrementing fine phase, coarse value railed (3086)`. It only converges when run **combined with `RX_QEC_INIT` + `TX_LO_LEAKAGE_INTERNAL` in one `InitCalsRun`**, and with the channel mask **restricted to the single target Tx** (`0x1`) — with the default 4-Tx mask the un-driven Tx2/3/4 rail the whole run. Is this grouping/mask requirement expected, and is it documented anywhere?

## Environment / versions
- adrv9025 API 7.0.0.14, ARM FW 7.0.0.11, Stream 9.4.0.1, Rev 176.
- Linux 6.12 (adi-6.12.y), Xilinx ZynqMP.
- Profiles: `ActiveUseCase.profile` (UC51 LinkSharing), `ActiveUtilInit.profile`.
- DPD model: `Adi.Adrv9025.DPDModelLibrary/63_coefficients/ADRV9025_DPD_63Coeff_Model_10.txt` (also custom 190-coeff — same result).

Thread Notes

  • ADRV9029 on-chip DPD enablement — empirical root cause & working resolution

    Follow-up to our support question. This is our own empirical analysis and a sequence that now works end-to-end; we would like ADI to confirm it is the intended flow (and correct anything below).

    TL;DR

    The blocker is a calibration ordering / dependency problem, not a missing DPD init cal:

    • TrackingCalsEnableSet(TX_DPD) is gated on TX_QEC_INIT having completed in the current session. That is the single precondition that was silently refusing TX_DPD (while TX_QEC/TX_LOL tracking enabled fine).
    • On this device, TX_QEC_INIT run at runtime — with a modulated Tx signal and an ORx observation present — executes in external mode, which requires an external path‑delay estimate. The ADI init‑cal framework does not carry that estimate across separate InitCalsRun calls, and when the cals are batched the ARM runs them in bit order — TX_QEC_INIT (0x1000) before EXTERNAL_PATH_DELAY (0x200000) — so QEC always sees no path delay and fails "TxQECInit: No pathdelay estimate present (3075)".
    • With TX_QEC_INIT never completing, DPD never becomes enablable → TrackingCalsEnableSet(TX_DPD) is refused and DpdReset returns the generic "...correct state...(3)" (ARM sysError 0x341A).

    Resolution (validated — DPD now fully adapting): run TX_QEC_INIT at boot (PostMcsInit, PA off) in internal mode, where it converges; then at runtime do only external path‑delay + a two‑step DpdReset + enable tracking — never run TX_QEC at runtime. With this, DPD engages with Error Code 0, Iteration Count == Update Count and climbing, on an external demod locked at Es/No ≈ 34 dB, 0 errored frames.

    Root-cause chain (as observed)

    TrackingCalsEnableSet(TX_DPD)            ← refused (readback 0, no error)
            depends on
    TX_QEC_INIT completed this session       ← the real gate
            depends on (in EXTERNAL/runtime mode)
    external path-delay estimate present     ← EXTERNAL_PATH_DELAY (0x200000), PA-on
            but
    init-cal framework does NOT persist that estimate across InitCalsRun calls,
    and batching runs TX_QEC_INIT (0x1000) BEFORE EXTERNAL_PATH_DELAY (0x200000)
            →  TX_QEC_INIT fails 3075 "No pathdelay estimate present"
            →  DPD never enablable → DpdReset "(3)" / sysError 0x341A

    The two “path delays” are different quantities and this is a key source of confusion:

    • The init‑cal path delay that TX_QEC_INIT (external) needs is the EXTERNAL_PATH_DELAY init‑cal estimate.
    • ExternalPathDelaySet() (which we added a driver hook for) commits the DPD‑tracking path delay (DPD_TRACKING param 0x10) — a different quantity. Committing it does not satisfy the TX_QEC_INIT init‑cal dependency (we verified: QEC still fails 3075 after the commit).

    Why it can’t be solved purely at runtime: at boot (PA off, no external signal) TX_QEC_INIT runs in internal mode and uses INTERNAL_PATH_DELAY (0x200), which is available in PostMcsInit → it converges. At runtime the presence of a signal + ORx forces external‑mode QEC → the unmet external path‑delay dependency above. So the working split is QEC at boot, path‑delay at runtime.

    The sequence that works (validated on FW 7.0.0.14 / this profile)

    Boot — ActiveUtilInit.profile initCals calMask = 0xC174B (792395), channelMask = 15. This is a reduced set that converges boot TX_QEC_INIT in internal mode; it includes INTERNAL_PATH_DELAY (0x200) + TX_QEC_INIT (0x1000) + internal LOL + ORx QEC + TX DAC. (Note: it does not include DPD (0x100000) — a boot DPD init cal is not what unblocks tracking; completed boot TX_QEC_INIT is.)

    Runtime — DVB signal streaming, single‑Tx cal mask 0x1, ORx1→Tx1 mapped:

    1. Enable ORx only for the external path‑delay init cal, run EXTERNAL_PATH_DELAY → fifoDelay ≈ 146, PASS.
    2. commit_path_delay (commits the DPD‑tracking path delay).
    3. Set ORx in_voltageN_en = 0 so the DPD tracking cal owns the ORx (see ORx‑ownership note below).
    4. DpdReset two‑step: LUT_RESTORE (rc=0) then FULL (rc=0). Do not run any runtime TX_QEC.
    5. TrackingCalsEnableSet(TX_QEC, TX_LOL, TX_DPD) → all three now read back 1; DPD adapts.

    Two conditions that were also required to get from “engaged” to “adapting”:

    • ORx ownership. If the ORx channel is left user‑enabled, the DPD data capture times out (0x3421), Iteration Count climbs but Update Count stays 0. Enabling ORx only for the path‑delay cal and then disabling it hands the ORx to the tracking cal and lets capture complete.
    • ORx observation level. Too‑low ORx level gives AM‑AM outlier errors (0x340A); ~12 dB ORx gain (≈ −22 dBFS observation) plus adequate Tx drive clears it. (On our board ORx is a gain, not attenuation.)

    Answers to our own Q1–Q5 (empirical — please confirm)

    • Q1 (topology). On‑chip DPD does work with no Rx/ORx AXI‑JESD framer to the SoC — the ORx observation stays internal to the ADRV9029. The ordered sequence is the boot+runtime split above.
    • Q2 (why only TX_DPD refused). The gate is completed TX_QEC_INIT, not DPD init. Once boot TX_QEC_INIT converges, TrackingCalsEnableSet(TX_DPD) succeeds. Question for ADI: is there a firmware status/error object we can read to see the specific precondition the ARM is failing when it refuses TX_DPD?
    • Q3 (boot TX_QEC path‑delay dependency). At boot, TX_QEC_INIT runs in internal mode and is satisfied by INTERNAL_PATH_DELAY (0x200) — it converges PA‑off with the 0xC174B mask. Our earlier failures came from a mask that pushed QEC into external mode (needing EXTERNAL_PATH_DELAY, a PA‑on runtime cal). Please confirm which path delay boot TX_QEC init is expected to use and whether pre‑programming a factory ExternalPathDelaySet() is the intended alternative.
    • Q4 (runtime DPD init). A successful runtime InitCalsRun(ADI_ADRV9025_DPD) is not sufficient — the missing prerequisite was TX_QEC_INIT, not the DPD init cal. In the working flow we do not run a runtime DPD init at all; boot TX_QEC_INIT + runtime path‑delay + two‑step DpdReset is what arms tracking.
    • Q5 (TX_QEC grouping/mask). Confirmed on our device: InitCalsRun(TX_QEC_INIT) alone rails (fine phase … railed 3086); it only converges run combined with RX_QEC_INIT + TX_LO_LEAKAGE_INTERNAL in one InitCalsRun and with the channel mask restricted to the single driven Tx (0x1) — the default 4‑Tx mask rails the un‑driven Tx2/3/4. Is this grouping + single‑Tx‑mask requirement expected/documented?

    TES / DPD-firmware compatibility (why these results are on the 7.0.0.14 mainline FW)

    We cannot substitute the DPD-enabled firmware from the ADI TES /release/madura/5.1.0, API 5.1.0.21) onto the mainline Linux adrv9025 driver: the driver’s ARM image buffer is statically sized to the 7.0.0.14 CPU program memory map (ADI_ADRV9025_CPU_C_BINARY_IMAGE_FILE_SIZE_BYTES = CPU_C_ADDR_PROG_END + 1 − CPU_C_ADDR_PROG_START), and the DPD‑core / stream image sizes are fixed to that layout. The two firmware sets have different image sizes, so the 5.1.0 set does not load on the 7.0.0.14 driver (the ARM does not come up):

    Firmware blob 7.0.0.14 mainline (what the driver loads) TES / 5.1.0 DPD release
    ADRV9025_FW.bin (ARM) 262144 B (256 KB) 229376 B (224 KB)
    ADRV9025_DPDCORE_FW.bin 65536 B (64 KB) 98304 B (96 KB)

    Why this matters for the questions above: all of our DPD results are obtained on the mainline 7.0.0.14 firmware, whose DPD core is the smaller 64 KB image — not the 96 KB DPD core that the TES / 5.1.0 release ships. So the TES software (and its DPD firmware) is effectively incompatible with the driver we must run, and we cannot fall back to the “known‑good” TES DPD firmware to cross‑check. Please confirm (a) that on‑chip DPD is fully supported by the mainline 7.0.0.14 firmware/64 KB DPD core, or whether the 96 KB 5.1.0 DPD core is required; and (b) if the 5.1.0 DPD core is required, the supported way to load it under the mainline driver given the fixed image‑buffer sizing.

    Environment

    • adrv9025 API 7.0.0.14, ARM FW 7.0.0.11, Stream 9.4.0.1, Rev 176.
    • TES / RF-team DPD firmware set: release/madura/5.1.0 (API 5.1.0.21) — size-incompatible with the driver (see above).
    • Linux 6.12 (adi‑6.12.y), Xilinx ZynqMP; mainline‑derived adrv9025 IIO driver.
    • Profiles: ActiveUseCase.profile (UC51 LinkSharing, 122.88 MSPS / 491.52 MSPS DPD actuator), ActiveUtilInit.profile (boot calMask 0xC174B).
    • Validation: DVB‑S2 QPSK 1/2, 30 MBaud; Newtec MDM6000 demod locked, Es/No ≈ 34 dB, OperState 0, 0 errored frames; DPD Iteration Count == Update Count, Error Code 0.
  • I'm not able to move this query from my end due to some technical issue, please post this the linux forum given below:

     Q&A 

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.