Hi, I am using a custom board with NXP LS1027A SoC which has an integrated ethernet controller (which provides one front facing port, eno0) and an integrated ethernet switch (which provides four front facing ports, swp0-swp3). I want to implement an IEEE1588 boundary clock supporting all five ports. The ethernet controller has attached a different PHC as the ports of the switch has, /dev/ptp0 resp. /dev/ptp1. Nevertheless, with hardware trigger signal, I can ensure that both clocks start at the same time and runs with same frequency, so they will always have the same value (within granularity of about 5 ns) - as long as they are free running, because frequency adjustments and time jumps can not be done atomically for both clocks. The idea was to create a virtual PHC (vclock, /dev/ptp2), based on either one of the two physical PHCs. But while ptp4l prints this info port 1 (eno0): /dev/ptp2 is virtual clock port 2 (swp0): taking /dev/ptp2 from the command line, not the attached ptp1 it seems that swp0 still uses the PHC /dev/ptp1 and frames send on this port contains timestamps derived from /dev/ptp1, while eno0 uses /dev/ptp2, so timestamps on both ports are quite different. I do not really understand what ptp4l is doing when p->phc_index and p->phc_from_cmdline is set - but it seems it is not as I have expected. But I have also recognized that setsockopt(fd, SOL_SOCKET, SO_TIMESTAMPING, ...) fails when used with SOF_TIMESTAMPING_BIND_PHC when vclock is not derived from natively attached PHC.
What would be the best solution to use a common (v)clock for all the interfaces? I want to avoid to synchronize the physical PHCs with phc2sys, because that would be less accurate then using hardware trigger signal which keeps (free running) PHCs on the same value. Many thanks Markus
_______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users