net: ethernet: ti: introduce am654 common platform time sync driver
The CPTS module is used to facilitate host control of time sync operations.
Main features of CPTS module are:
- selection of multiple external clock sources
- control of time sync events via interrupt or polling
- 64-bit timestamp mode in ns with HW PPM and nudge adjustment.
- hardware timestamp ext. inputs (HWx_TS_PUSH)
- timestamp Generator function outputs (TS_GENFx)
Depending on integration it enables compliance with the IEEE 1588-2008
standard for a precision clock synchronization protocol, Ethernet Enhanced
Scheduled Traffic Operations (CPTS_ESTFn) and PCIe Subsystem Precision Time
Measurement (PTM).
Introduced driver provides Linux PTP hardware clock for each CPTS device
and network packets timestamping where applicable. CPTS PTP hardware clock
supports following operations:
- Set time
- Get time
- Shift the clock by a given offset atomically
- Adjust clock frequency
- Time stamp external events
- Periodic output signals
- PPS
PPS generation:
AM65x CPTS doesn't have HW support for PPS ("pulse per second”)
signal generation, but it can be modeled by using Time Sync Router and
routing GenFx (periodic signal generator) output to CPTS_HWy_TS_PUSH
(hardware time stamp) input, and configuring GenFx to generate 1sec pulses.
The DT property "ti,pps" has to be used to enable PPS support and
configure pair [CPTS_HWy_TS_PUSH, GenFx].
+------------------------+
| CPTS |
| |
+--->CPTS_HW4_PUSH GENFx+---+
| | | |
| +------------------------+ |
| |
+--------------------------------+
squashed:
net: ethernet: ti: am65-cpts: add pps support
net: ethernet: ti: am65-cpts: fix boot without cpts_refclk_mux
net: ethernet: ti: am65-cpts: add support for J721E SoC
net: ethernet: ti: am65-cpsw: fix sw timestamping for non PTP packets
ethernet: ti: am65-cpts: fix tx ptp timestamp lost
ethernet: ti: am65-cpts: drop timeouted packets only after match
ethernet: ti: am65-cpts: fix incorrect mask in pps adjust
ethernet: ti: am65-cpts: fix long ptp stabilization time (in 5 times)
ethernet: ti: am65-cpts: limit max_adj according to TRM
ethernet: ti: am65-cpts: make fifo event read to be safe
ethernet: ti: am65-cpts: fix ptp clock synchronization entropy
ethernet: ti: am65-cpts: replace ptp clock mutex on spinlock
ethernet: ti: am65-cpts: shorten critical sections for ptp clock lock
Signed-off-by:
Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by:
Sekhar Nori <nsekhar@ti.com>
Loading
Please sign in to comment