Open
Conversation
stefpopa
reviewed
Feb 11, 2026
Collaborator
stefpopa
left a comment
There was a problem hiding this comment.
A few nitpicks and questions, but overall LGTM.
f4cb185 to
5741d73
Compare
Add support for reading the JESD204C receiver foreground calibration status after calibration completes. This allows the driver to detect calibration failures early and report diagnostic information. Introduce two new API functions: - adi_ad9081_jesd_rx_calibrate_204c_lane_status_get(): reads per-lane calibration status, goodness metric, and SPO values from hardware registers (0x21E0-0x21E2 per lane, r2 silicon only). - adi_ad9081_jesd_rx_calibrate_204c_status_get(): aggregates results across all active lanes, reporting worst-case goodness/SPO and a bitmask of any failed lanes. Add the adi_ad9081_jrx_fg_cal_result_t structure to carry the calibration result (status, failed lane mask, goodness, left/right SPO). In the ad9081 driver, call the status check after foreground calibration in the JESD204 clks_enable path. If calibration fails, log the failed lane mask and return -EFAULT. On success, log the goodness and SPO values for diagnostic purposes. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
…gfs attribute Remove multichip_sync case 20 which provided JESD204C RX foreground recalibration via the multichip_sync interface. Replace with a dedicated "jesd_rx_recalibrate_204c" debugfs attribute using the existing debugfs infrastructure. Writing '1' to the attribute triggers recalibration. Returns -ENOTSUPP if the JESD version is not 204C and -ERANGE if the lane rate is below the calibration threshold. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Add per-link debugfs attributes "adi,tpl-phase-adjust-link0" and "adi,tpl-phase-adjust-link1" to allow runtime tuning of the JESD RX LMFC delay (TPL phase adjust) without requiring a device tree change and reboot. The attributes support both read and write access. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
5741d73 to
0314d2c
Compare
nunojsa
approved these changes
Feb 13, 2026
| return ret; | ||
|
|
||
| dev_info(&phy->spi->dev, "running jesd_rx_calibrate_204c, LR %lu kbps", | ||
| phy->jrx_link_tx[0].lane_rate_kbps); |
Collaborator
There was a problem hiding this comment.
Kind of a nitpick but I would put the above as dbg()
| if (ret != 0) | ||
| return ret; | ||
|
|
||
| msleep(10); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
along with new debugfs attributes for runtime tuning.
(adi_ad9081_jesd_rx_calibrate_204c_lane_status_get and
adi_ad9081_jesd_rx_calibrate_204c_status_get) that read per-lane calibration
status, goodness metric, and SPO values from hardware registers (r2 silicon).
The driver now checks calibration results after foreground calibration in the
JESD204 clks_enable path, logging diagnostics and returning -EFAULT on
failure.
recalibration path with a dedicated jesd_rx_recalibrate_204c debugfs
attribute. Writing 1 triggers recalibration with full status reporting.
Returns -ENOTSUPP for non-204C links and -ERANGE if the lane rate is below
the calibration threshold.
adi,tpl-phase-adjust-link1 debugfs attributes for runtime tuning of the JRX
LMFC delay (TPL phase adjust) without requiring device tree changes and reboot.
drivers/iio/adc/ad9081/adi_ad9081_jesd.c
PR Type
PR Checklist