On 16/01/2023 10:55, Siddharth Vadapalli wrote: > From: Grygorii Strashko <grygorii.strashko@xxxxxx> > > When CPTS clock is sync/adjusted by running linuxptp (ptp4l) it will cause > PPS jitter as Genf running PPS is not adjusted. > > The same PPM adjustment has to be applied to GenF as to PHC clock to > correct PPS length and keep them in sync. > > Testing: > Master: > ptp4l -P -2 -H -i eth0 -l 6 -m -q -p /dev/ptp1 -f ptp.cfg & > testptp -d /dev/ptp1 -P 1 > ppstest /dev/pps0 > > Slave: > linuxptp/ptp4l -P -2 -H -i eth0 -l 6 -m -q -p /dev/ptp1 -f ptp1.cfg -s & > <port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED;> > testptp -d /dev/ptp1 -P 1 > ppstest /dev/pps0 > > Master log: > source 0 - assert 620.000000689, sequence: 530 > source 0 - assert 621.000000689, sequence: 531 > source 0 - assert 622.000000689, sequence: 532 > source 0 - assert 623.000000689, sequence: 533 > source 0 - assert 624.000000689, sequence: 534 > source 0 - assert 625.000000689, sequence: 535 > source 0 - assert 626.000000689, sequence: 536 > source 0 - assert 627.000000689, sequence: 537 > source 0 - assert 628.000000689, sequence: 538 > source 0 - assert 629.000000689, sequence: 539 > source 0 - assert 630.000000689, sequence: 540 > source 0 - assert 631.000000689, sequence: 541 > source 0 - assert 632.000000689, sequence: 542 > source 0 - assert 633.000000689, sequence: 543 > source 0 - assert 634.000000689, sequence: 544 > source 0 - assert 635.000000689, sequence: 545 > > Slave log: > source 0 - assert 620.000000706, sequence: 252 > source 0 - assert 621.000000709, sequence: 253 > source 0 - assert 622.000000707, sequence: 254 > source 0 - assert 623.000000707, sequence: 255 > source 0 - assert 624.000000706, sequence: 256 > source 0 - assert 625.000000705, sequence: 257 > source 0 - assert 626.000000709, sequence: 258 > source 0 - assert 627.000000709, sequence: 259 > source 0 - assert 628.000000707, sequence: 260 > source 0 - assert 629.000000706, sequence: 261 > source 0 - assert 630.000000710, sequence: 262 > source 0 - assert 631.000000708, sequence: 263 > source 0 - assert 632.000000705, sequence: 264 > source 0 - assert 633.000000710, sequence: 265 > source 0 - assert 634.000000708, sequence: 266 > source 0 - assert 635.000000707, sequence: 267 > > Signed-off-by: Grygorii Strashko <grygorii.strashko@xxxxxx> > Signed-off-by: Siddharth Vadapalli <s-vadapalli@xxxxxx> > --- > drivers/net/ethernet/ti/am65-cpts.c | 59 ++++++++++++++++++++++++----- > 1 file changed, 49 insertions(+), 10 deletions(-) Reviewed-by: Roger Quadros <rogerq@xxxxxxxxxx>