Subject: Re: [PATCH RFC net-next] net: phy: add Marvell PHY PTP support

From: "Russell King (Oracle)" <[email-masked]>
Date: Thu, 2 Mar 2023 17:38:41 +0000

On Thu, Mar 02, 2023 at 11:37:52AM +0100, Köry Maincent wrote:
> Hello Russell,
> 
> > I have the situation on a couple of devices where there are multiple
> > places that can do PTP timestamping:
> > 
> > - the PHY (slow to access, only event capture which may not be wired,
> >    doesn't seem to synchronise well - delay of 58000, frequency changes
> >    every second between +/-1500ppb.)
> > - the Ethernet MAC (fast to access, supports event capture and trigger
> >    generation which also may not be wired, synchronises well, delay of
> >    700, frequency changes every second +/- 40ppb.)
> 
> Does this test have been made with the marvell 88E151x PHY?

Yes. Remember, however, that there are many factors that influence
the access latency (as I detailed in my chronologically previous
reply on the other thread.)

> On my side with a zynqMP SOM (cadence MACB MAC) the synchronization of the PHY
> PTP clock is way better: +/-50ppb. Do you have an idea about the difference? 
> Which link partner were you using? stm32mp157 hardware PTP on my side.

Both of my results were through synchronising the PHC with the
machine's local clock (which had already been synchronised via NTP),
thereby creating a "grand master" for my network. That's the only
way to setup a grand master short of purchasing specific kit for
that job (and from what I can see, that's $$$$$ - and out of reach
for your average volunteer kernel maintainer).

I also rigged up the PP2 to provide a PPS signal, connected that to
my TXCO-based frequency counter, measuring the PPS period - which
gives independent measurement of the stability of the PHC. It wasn't
possible to do that with the PHY since the hardware signals aren't
exposed.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!