On 18/05/2017 23:29, Hunter Olson wrote: > John, > > I'm going through the same troubles right now on Altera's Cyclone V SOC > platform. > > I've found that if no PTP clock is specified for the emac entry in your > device tree, the stmmac driver defaults to expect the emac clock (250Mhz), > but it seems > Altera is feeding in the eosc1 clock (25mhz). If you run the testptp > application, you'll see the ptp clock is running at 1/10th speed. This is > causing ptp4l > to throw those 'clockcheck' warnings that you're seeing. > > See > _https://github.com/torvalds/linux/commit/bf171f01afe31f0c593deb55b96c3cb9e20cd6dd_ > > <https://github.com/torvalds/linux/commit/bf171f01afe31f0c593deb55b96c3cb9e20cd6dd>for > how to add the ptp clock to your device tree, allowing the driver to grab > the correct ptp clock rate. > > I also backported to Altera's 4.1.22 some ptp related commits that show up in > mainline kernel 4.5, such as: > _https://github.com/torvalds/linux/commit/19d857c9038e5c07db8f8cc02b5ad0cd0098714f > > <https://github.com/torvalds/linux/commit/19d857c9038e5c07db8f8cc02b5ad0cd0098714f>_ > > Like you noticed, I had to bump ptp4l's tx_timestamp_timeout up to 100. > > Still testing, but it appears LinuxPTP H/W timestamping works after these > changes.
From memory there where also issues with the ptp clk config and resets with those older kernels. Some related patches to things I had tofix to get it going.. https://github.com/torvalds/linux/commit/734e00fa02eff5003827abc06a7ebf9449349109 https://github.com/torvalds/linux/commit/e6dbe1eb2db0d7a14991c06278dd3030c45fb825 https://github.com/torvalds/linux/commit/43569814fa35b2ae68f09780c4ee3d4a182711e9 https://github.com/torvalds/linux/commit/27015f8c17578e14b3c6cc098b915b0f8db3ac36 -- Regards Phil Reid ------------------------------------------------------------------------------ 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