On Tue, Mar 10, 2020 at 01:17:40PM +0530, Lokesh Vutla wrote: > Timer resolution is entirely dependent on the input clock frequency. 30us > resolution is true only if the input clock frequency of DMTIMER is 32KHz. > AM335x[0] and later TI SoCs provide the following 3 options as the input > clocks > to DMTIMERs that we are concerned with: > - Oscillator clock (24MHz in BBB). Resolution is 42ns
That is better. Still a bit disappointing considering that the resolution is coarser than the expected synchronization accuracy. > Is this information sufficient to consider for a generic user-space solution > :) > Or you have other opinions? It would be useful. I can see several moving parts: - A device tree snippet that configures the clock tree to select TIMERx_GCLK source. - Somehow arrange for the pulse to appear both as an input to CPTS EXTTS and also as an output on a GPIO pin (device tree covers this?) - Kernel driver work to configure the DMTIMER (?) (iirc this is missing from mainline) - Kernel driver work in CPTS to support PTP_EXTTS_REQUEST (and PTP_PIN_SETFUNC?) - User space program that: - configures pwm via sysfs - enables CPTS PHC PIN - enables and reads PTP_EXTTS_REQUESTs - feeds the offsets into a servo - corrects PWM period with servo adjustment via sysfs (please comment/correct the above) I agree that this would be useful. However, this is really device-specific stuff and not general purpose. Possibly we could publish this in linuxptp under contrib/ or something, but my feeling is that it really belongs in its own little project. Does TI have a github or similar from which to publish? In any case, please do post what you have got to this list. I am eager to try it out! Thanks, Richard _______________________________________________ Linuxptp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxptp-devel
