RE: [PATCH net-next v5 3/5] net: phy: Kconfig: Add ptp library support and 1588 optional flag in Microchip phys
From: Divya.Koppera
Date: Thu Dec 05 2024 - 01:04:49 EST
Hi Andrew,
Thanks for your comments.
> -----Original Message-----
> From: Andrew Lunn <andrew@xxxxxxx>
> Sent: Wednesday, December 4, 2024 9:33 PM
> To: Divya Koppera - I30481 <Divya.Koppera@xxxxxxxxxxxxx>
> Cc: Arun Ramadoss - I17769 <Arun.Ramadoss@xxxxxxxxxxxxx>;
> UNGLinuxDriver <UNGLinuxDriver@xxxxxxxxxxxxx>; hkallweit1@xxxxxxxxx;
> linux@xxxxxxxxxxxxxxx; davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx;
> kuba@xxxxxxxxxx; pabeni@xxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; richardcochran@xxxxxxxxx;
> vadim.fedorenko@xxxxxxxxx
> Subject: Re: [PATCH net-next v5 3/5] net: phy: Kconfig: Add ptp library support
> and 1588 optional flag in Microchip phys
>
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
>
> > > How many different PTP implementations does Microchip have?
> > >
> > > I see mscc_ptp.c, lan743x_ptp.c, lan966x_ptp.c and sparx5_ptp.c.
> > > Plus this one.
> > >
> >
> > These are MAC specific PTP. The library that we implemented is for PHYs.
>
> And the difference is? Marvell has one PTP implementation they use in the
> PHYs and MACs in Ethernet switches. The basic core is the same, with
> different wrappers around it.
>
MAC and PHY uses different PTP IPs. Also register space is different for different PTP IP implementations.
This Microchip PTP Phy library may not be relevant for other implementations.
As I mentioned earlier all future Microchip Phys will use the same IP hence Microchip PTP library will be reused.
> > > Does Microchip keep reinventing the wheel? Or can this library be
> > > used in place of any of these?
> >
>
> > As there are no register similarities between these implementations,
> > we cannot use this library for the above mentioned MAC PTPs.
>
> >
> > >And how many more ptp implementations will microchip have in the
> > >future? Maybe MICROCHIP_PHYPTP is too generic, maybe you should
> > >leave space for the next PTP implementation?
>
> > Microchip plan is to use this PTP IP in future PHYs. Hence this phy
> > library will be reused in future PHYs.
>
> And future MACs?
Future MACs may use different PTP IP.
>
> And has Microchip finial decided not to keep reinventing the wheel, and there
> will never be a new PHY implementation? I ask, because what would its
> KCONFIG symbol be?
>
For all future Microchip PHYs PTP IP will be same, hence the implementation and kconfig symbol is under MICROCHIP_PHYPTP to keep it more generic.
> Andrew
Thanks,
Divya