How to enable HW timestamping in PTP

I was able to compile Linux with PTP for the EZ-kit SC589.

Although the datasheet describes that hardware timestamping in the MAC is supported, I was not able to configure the linuxPTP (ptp4l) to use hardware timestamping, on none of the two EMAC's.

Also the timestamping in the Phy doesn't work.

The result of the <ptp4l -m -f ptp4cfg.cfg > command is :

interface 'eth0' does not support requested timestamping mode

The same goes for eth1 when changed in the config file.

The linux compilation is the one as can be downloaded in the cces-linux-add-in version 1.2.0.

Enclosed the config file


Thierry Nolf
  • Hi ,

    Please run “hwstamp_ctl” command before running "ptp4l", below is the test on SC589-EZKIT:

    # hwstamp_ctl -t eth0 -r 7 -t 1

    # ./ethtool -T eth0
    Time stamping parameters for eth0:

    hardware-transmit (SOF_TIMESTAMPING_TX_HARDWARE)
    hardware-receive (SOF_TIMESTAMPING_RX_HARDWARE)
    hardware-raw-clock (SOF_TIMESTAMPING_RAW_HARDWARE)
    PTP Hardware Clock: 0
    Hardware Transmit Timestamp Modes:
    Hardware Receive Filter Modes:
    ptpv1-l4-event (HWTSTAMP_FILTER_PTP_V1_L4_EVENT)
    ptpv1-l4-sync (HWTSTAMP_FILTER_PTP_V1_L4_SYNC)
    ptpv1-l4-delay-req (HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ)
    ptpv2-l4-event (HWTSTAMP_FILTER_PTP_V2_L4_EVENT)
    ptpv2-l4-sync (HWTSTAMP_FILTER_PTP_V2_L4_SYNC)
    ptpv2-l4-delay-req (HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ)
    ptpv2-event (HWTSTAMP_FILTER_PTP_V2_EVENT)
    ptpv2-sync (HWTSTAMP_FILTER_PTP_V2_SYNC)
    ptpv2-delay-req (HWTSTAMP_FILTER_PTP_V2_DELAY_REQ)

    # ptp4l -m -f ptp4lcfg.cfg
    ptp4l[93.242]: selected /dev/ptp0 as PTP clock
    ptp4l[93.272]: port 1: INITIALIZING to LISTENING on INITIALIZE
    ptp4l[93.273]: port 0: INITIALIZING to LISTENING on INITIALIZE

    Thanks a lot.