[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<PAXPR04MB851096B3E7F59181C7377A128851A@PAXPR04MB8510.eurprd04.prod.outlook.com>
Date: Thu, 17 Jul 2025 09:55:27 +0000
From: Wei Fang <wei.fang@....com>
To: Vladimir Oltean <vladimir.oltean@....com>
CC: Krzysztof Kozlowski <krzk@...nel.org>, "robh@...nel.org"
<robh@...nel.org>, "krzk+dt@...nel.org" <krzk+dt@...nel.org>,
"conor+dt@...nel.org" <conor+dt@...nel.org>, "richardcochran@...il.com"
<richardcochran@...il.com>, Claudiu Manoil <claudiu.manoil@....com>, Clark
Wang <xiaoning.wang@....com>, "andrew+netdev@...n.ch"
<andrew+netdev@...n.ch>, "davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>, "kuba@...nel.org"
<kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
"vadim.fedorenko@...ux.dev" <vadim.fedorenko@...ux.dev>, Frank Li
<frank.li@....com>, "shawnguo@...nel.org" <shawnguo@...nel.org>,
"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>, "festevam@...il.com"
<festevam@...il.com>, "F.S. Peng" <fushi.peng@....com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"imx@...ts.linux.dev" <imx@...ts.linux.dev>, "kernel@...gutronix.de"
<kernel@...gutronix.de>
Subject: RE: [PATCH v2 net-next 01/14] dt-bindings: ptp: add NETC Timer PTP
clock
> On Thu, Jul 17, 2025 at 11:30:14AM +0300, Wei Fang wrote:
> > > On Wed, Jul 16, 2025 at 03:30:58PM +0800, Wei Fang wrote:
> > > > +properties:
> > > > + compatible:
> > > > + enum:
> > > > + - pci1131,ee02
> > > > +
> > > > + reg:
> > > > + maxItems: 1
> > > > +
> > > > + clocks:
> > > > + maxItems: 1
> > > > + description:
> > > > + The reference clock of NETC Timer, if not present, indicates that
> > > > + the system clock of NETC IP is selected as the reference clock.
> > >
> > > If not present...
> > >
> > > > +
> > > > + clock-names:
> > >
> > > ... this also is not present...
> > >
> > > > + description:
> > > > + NETC Timer has three reference clock sources, set
> TMR_CTRL[CK_SEL]
> > > > + by parsing clock name to select one of them as the reference
> clock.
> > > > + The "system" means that the system clock of NETC IP is used as
> the
> > > > + reference clock.
> > > > + The "ccm_timer" means another clock from CCM as the reference
> clock.
> > > > + The "ext_1588" means the reference clock comes from external
> IO pins.
> > > > + enum:
> > > > + - system
> > >
> > > So what does system mean?
> > >
> >
> > "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.
> 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.
Powered by blists - more mailing lists