netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] net: stmmac: allow generation of flexible PPS relative to MAC time
@ 2025-07-29 14:51 Gatien Chevallier
  2025-07-29 14:52 ` [PATCH net-next v2 1/2] drivers: net: stmmac: handle start time set in the past for flexible PPS Gatien Chevallier
  2025-07-29 14:52 ` [PATCH net-next v2 2/2] ARM: dts: stm32: add missing PTP reference clocks on stm32mp13x SoCs Gatien Chevallier
  0 siblings, 2 replies; 7+ messages in thread
From: Gatien Chevallier @ 2025-07-29 14:51 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Richard Cochran,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, devicetree,
	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, consider that any time
set in the past is an offset regarding the MAC system time. This way,
this does not impact existing scripts and the past time use case is
handled.

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

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

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
---
Changes in v2:
- Drop STMMAC_RELATIVE_FLEX_PPS config switch
- Add PTP reference clock in stm32mp13x SoCs
- Link to v1: https://lore.kernel.org/r/20250724-relative_flex_pps-v1-0-37ca65773369@foss.st.com

---
Gatien Chevallier (2):
      drivers: net: stmmac: handle start time set in the past for flexible PPS
      ARM: dts: stm32: add missing PTP reference clocks on stm32mp13x SoCs

 arch/arm/boot/dts/st/stm32mp131.dtsi             |  2 ++
 arch/arm/boot/dts/st/stm32mp133.dtsi             |  2 ++
 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 31 ++++++++++++++++++++++++
 3 files changed, 35 insertions(+)
---
base-commit: fa582ca7e187a15e772e6a72fe035f649b387a60
change-id: 20250723-relative_flex_pps-faa2fbcaf835

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


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

end of thread, other threads:[~2025-07-30 21:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-29 14:51 [PATCH net-next v2 0/2] net: stmmac: allow generation of flexible PPS relative to MAC time Gatien Chevallier
2025-07-29 14:52 ` [PATCH net-next v2 1/2] drivers: net: stmmac: handle start time set in the past for flexible PPS Gatien Chevallier
2025-07-29 16:58   ` Simon Horman
2025-07-30  9:01     ` Gatien CHEVALLIER
2025-07-30  3:36   ` kernel test robot
2025-07-30 21:39   ` kernel test robot
2025-07-29 14:52 ` [PATCH net-next v2 2/2] ARM: dts: stm32: add missing PTP reference clocks on stm32mp13x SoCs 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).