Discussion:
[Linuxptp-users] PTP4L - i.MX6 implementation question
Hugh Reynolds
2017-03-01 13:04:48 UTC
Permalink
Perhaps this is not the correct list to post this question but we are trying
to use PTP4L on an i.MX6.



The hardware timestamp counter seems to be stuck.

We can set it using phc_ctl, but it doesn't count.



On the i.MX6 configuration:

The GPR1 bits are being set in init imx6q_1588_init(void) from the
mach-imx6q.c file........we've added debug so we know that line of code is
being executed.

Our dtsi file includes the line MX6QDL_PAD_GPIO_16__ENET_REF_CLK
0x4001b0b1



What else do I need to do? Any help would be greatly appreciated.



Regards



Hugh





---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Richard Cochran
2017-03-02 05:36:50 UTC
Permalink
Post by Hugh Reynolds
The hardware timestamp counter seems to be stuck.
We can set it using phc_ctl, but it doesn't count.
Sounds like a missing peripheral clock enable.

I have never used or tested the imx6 ptp driver, and so I don't have
any specific wisdom to offer. In general I find the freescale^Wnxp
kernel SW to be of dubious quality, and so my only advice is to go
through every last register bit and make sure their code is correct.

<rant>

Their vendor kernels are particularly bad. On one project a few years
back, the Ethernet port stopped working with freescale's newer kernel.
Turns out that they unconditionally enabled the PTP clock output on
one of the MII input lines. This was done with a one-liner buried
deep within the board setup code under arch/arm/mach. By the time I
figured this out, the PHY was toast.

But hey, the code worked on their development kit, so who can complain?

</rant>

Thanks,
Richard
Jan Deinhard
2017-03-02 08:54:21 UTC
Permalink
Post by Richard Cochran
Post by Hugh Reynolds
The hardware timestamp counter seems to be stuck.
We can set it using phc_ctl, but it doesn't count.
Sounds like a missing peripheral clock enable.
I have never used or tested the imx6 ptp driver, and so I don't have
any specific wisdom to offer. In general I find the freescale^Wnxp
kernel SW to be of dubious quality, and so my only advice is to go
through every last register bit and make sure their code is correct.
I am currently working with two i.MX6 UL Eval Boards. I tried with one of
the boards as master and the other one as slave as well as my workstation
as master and the boards as slaves. It works but I didn't do any comparison
with other setups. I had more problems with the drivers for the onboard
network interface in my workstation. Now I use the Intel i210.

I can not say much about quality of the NXP/Freescale driver code though.
To date, I just skimmed some code to get a rough understanding how their
PTP support is implemented.

Best
Jan

Loading...