Voon Weifeng
3600be5f58
net: stmmac: add timestamp correction to rid CDC sync error
...
According to Synopsis DesignWare EQoS Databook, the Clock Domain Cross
synchronization error is introduced tue to the clock(GMII Tx/Rx clock)
being different at the capture as compared to the PTP
clock(clk_ptp_ref_i) that is used to generate the time.
The CDC synchronization error is almost equal to 2 times the clock
period of the PTP clock(clk_ptp_ref_i).
On a Intel Tigerlake platform (with Marvell 88E2110 external PHY):
Before applying this patch (with CDC synchronization error):
ptp4l[64.044]: rms 8 max 13 freq +30877 +/- 11 delay 216 +/- 0
ptp4l[65.047]: rms 13 max 20 freq +30869 +/- 17 delay 213 +/- 0
ptp4l[66.050]: rms 12 max 20 freq +30857 +/- 11 delay 213 +/- 0
ptp4l[67.052]: rms 11 max 22 freq +30849 +/- 10 delay 215 +/- 0
ptp4l[68.055]: rms 10 max 16 freq +30853 +/- 13 delay 215 +/- 0
ptp4l[69.057]: rms 7 max 13 freq +30848 +/- 9 delay 216 +/- 0
ptp4l[70.060]: rms 8 max 13 freq +30846 +/- 10 delay 216 +/- 0
ptp4l[71.063]: rms 9 max 15 freq +30836 +/- 8 delay 218 +/- 0
After applying this patch (CDC syncrhonization error is taken care of):
ptp4l[61.516]: rms 773 max 824 freq +31526 +/- 158 delay 200 +/- 0
ptp4l[62.519]: rms 427 max 596 freq +31668 +/- 39 delay 198 +/- 0
ptp4l[63.522]: rms 113 max 206 freq +31482 +/- 57 delay 198 +/- 0
ptp4l[64.525]: rms 40 max 56 freq +31316 +/- 29 delay 200 +/- 0
ptp4l[65.528]: rms 47 max 56 freq +31255 +/- 17 delay 200 +/- 0
ptp4l[66.531]: rms 26 max 36 freq +31246 +/- 9 delay 200 +/- 0
ptp4l[67.534]: rms 12 max 18 freq +31254 +/- 12 delay 202 +/- 0
ptp4l[68.537]: rms 7 max 12 freq +31263 +/- 10 delay 202 +/- 0
Signed-off-by: Voon Weifeng <weifeng.voon@intel.com>
Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-03-17 12:04:33 -07:00
..
2021-03-10 12:45:15 -08:00
2020-12-16 11:37:31 -08:00
2021-03-17 11:42:31 -07:00
2021-02-16 17:51:13 -08:00
2021-02-11 14:38:06 -08:00
2021-03-05 15:05:33 -08:00
2021-03-12 16:48:38 -08:00
2021-03-17 11:42:31 -07:00
2021-03-12 16:44:45 -08:00
2021-01-29 19:02:43 -08:00
2021-03-13 14:18:09 -08:00
2021-01-07 12:53:29 -08:00
2021-03-08 12:01:58 -08:00
2021-01-07 12:53:29 -08:00
2020-12-11 22:29:38 -08:00
2021-03-16 15:29:49 -07:00
2021-03-17 11:42:30 -07:00
2021-02-04 19:07:55 -08:00
2021-03-09 17:15:56 -08:00
2021-03-17 11:42:30 -07:00
2021-03-13 18:06:11 -08:00
2021-03-02 15:28:07 -08:00
2021-03-17 11:22:39 -07:00
2021-01-15 17:53:29 -08:00
2021-03-05 14:42:55 -08:00
2021-03-16 15:49:52 -07:00
2021-01-05 15:59:20 -08:00
2021-03-15 12:48:20 -07:00
2021-03-17 11:42:30 -07:00
2020-12-17 10:54:31 -08:00
2021-03-12 17:09:34 -08:00
2021-03-17 11:42:31 -07:00
2021-03-10 12:45:15 -08:00
2021-03-15 20:41:58 -07:00
2021-03-05 13:00:38 -08:00
2021-03-12 17:50:42 -08:00
2021-02-12 17:08:04 -08:00
2021-02-15 15:20:49 -08:00
2021-01-22 19:16:45 -08:00
2021-01-19 17:46:39 -08:00
2021-01-08 13:39:24 -08:00
2021-03-17 12:04:33 -07:00
2021-03-10 12:45:15 -08:00
2021-02-06 11:37:01 -08:00
2021-03-05 12:59:32 -08:00
2021-02-22 10:05:12 -08:00
2021-01-16 18:13:28 -08:00
2021-02-16 17:51:13 -08:00
2021-01-05 15:43:41 -08:00
2020-12-23 12:28:53 -08:00
2021-01-21 19:48:38 -08:00
2020-12-16 15:01:07 -08:00
2021-01-21 19:48:38 -08:00