I am currently looking at implementing PTP on our device to function as grandmaster.
We can achieve some decent results with a seperate GNSS module providing reference time and 1-PPS signal hooked to a GPIO.
To achieve better results (<1usec accuracy) it is ideal to connect the 1-PPS signal directly to the FEC via one of the IEEE 1588 4 channel's ENET_1588_EVENT<0-3>_IN pins. (These are muxed with various GPIOpins).
An example of a NIC that supports such behavior is the Intel i210.
Looking at the fec_ptp.c driver it does not currently support any INPUT PPS to control the phc in the fec.
Is there any word on support for this coming soon?
I appreciate any help on this subject.
Thanks,
Rob
ptp fec pps ethernet driver
GPIO capture PPS is not accuracy since system irq latency is us level.
ptp event capture PPS is accuracy since HW capture ptp timer in register/memory, it is not impacted by irq latency.
=> So you can use ptp event capture PPS.
The second step is imx ptp master(ordinary clock) should sync to GPS PPS.
Suppose imx ptp clock source is not GPS output, so it request software to do frequently correction for ptp clock based on PPS interval.
=> So you should implement one arithmetic to do rate correction for ptp clock.
The last, ptp slave sync with imx ptp master(ordinary clock), then ptp slave device PPS output should sync with GPS PPS.
Yes, BSP doesn't support input PPS. But it support output 1PPS.
For your case:
1PPS -> imx GPIO, then imx capture the 1PPS timer
imx ptp master clock second sync to 1PPS timer
imx as ordinary clock -> ptp slave sync to imx ordinary clock