[Linux-stm32] [PATCH] net: stmmac: Fix PTP ref clock for Tegra234
Andrew Lunn
andrew at lunn.ch
Wed Jun 25 16:24:06 UTC 2025
> > Now, lets consider the case some devices do actually work. How are
> > they working? Must it be the fallback? The ptp-ref clock is actually
> > turned on, and if the ptp-ref clock and the main clock tick at the
> > same rate, ptp would work. I _guess_, if the main clock and the
> > ptp-ref clock tick at different rates, you get something from the ptp
> > hardware, but it probably does not get sync with a grand master, or if
> > it does, the jitter is high etc. So in effect it is still broken.
> >
> > Can somebody with the datasheet actually determine where ptp-ref clock
> > comes from? Is it just a gated main clock? Is it from a pin?
>
> Looking at the datasheet, this is a pin to the controller and sourced from
> an external clock.
So the fallback of the main clock is not likely to help, unless by
chance the external clock and the main clock happen to be the same
frequency.
> AFAIK we have never tested PTP with this driver on this device. So the risk
> of breaking something is low for this device.
So it seems like the simple fix is to list both ptp-ref and ptp_ref,
pointing to the same clock, along with a comment explaining why you
have this odd construction.
Please could you test that?
Andrew
More information about the Linux-stm32
mailing list