netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] net: stmmac: allow generation of flexible PPS relative to MAC time
@ 2025-07-24 12:31 Gatien Chevallier
  2025-07-24 12:31 ` [PATCH net-next 1/2] drivers: net: stmmac: add STMMAC_RELATIVE_FLEX_PPS Gatien Chevallier
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Gatien Chevallier @ 2025-07-24 12:31 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Richard Cochran
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	Gatien Chevallier

When doing some testing on stm32mp2x platforms(MACv5), I noticed that
the command previously used with a MACv4 for genering a PPS signal:
echo "0 0 0 1 1" > /sys/class/ptp/ptp0/period
did not work.

This is because the arguments passed through this command must contain
the start time at which the PPS should be generated, relative to the
MAC system time. For some reason, a time set in the past seems to work
with a MACv4.

Because passing such an argument is tedious, introduce
STMMAC_RELATIVE_FLEX_PPS config switch so that the MAC system time
is added to the args to the stmmac_ptp driver.

Example to generate a flexible PPS signal that has a 1s period 3s
relative to when the command was entered before and after setting
STMMAC_RELATIVE_FLEX_PPS:

Before: echo "0 175xxxxxxx 0 1 1" > /sys/class/ptp/ptp0/period

After: echo "0 3 0 1 1" > /sys/class/ptp/ptp0/period

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
---
Gatien Chevallier (2):
      drivers: net: stmmac: add STMMAC_RELATIVE_FLEX_PPS
      net: stmmac: select STMMAC_RELATIVE_FLEX_PPS for stm32 SoCs

 drivers/net/ethernet/stmicro/stmmac/Kconfig      | 10 ++++++++++
 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 13 +++++++++++++
 2 files changed, 23 insertions(+)
---
base-commit: 8aad37d16cffb6c0940d9b213456a2733a786f57
change-id: 20250723-relative_flex_pps-faa2fbcaf835

Best regards,
-- 
Gatien Chevallier <gatien.chevallier@foss.st.com>


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

end of thread, other threads:[~2025-08-05 11:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-24 12:31 [PATCH net-next 0/2] net: stmmac: allow generation of flexible PPS relative to MAC time Gatien Chevallier
2025-07-24 12:31 ` [PATCH net-next 1/2] drivers: net: stmmac: add STMMAC_RELATIVE_FLEX_PPS Gatien Chevallier
2025-08-05 10:30   ` Russell King (Oracle)
2025-08-05 11:50     ` Gatien CHEVALLIER
2025-07-24 12:31 ` [PATCH net-next 2/2] net: stmmac: select STMMAC_RELATIVE_FLEX_PPS for stm32 SoCs Gatien Chevallier
2025-07-26  0:25 ` [PATCH net-next 0/2] net: stmmac: allow generation of flexible PPS relative to MAC time Jakub Kicinski
2025-07-28  8:15   ` Gatien CHEVALLIER
2025-07-28 15:58     ` Jakub Kicinski
2025-07-29 15:05       ` Gatien CHEVALLIER

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).