Hi :
When I was running PTP4l in lx2160ardb_rev2, I found that when I restarted the ptp server, the phase of 1PPS output by ptp4l would jump sharply. I expect him to stay in phase and then change slowly.
Thanks
Tianyi
The dts file which you modified is for DPAA1 platform, for LX2160A(DPAA2) you need to modify the following device node in arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
ptp-timer@8b95000 {
compatible = "fsl,dpaa2-ptp";
reg = <0x0 0x8b95000 0x0 0x100>;
clocks = <&clockgen 4 1>;
little-endian;
fsl,extts-fifo;
};
Modify the device node similar as the following:
ptp-timer@8b95000 {
compatible = "fsl,dpaa2-ptp";
reg = <0x0 0x8b95000 0x0 0x100>;
fsl,cksel = <1>;
fsl,tclk-period = <10>;
fsl,tmr-prsc = <10000>;
fsl,tmr-add = <0xccccccccd>;
fsl,tmr-fiper1 = <9999990>;
fsl,tmr-fiper2 = <999990>;
fsl,tmr-fiper3 = <9999990>;
fsl,max-adj = <249999999>;
little-endian;
fsl,extts-fifo;
};
For these parameters configuration, please refer to Documentation/devicetree/bindings/ptp/ptp-qoriq.txt
Hi yipingwang:
抱歉,截图错了。这个才是我们的设备树配置,和你给的参考配置一样。我尝试了各个版本的PTP4L开源代码,都有一样的问题。重启服务器的时候,发现ptp输出的1PPS会有一个相位跳变。我同事告诉我之前别的项目,在别的平台这种场景,PTP输出的PPS是缓慢变化的。我想知道这个是有啥配置我没有配置好,还是说2160的ptp的ip core有啥不一样。
谢谢
天易
Please configure dts file as the following
ptp-timer@8b95000 {
compatible = "fsl,dpaa2-ptp";
reg = <0x0 0x8b95000 0x0 0x100>;
fsl,cksel = <1>;
fsl,tclk-period = <10>;
fsl,tmr-prsc = <10000>;
fsl,tmr-add = <0xccccccccd>;
fsl,tmr-fiper1 = <9999990>;
fsl,tmr-fiper2 = <999990>;
fsl,tmr-fiper3 = <9999990>;
fsl,max-adj = <249999999>;
little-endian;
fsl,extts-fifo;
};
You need to adjust parameters according to the description in Documentation/devicetree/bindings/ptp/ptp-qoriq.txt
感谢您的回复,我通过修改ptp4l的源码,解决了这个问题。有个逻辑 检测到没有报文之后会切换状态,然后输出本地时钟。先保存上次的状态,检测到没有报文的时候,不切换状态。这样就不会切换到本地时钟,看见效果就是重启服务器的时候 PTP失步但是出的PPS不会跳变。
Thanks for your update.