Netdev List
 help / color / mirror / Atom feed
* [PATCH iwl-net] ice: fix slow signal rise on SDPs
@ 2026-12-01  8:06 Maciek Machnikowski
  2026-12-01  8:08 ` netdev-bot+sinfo
  0 siblings, 1 reply; 3+ messages in thread
From: Maciek Machnikowski @ 2026-12-01  8:06 UTC (permalink / raw)
  To: intel-wired-lan; +Cc: maciek, netdev, Maciek Machnikowski, Przemek Kitszel

When an SDP (Software Definable Pin) is configured as a periodic output,
the driver already sets PIN_DIR (output) and PIN_FUNC (routing the pin
to the timer's AUX output) in GPIO_CTL, but leaves TRI_CTL cleared. Per
the hardware definition, TRI_CTL (bit 5) is meaningful only for single
ended GPIOs configured as output and driven high: 0b tristates the pin,
1b drives it high.

With TRI_CTL cleared, the pin is driven low but tristated instead of
driven high, so the high level comes only from the pull-up and the
rising edge is slow. A device that timestamps this signal sees the
rising edge late. The measured delay was ~6 us, and it depends on the
board and the load on the line. This adds an offset and jitter between
the PHC and the device that consumes the signal. Examples are a second
NIC using EXTTS, a DPLL input or a measurement instrument.

The problem was found during development, while validating periodic
output signal quality with an oscilloscope. It was not found by static
analysis.

To reproduce, enable a 1 PPS periodic output on one of the SDPs, e.g.:

  testptp -d /dev/ptpX -L <pin>,2
  testptp -d /dev/ptpX -p 1000000000

and probe the pin with an oscilloscope. The rising edge is delayed by
~6 us.

Set TRI_CTL, the only missing bit, when enabling periodic outputs, so
the pin is actively driven high. With this change the rising edge delay
drops from ~6 us to ~50 ns. This has no effect on pins that are not
single ended SDPs, such as the differential 1PPS output.

Fixes: 172db5f91d5f ("ice: add support for auxiliary input/output pins")
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Maciek Machnikowski <maciej.machnikowski@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_hw_autogen.h | 1 +
 drivers/net/ethernet/intel/ice/ice_ptp.c        | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_hw_autogen.h b/drivers/net/ethernet/intel/ice/ice_hw_autogen.h
index 082ad33c53dc..1d538a04196c 100644
--- a/drivers/net/ethernet/intel/ice/ice_hw_autogen.h
+++ b/drivers/net/ethernet/intel/ice/ice_hw_autogen.h
@@ -154,6 +154,7 @@
 #define GLGEN_CLKSTAT_SRC			0x000B826C
 #define GLGEN_GPIO_CTL(_i)			(0x000880C8 + ((_i) * 4))
 #define GLGEN_GPIO_CTL_PIN_DIR_M		BIT(4)
+#define GLGEN_GPIO_CTL_TRI_CTL_M		BIT(5)
 #define GLGEN_GPIO_CTL_PIN_FUNC_S		8
 #define GLGEN_GPIO_CTL_PIN_FUNC_M		ICE_M(0xF, 8)
 #define GLGEN_RSTAT				0x000B8188
diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
index 30bc2d8aed9e..803744ff1a89 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp.c
+++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
@@ -1762,9 +1762,12 @@ static int ice_ptp_write_perout(struct ice_hw *hw, unsigned int chan,
 
 	/* 4. write GPIO CTL reg */
 	val = GLGEN_GPIO_CTL_PIN_DIR_M;
-	if (!!period)
-		val |= FIELD_PREP(GLGEN_GPIO_CTL_PIN_FUNC_M,
+	if (!!period) {
+		/* TRI_CTL=1 drives SDPs high instead of tristating them */
+		val |= GLGEN_GPIO_CTL_TRI_CTL_M |
+		       FIELD_PREP(GLGEN_GPIO_CTL_PIN_FUNC_M,
 				  8 + chan + (tmr_idx * 4));
+	}
 
 	wr32(hw, GLGEN_GPIO_CTL(gpio_pin), val);
 	ice_flush(hw);
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH iwl-net] ice: fix slow signal rise on SDPs
  2026-12-01  8:06 [PATCH iwl-net] ice: fix slow signal rise on SDPs Maciek Machnikowski
@ 2026-12-01  8:08 ` netdev-bot+sinfo
  2026-12-01  8:15   ` Maciek Machnikowski
  0 siblings, 1 reply; 3+ messages in thread
From: netdev-bot+sinfo @ 2026-12-01  8:08 UTC (permalink / raw)
  To: Maciek Machnikowski; +Cc: intel-wired-lan, maciek, netdev, Przemek Kitszel

Hi!

This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:

 - What hardware the change was tested on. For driver fixes please
   mention the device (and if relevant firmware version) used for
   testing, or say that the change was not tested on real hardware.

Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account.

*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
-- 
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH iwl-net] ice: fix slow signal rise on SDPs
  2026-12-01  8:08 ` netdev-bot+sinfo
@ 2026-12-01  8:15   ` Maciek Machnikowski
  0 siblings, 0 replies; 3+ messages in thread
From: Maciek Machnikowski @ 2026-12-01  8:15 UTC (permalink / raw)
  To: netdev-bot+sinfo; +Cc: intel-wired-lan, maciek, netdev, Przemek Kitszel

On 12/1/2026 9:08 AM, netdev-bot+sinfo@kernel.org wrote:
> This is an automated message. This series looks like a fix, but its
> commit messages seem to be missing some information:
> 
>   - What hardware the change was tested on. For driver fixes please
>     mention the device (and if relevant firmware version) used for
>     testing, or say that the change was not tested on real hardware.
> 
> Please do not repost the series just to address the above. Instead,
> reply to this email with the missing information, so that reviewers
> can take it into account.
> 
> *IMPORTANT*: If you do repost (for other reasons) - please include
> the relevant info in the cover letter or commit messages.
> -- The evaluation is done by an LLM so it may be wrong, if you think 
> that is the case please reply and explain.

This change was tested on E835-CCQDA1 and E830-XXVDA2. It is firmware 
agnostic.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-01  8:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01  8:06 [PATCH iwl-net] ice: fix slow signal rise on SDPs Maciek Machnikowski
2026-12-01  8:08 ` netdev-bot+sinfo
2026-12-01  8:15   ` Maciek Machnikowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox