All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ahmad Byagowi <ahmadexp@gmail.com>
To: netdev@vger.kernel.org
Cc: andrew+netdev@lunn.ch, arkadiusz.kubalewski@intel.com,
	davem@davemloft.net, edumazet@kernel.org, jiri@resnulli.us,
	kuba@kernel.org, milena.olech@intel.com, pabeni@redhat.com,
	richardcochran@gmail.com, vadim.fedorenko@linux.dev
Subject: [PATCH net v7 7/7] ptp: ocp: match ART DPLL frequencies to selectors
Date: Fri, 27 Nov 2026 11:23:02 -0800	[thread overview]
Message-ID: <20261127-timecard-driver-v7-7-ahmadexp@gmail.com> (raw)
In-Reply-To: <20261127-timecard-driver-v7-0-ahmadexp@gmail.com>

The ART input selector named 10Mhz is recorded as 1 MHz although the
pin advertises 10 MHz. ART also advertises IRIG-B and DCF77 through
the generic capability list, but has no selectors for them.

Use 10 MHz in the ART input table. Advertise only 1 PPS and 10 MHz on
ART connectors so DPLL validation matches the available selectors.

Developed with coding-assistant support during review and validation.

Fixes: 09eeb3aecc6c ("ptp_ocp: implement DPLL ops")
Signed-off-by: Ahmad Byagowi <ahmadexp@gmail.com>
---
 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 8e898d929105..3bdd6e8959fd 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;
@@ -1386,7 +1391,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 },
 	{ }
 };
 
@@ -3140,8 +3145,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)


      parent reply	other threads:[~2026-11-27 19:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 19:22 [PATCH net v7 0/7] ptp: fix OCP routes and SJA1105 pin direction Ahmad Byagowi
2026-11-27 19:22 ` [PATCH net v7 1/7] net: dsa: sja1105: keep pin function on EXTTS disable Ahmad Byagowi
2026-11-27 19:22 ` [PATCH net v7 2/7] net: dsa: sja1105: keep pin function on PEROUT disable Ahmad Byagowi
2026-11-27 19:22 ` [PATCH net v7 3/7] ptp: ocp: preserve timestamp routes on DPLL frequency changes Ahmad Byagowi
2026-11-27 19:22 ` [PATCH net v7 4/7] ptp: ocp: recover SMA direction from both enable bits on bind Ahmad Byagowi
2026-11-27 19:23 ` [PATCH net v7 5/7] ptp: ocp: report disabled SMA inputs as zero Hz Ahmad Byagowi
2026-11-27 19:23 ` [PATCH net v7 6/7] ptp: ocp: correct the DCF output frequency Ahmad Byagowi
2026-11-27 19:23 ` Ahmad Byagowi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261127-timecard-driver-v7-7-ahmadexp@gmail.com \
    --to=ahmadexp@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=milena.olech@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=vadim.fedorenko@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.