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

Parents Reply Children
No Data

Before You Switch


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