[PATCH net v6 7/8] ptp: ocp: match ART DPLL frequencies to selectors

From: Ahmad Byagowi

Date: Thu Nov 26 2026 - 11:42:58 EST


From: ahmadexp <ahmadexp@xxxxxxxxx>

The ART input selector named 10Mhz is recorded as 1 MHz, although the pin advertises 10 MHz. In addition, ART pins share a generic capability list that advertises IRIG-B and DCF77 frequencies which the ART selector tables cannot select.

Record the ART input as 10 MHz and give ART pins a supported-frequency list containing only 1 PPS and 10 MHz. This makes DPLL capability validation agree with the available selectors.

A coding assistant helped identify both capability mismatches, develop the source-derived regression tests and prepare this changelog. The tests use the actual ART accessors and DPLL validation with stubbed registers; no physical card was used.

Fixes: 09eeb3aecc6c ("ptp_ocp: implement DPLL ops")
Signed-off-by: Ahmad Byagowi <ahmadexp@xxxxxxxxx>
---
drivers/ptp/ptp_ocp.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
index 6bfd5792768e..040518895176 100644
--- a/drivers/ptp/ptp_ocp.c
+++ b/drivers/ptp/ptp_ocp.c
@@ -299,6 +299,11 @@ static struct dpll_pin_frequency ptp_ocp_sma_freq[] = {
DPLL_PIN_FREQUENCY_DCF77,
};

+static struct dpll_pin_frequency ptp_ocp_art_sma_freq[] = {
+ DPLL_PIN_FREQUENCY_1PPS,
+ DPLL_PIN_FREQUENCY_10MHZ,
+};
+
struct ptp_ocp_sma_connector {
enum ptp_ocp_sma_mode mode;
bool fixed_fcn;
@@ -1385,7 +1390,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 },
{ }
};

@@ -3138,8 +3143,8 @@ ptp_ocp_art_sma_init(struct ptp_ocp *bp)
.board_label = NULL,
.type = DPLL_PIN_TYPE_EXT,
.capabilities = 0,
- .freq_supported_num = ARRAY_SIZE(ptp_ocp_sma_freq),
- .freq_supported = ptp_ocp_sma_freq,
+ .freq_supported_num = ARRAY_SIZE(ptp_ocp_art_sma_freq),
+ .freq_supported = ptp_ocp_art_sma_freq,

};
u32 reg;
--
2.54.0 (Apple Git-157)