[PATCH net v5 8/8] ptp: ocp: correct the ART 10 MHz input frequency

From: Ahmad Byagowi

Date: Mon Nov 23 2026 - 23:43:47 EST


The ART input selector named 10Mhz has a frequency of 1000000 Hz instead
of 10000000 Hz. ART pins advertise 10 MHz, not 1 MHz. A request for the
advertised value passes the DPLL core's supported-frequency check but
matches no input selector, so frequency_set returns -EINVAL. Reading
the default ART input selector 0x08 reports the unadvertised 1 MHz value.

Use 10000000 Hz for the ART input selector, matching the advertised
frequency and the corresponding ART output entry.

Tests using the actual ART accessors, stubbed registers and DPLL core
frequency validation reproduce both failures and pass with the fix
under ASan/UBSan. No physical ART card was tested.

The issue was reported by the Sashiko review. Codex assisted with the
table correction, actual-accessor regression tests and the changelog.

Fixes: 09eeb3aecc6c ("ptp_ocp: implement DPLL ops")
Link: https://lore.kernel.org/r/179538006772.3135.15875996486888374193@xxxxxxxxxx
Link: https://lore.kernel.org/r/179538007070.3135.8275620503580456948@xxxxxxxxxx
Signed-off-by: Ahmad Byagowi <ahmadexp@xxxxxxxxx>
---
Changes in v5:
- Renumbered from v4 patch 5; code and commit message unchanged.

Testing: actual ART accessors and DPLL get-before-set validate 10000000 Hz,
reject 1000000 Hz, and check the fixed-pin default. Restoring the old
frequency fails at runtime. No physical ART card was used.

drivers/ptp/ptp_ocp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
index 821ecd1a13c8..93923d5a2992 100644
--- a/drivers/ptp/ptp_ocp.c
+++ b/drivers/ptp/ptp_ocp.c
@@ -1385,7 +1385,7 @@ static const struct ocp_selector ptp_ocp_sma_out[] = {

static const struct ocp_selector ptp_ocp_art_sma_in[] = {
{ .name = "PPS1", .value = 0x0001, .frequency = 1 },
- { .name = "10Mhz", .value = 0x0008, .frequency = 1000000 },
+ { .name = "10Mhz", .value = 0x0008, .frequency = 10000000 },
{ }
};