Re: [net-next PATCH] octeontx2: Add PTP clock driver for Octeon PTM clock.

Sai Krishna Gajula
2024-01-29T15:08:54Z

> -----Original Message-----
> From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
> Sent: Friday, January 26, 2024 5:41 AM
> To: Sai Krishna Gajula <saikrishnag@marvell.com>;
> richardcochran@gmail.com; davem@davemloft.net; kuba@kernel.org;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Sunil Kovvuri
> Goutham <sgoutham@marvell.com>; Geethasowjanya Akula
> <gakula@marvell.com>; Linu Cherian <lcherian@marvell.com>; Hariprasad
> Kelam <hkelam@marvell.com>; Subbaraya Sundeep Bhatta
> <sbhatta@marvell.com>
> Cc: Sai Krishna Gajula <saikrishnag@marvell.com>; Naveen Mamindlapalli
> <naveenm@marvell.com>
> Subject: Re: [net-next PATCH] octeontx2: Add PTP clock driver for
> Octeon PTM clock.
>
> Sai Krishna <saikrishnag@marvell.com> writes:
>
> > The PCIe PTM(Precision time measurement) protocol provides precise
> > coordination of events across multiple components like PCIe host
> > clock, PCIe EP PHC local clocks of PCIe devices. This patch adds
> > support for ptp clock based PTM clock. We can use this PTP device to
> > sync the PTM time with CLOCK_REALTIME or other PTP PHC devices using
> > phc2sys.
> >
> > Signed-off-by: Sai Krishna <saikrishnag@marvell.com>
> > Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>
> > Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
> > ---
>
> I can see that the same device id (PCI_DEVID_OCTEONTX2_PTP) is used by a
> ethernet driver.
>
> That brings me a question: why expose a different PTP chardev? In other
> words, why can't you just implement .getcrosststamp() for that ethernet
> device?

This driver runs on endpoint device and not on the host. getcrosststamp() needs ART time, frequency details in case of x86 host system. Our use case is to sync the host's PTP/PTM time to the endpoint device via PTM interface.

>
>
> Cheers,
> --
> Vinicius