This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5706: Multiple instances of PTP OC

Part Number: AM5706
Other Parts Discussed in Thread: AM5708

Tool/software: Linux

Hi:

     I have a custom AM5708 based board and Linux SDK 5.02.

We have an ethernet interface on GMAC and 2 interfaces on ICSS2 PRU.  There will be scenarios where we have PTP OC instances on both GMAC and ICSS (i.e. different master clocks).

  • How does Linux decide which one is the best one?
  • Is there any way of forcing Linux clock to use one of the two available clocks?

Regards

Billa

  • Hi,

    I will look into this question to make sure, but this is probably out of the support context that TI will be able to support since the PTP daemon is above the drivers. The PTP daemon that will be used for the application will most likely be controlling the Linux clock.

    Best Regards,
    Schuyler
  • Billa/Schuyler,

    My observations are that running ptp4l (as ordinary clock) only syncs the master time to the "PTP Hardware Clock (PHC)".  It does not impact the system clock/time.  So for example if you were running PTP on both CPSW and ICSS you would end up with two PHC's:

    • CPSW PHC derived from CPTS
    • ICSS PHC derived from IEP

    In order to synchronize the PHC to the system clock, you need the phc2sys daemon.  When launching phc2sys you can specify which PHC should be synchronized to the system time.  For example, you run something like: 

    phc2sys -s /dev/ptp0 -c CLOCK_REALTIME -w -m

    So you could choose ptp0 or ptp1 when launching phc2sys.

    Best regards,
    Brad