On Tue, Aug 18, 2020 at 02:47:20PM -0700, Jacob Keller wrote: > On 8/18/2020 12:40 PM, Irene Kravets wrote: > > I am using vendor kernel and a vendor-specific PTP driver > > (drivers/net/Ethernet/freescale/fec_ptp.c). I see this driver in the > > mainline kernel as well. What enables PPS output signal is the > > PTP_ENABLE_PPS ioctl sent from linuxptp stack (in phc2sys.c). > > It's possible the driver assumes "PTP_ENABLE_PPS" is for enabling the > PPS output signal. I know I've had plenty of discussion with colleagues > trying to explain the difference between PTP_ENABLE_PPS and > PTP_PEROUT_REQUEST... So I would imagine other vendors might also get > this wrong sometimes.
I did review that driver back in 2014, and I think they are using a capture/compare register on some signal from the MAC. They adjust the registers after every second in SW, with the instantaneous frequency adjustment. I told them it wouldn't work well. I guess that the physical signal they are using just happens appear as an output, or maybe the vendor kernel has extra code to make that happen. In any case, the driver is in fact implementing the "hardpps" that is meant for ntpd, etc. > Enabling the input and output pins should be done through the > PTP_PEROUT_REQUEST and PTP_PIN_SETFUNC ioctls. Right, but I think the MAC on imx does not have a true HW PPS output at all. Thanks, Richard _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users