Hi experts,
When I test 802.1AS on enetc port of nxp-ls1028 using the lsdk19.09 image of v4.19, the following info shows:
root@nxp-ls1028:~# uname -a
Linux nxp-ls1028 4.19.68-00019-ga5c3ba83fc17 #2 SMP PREEMPT Thu May 21 19:24:23 CST 2020 aarch64 aarch64 aarch64 GNU/Linux
root@nxp-ls1028:~# cd linuxptp-configs/
root@nxp-ls1028:~/linuxptp-configs#
root@nxp-ls1028:~/linuxptp-configs#
root@nxp-ls1028:~/linuxptp-configs# ls
E2E-TC.cfg G.8275.1.cfg P2P-TC.cfg UNICAST-SLAVE.cfg gPTP.cfg
G.8265.1.cfg G.8275.2.cfg UNICAST-MASTER.cfg default.cfg
root@nxp-ls1028:~/linuxptp-configs#
root@nxp-ls1028:~/linuxptp-configs# ptp4l -i eth0 -p /dev/ptp0 -f gPTP.cfg -m
ptp4l[70.877]: interface 'eth0' does not support requested timestamping mode
failed to create a clock
root@nxp-ls1028:~/linuxptp-configs#
Is this right?
Thanks,
Zhantao
Hello Zhantao,
Please check whether Linux Kernel is configured as the following.
Device Drivers --->
[*] Network device support --->
[*] Ethernet driver support --->
[*] Freescale devices
<*>ENETC PTP clock driver
[*] ENETC hardware timestamping support
CONFIG_FSL_ENETC=y
CONFIG_FSL_ENETC_HW_ TIMESTAMPING=y
CONFIG_FSL_ENETC_PTP_ CLOCK=y
Thanks,
Yiping
Hi Yiping,
Thanks a lot for your reply.
In the original config of lsdk1909, there is no config:CONFIG_FSL_ENETC_HW_ TIMESTAMPING=y.
After I added this config and run the boards with the built image, the ptp4l shows the followings on the two boards:
root@nxp-ls1028:~# ptp4l -i eth0 -p /dev/ptp0 -f gPTP.cfg -m
ptp4l[87.406]: selected /dev/ptp0 as PTP clock
ptp4l[87.440]: driver changed our HWTSTAMP options
ptp4l[87.440]: tx_type 1 not 1
ptp4l[87.440]: rx_filter 1 not 12
ptp4l[87.440]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[87.440]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[87.440]: port 1: link up
ptp4l[90.485]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[90.485]: selected best master clock 22fa84.fffe.480bac
ptp4l[90.485]: assuming the grand master role
Any other config should be added?
Thanks,
Zhantao
This log looks normal, what's your current problem.
The right info should be like the followings:
On Board1:
root@nxp-ls1028:~# ptp4l -i eth0 -p /dev/ptp0 -f gPTP.cfg -m
ptp4l[87.406]: selected /dev/ptp0 as PTP clock
ptp4l[87.440]: driver changed our HWTSTAMP options
ptp4l[87.440]: tx_type 1 not 1
ptp4l[87.440]: rx_filter 1 not 12
ptp4l[87.440]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[87.440]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[87.440]: port 1: link up
ptp4l[90.485]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[90.485]: selected best master clock 22fa84.fffe.480bac
ptp4l[90.485]: assuming the grand master role
On Board2:
ptp4l[51082.168]: selected /dev/ptp0 as PTP clockth3 -p /dev/ptp0 -f gPTP.cfg -m
ptp4l[51082.208]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[51082.208]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[51086.081]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[51086.081]: selected local clock aa67f9.fffe.127b50 as best master
ptp4l[51086.081]: assuming the grand master role
ptp4l[51098.909]: port 1: new foreign master 4a0408.fffe.2b9db0-1
ptp4l[51100.909]: selected best master clock 4a0408.fffe.2b9db0
ptp4l[51100.909]: port 1: MASTER to UNCALIBRATED on RS_SLAVE
ptp4l[51101.534]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
ptp4l[51102.159]: rms 2338820127 max 4677640399 freq -3607 +/- 3092 delay 660 +/- 0
ptp4l[51103.159]: rms 977 max 1507 freq -131 +/- 1302 delay 660 +/- 0
ptp4l[51104.159]: rms 1609 max 1689 freq +2744 +/- 417 delay 659 +/- 0
ptp4l[51105.159]: rms 1006 max 1336 freq +3285 +/- 45 delay 660 +/- 0
ptp4l[51106.159]: rms 320 max 522 freq +2965 +/- 117 delay 660 +/- 0
ptp4l[51107.159]: rms 59 max 105 freq +2618 +/- 72 delay 660 +/- 0
ptp4l[51108.159]: rms 96 max 104 freq +2457 +/- 32 delay 660 +/- 0
ptp4l[51109.160]: rms 57 max 96 freq +2432 +/- 15 delay 662 +/- 0
ptp4l[51110.160]: rms 20 max 34 freq +2449 +/- 11 delay 662 +/- 0
ptp4l[51111.160]: rms 11 max 17 freq +2475 +/- 14 delay 662 +/- 0
ptp4l[51112.160]: rms 7 max 14 freq +2476 +/- 8 delay 660 +/- 0
ptp4l[51113.160]: rms 11 max 23 freq +2485 +/- 13 delay 660 +/- 0
ptp4l[51114.160]: rms 9 max 18 freq +2479 +/- 12 delay 660 +/- 0
ptp4l[51115.160]: rms 9 max 16 freq +2479 +/- 12 delay 659 +/- 0
There should be one master and the other is slave.
Yes. This code is extremely useful. Thank you so much UPSers