Re: [PATCH net-next v2 2/2] net: phy: Add Marvell PHY PTP support
From: Kory Maincent
Date: Wed Apr 09 2025 - 12:09:00 EST
On Wed, 9 Apr 2025 16:34:36 +0100
"Russell King (Oracle)" <linux@xxxxxxxxxxxxxxx> wrote:
> On Mon, Apr 07, 2025 at 04:03:01PM +0200, Kory Maincent wrote:
> > From: Russell King <rmk+kernel@xxxxxxxxxxxxxxx>
> >
> > From: Russell King <rmk+kernel@xxxxxxxxxxxxxxx>
> >
> > Add PTP basic support for Marvell 88E151x PHYs. These PHYs support
> > timestamping the egress and ingress of packets, but does not support
> > any packet modification.
> >
> > The PHYs support hardware pins for providing an external clock for the
> > TAI counter, and a separate pin that can be used for event capture or
> > generation of a trigger (either a pulse or periodic). This code does
> > not support either of these modes.
> >
> > The driver takes inspiration from the Marvell 88E6xxx DSA and DP83640
> > drivers. The hardware is very similar to the implementation found in
> > the 88E6xxx DSA driver, but the access methods are very different,
> > although it may be possible to create a library that both can use
> > along with accessor functions.
> >
> > Signed-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxx>
> >
> > Add support for interruption.
> > Fix L2 PTP encapsulation frame detection.
> > Fix first PTP timestamp being dropped.
> > Fix Kconfig to depends on MARVELL_PHY.
> > Update comments to use kdoc.
>
> Would you mind forwarding me the changes you actually made so I can
> integrate them into the version I have (which is structured quite
> differently from - what I assume - is a much older version of my
> patches please?
I don't know how you want this but here is a diff with your first patch sent
mainline:
https://termbin.com/gzei
There is also a small fix in the tai part:
https://termbin.com/6a18
> The PTP IP is re-used not only in Marvell PHY drivers but also their
> DSA drivers, and having it all in drivers/net/phy/ as this version
> has does not make sense.
Ok, didn't know that.
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com