nuttx/arch/arm
Daniel P. Carvalho 3589fceab3 arch/arm/stm32: implement PTP hardware clock driver (/dev/ptp0)
Implement lower-half PTP hardware clock operations (struct ptp_lowerhalf_s
and struct ptp_ops_s) in the STM32 Ethernet driver and register it with the
generic PTP clock framework (drivers/timers/ptp_clock.c) to expose /dev/ptp0.

Supported operations:
- adjfine: adjust PTP clock frequency in parts per billion (ppb)
- adjphase: adjust PTP clock phase via hardware TSSTU
- adjtime: shift PTP clock time by signed delta in nanoseconds
- gettime: atomic double-read of hardware timestamp registers
- settime: initialize hardware timestamp counter via TSSTI
- getres: return 1 ns clock resolution

Also fix a sign bug in stm32_eth_ptp_adjust() where uint64_t addend
promoted negative ppb adjustments to unsigned, corrupting frequency trim
for crystals running faster than nominal.

Follow-up to #20148 per review recommendation to use the standard POSIX
/dev/ptp0 character driver instead of custom socket ioctls.

Assisted-by: Gemini:gemini-3.8-pro
Signed-off-by: Daniel P. Carvalho <danieloak@gmail.com>
2026-09-19 18:32:45 -03:00
..
include arch/arm/imxrt: Add support for IOMUXC and rgpio for imxrt118x 2026-09-19 22:38:45 +08:00
src arch/arm/stm32: implement PTP hardware clock driver (/dev/ptp0) 2026-09-19 18:32:45 -03:00
CMakeLists.txt arch/arm: migrate to SPDX identifier 2024-12-06 09:25:23 +08:00
Kconfig arch/arm/imxrt: Add imxrt118x_memorymap 2026-09-19 22:38:45 +08:00