Re: [PATCH v2 net-next 01/14] dt-bindings: ptp: add NETC Timer PTP clock
From: Vladimir Oltean
Date: Thu Jul 17 2025 - 08:43:21 EST
On Thu, Jul 17, 2025 at 12:55:27PM +0300, Wei Fang wrote:
> > > "system" is the system clock of the NETC subsystem, we can explicitly specify
> > > this clock as the PTP reference clock of the Timer in the DT node. Or do not
> > > add clock properties to the DT node, it implicitly indicates that the reference
> > > clock of the Timer is the "system" clock.
> >
> > It's unusual to name the clock after the source rather than after the
> > destination. When "clock-names" takes any of the above 3 values, it's
> > still the same single IP clock, just taken from 3 different sources.
> >
> > I see you need to update TMR_CTRL[CK_SEL] depending on where the IP
> > clock is sourced from. You use the "clock-names" for that. Whereas the
> > very similar ptp-qoriq uses a separate "fsl,cksel" property. Was that
> > not an acceptable solution, do we need a new way of achieving the same
> > thing?
>
> This an option, as I also mentioned in v1, either we have to parse the
> clock-names or we need to add a new property.
I think a new property like "fsl,cksel" is preferable, due to the
arguments above: already used for ptp_qoriq, and the alternative of
parsing the clock-names implies going against the established convention
that the clock name should be from the perspective of this IP, not from
the perspective of the provider.
> > Also, why are "clocks" and "clock-names" not required properties? The
> > Linux implementation fails probing if they are absent.
>
> The current ptp_netc driver will not fail if they are absent, and it will always
> use the NETC system clock by default, because the system clock of NETC is
> always available to the Timer.
Ok, sorry, I misinterpreted the code.