It seems like there are use cases for setting the PHC from another time source (like a GPS), for example, when the node needs to be a grandmaster. There is a discussion on this on the user mailing list (https://is.gd/qyYHDt ).
Has it been considered adding a chrony like refclock SOCK interface ( https://is.gd/skln7i) to either ptp4l or phc2sys, where samples could be fed from an external source like the GPS (or other) to set the PHC? What are the pros and cons to this? I realize that there is an indirect route to set the PHC (chrony --> sysclock --> phc2sys --> PHC), but the accuracy will obviously not be what is needed for a grandmaster. And in the other discussion in the link above, there is a suggestion to feed the PPS from the GPS into the PHC, timestamp it, and then use that to train the PHC by some code that needs to be written. But some PHCs do not support timestamping external events. In our case, for example, we are timestamping GPS PPS by the PHC clock in the hardware (FPGA), and it would be useful to have support in ptp4l or phc2sys for a refclock SOCK interface where these samples could be fed. It would be a standard way to do this, and would leverage the existing code.
_______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel