Hi Richard, On Sat, Apr 08, 2017 at 12:57:44PM +0200, Richard Cochran wrote: > Or you can just hack the driver to print clk_get_rate(cpts->refclk).
Cool idea, did that and added this line to drivers/net/ethernet/ti/cpts.c (and noticed who wrote the file) as last line in static void cpts_clk_init() { ... dev_err(dev, "clk_get_rate(cpts->refclk) = %lu", clk_get_rate(cpts->refclk)); } Output: [ 12.012718] cpsw 48484000.ethernet: clk_get_rate(cpts->refclk) = 125000000 It's strange, because from reading CM_GMAC_GMAC_CLKCTRL (L3_CLK is selected as a clock source) and studying the TRM of the AM5728 regarding what is doing the boot ROM code I learned that the value should be 133MHz, but what is printed in the output is 125MHz. Hum. Okay, so I changed cpts_clock_shift = <29>; to cpts_clock_shift = <28>; in arch/arm/boot/dts/dra7.dtsi. Unfortunately that didn't help either, while it changed the ptp4l output: user@arm:~/linuxptp-1.8$ sudo ./ptp4l -i eth1 -s -m -q [sudo] password for user: ptp4l[76.441]: selected /dev/ptp0 as PTP clock ptp4l[76.463]: port 1: INITIALIZING to LISTENING on INITIALIZE ptp4l[76.463]: port 0: INITIALIZING to LISTENING on INITIALIZE ptp4l[76.463]: port 1: link up ptp4l[77.442]: port 1: new foreign master 0050c2.fffe.39e7e1-8 ptp4l[79.442]: selected best master clock 000b72.fffe.0587fa ptp4l[79.442]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE ptp4l[80.345]: port 1: minimum delay request interval 2^3 ptp4l[80.942]: rms 9552511550405 max 9552793492018 freq +500000 +/- 500000 delay -227782976 +/- 776530 ptp4l[81.942]: clockcheck: clock jumped forward or running faster than expected! ptp4l[82.442]: clockcheck: clock jumped forward or running faster than expected! ptp4l[82.941]: clockcheck: clock jumped forward or running faster than expected! ptp4l[83.442]: clockcheck: clock jumped forward or running faster than expected! ptp4l[83.941]: clockcheck: clock jumped forward or running faster than expected! ptp4l[84.441]: clockcheck: clock jumped forward or running faster than expected! ptp4l[84.941]: clockcheck: clock jumped forward or running faster than expected! ptp4l[85.441]: clockcheck: clock jumped forward or running faster than expected! ptp4l[85.941]: clockcheck: clock jumped forward or running faster than expected! ptp4l[86.441]: clockcheck: clock jumped forward or running faster than expected! ptp4l[86.941]: clockcheck: clock jumped forward or running faster than expected! ptp4l[87.441]: clockcheck: clock jumped forward or running faster than expected! ptp4l[87.941]: clockcheck: clock jumped forward or running faster than expected! ptp4l[88.441]: clockcheck: clock jumped forward or running faster than expected! ptp4l[88.941]: clockcheck: clock jumped forward or running faster than expected! ptp4l[89.441]: clockcheck: clock jumped forward or running faster than expected! ptp4l[89.941]: clockcheck: clock jumped forward or running faster than expected! ptp4l[90.441]: clockcheck: clock jumped forward or running faster than expected! ptp4l[90.941]: clockcheck: clock jumped forward or running faster than expected! ptp4l[91.441]: clockcheck: clock jumped forward or running faster than expected! ptp4l[91.941]: clockcheck: clock jumped forward or running faster than expected! ptp4l[92.441]: clockcheck: clock jumped forward or running faster than expected! ptp4l[92.941]: clockcheck: clock jumped forward or running faster than expected! ptp4l[93.441]: clockcheck: clock jumped forward or running faster than expected! ptp4l[93.941]: clockcheck: clock jumped forward or running faster than expected! ptp4l[94.441]: clockcheck: clock jumped forward or running faster than expected! ptp4l[94.941]: clockcheck: clock jumped forward or running faster than expected! ptp4l[95.441]: clockcheck: clock jumped forward or running faster than expected! ptp4l[95.441]: rms 16042529614 max 16321529908 freq +1000000 +/- 0 delay -227006446 +/- 0 ptp4l[95.941]: clockcheck: clock jumped forward or running faster than expected! ptp4l[96.441]: clockcheck: clock jumped forward or running faster than expected! ptp4l[96.441]: rms 17168088472 max 17447241720 freq +1000000 +/- 0 ptp4l[96.941]: clockcheck: clock jumped forward or running faster than expected! ptp4l[97.441]: clockcheck: clock jumped forward or running faster than expected! ptp4l[97.441]: rms 18293668079 max 18572965183 freq +1000000 +/- 0 ptp4l[97.941]: clockcheck: clock jumped forward or running faster than expected! ptp4l[98.441]: clockcheck: clock jumped forward or running faster than expected! ptp4l[98.441]: rms 19419257020 max 19698670451 freq +1000000 +/- 0 and so on... I will now again contact the manufacturer and tell him what I found out, hoping that the manufacturer can fix the issue or at least shed more light on what's going on. Many many thanks and best regards Axel ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users