Subject: Re: [PATCH net-next v2 3/3] net: phy: dp83822: Add support for changing the MAC termination

From: Rob Herring <[email-masked]>
Date: Fri, 11 Apr 2025 10:04:48 -0500

On Tue, Apr 08, 2025 at 07:18:31PM +0200, Dimitri Fedrau wrote:
> On Tue, Apr 08, 2025 at 03:28:32PM +0200, Andrew Lunn wrote:
> > On Tue, Apr 08, 2025 at 01:01:17PM +0000, Fedrau Dimitri (LED) wrote:
> > > -----Ursprüngliche Nachricht-----
> > > Von: Andrew Lunn <[email-masked]> 
> > > Gesendet: Dienstag, 8. April 2025 14:47
> > > An: Fedrau Dimitri (LED) <[email-masked]>
> > > Cc: Heiner Kallweit <[email-masked]>; Russell King <[email-masked]>; David S. Miller <[email-masked]>; Eric Dumazet <[email-masked]>; Jakub Kicinski <[email-masked]>; Paolo Abeni <[email-masked]>; Rob Herring <[email-masked]>; Krzysztof Kozlowski <[email-masked]>; Conor Dooley <[email-masked]>; Florian Fainelli <[email-masked]>; [email-masked]; [email-masked]; [email-masked]; Dimitri Fedrau <[email-masked]>
> > > Betreff: Re: [PATCH net-next v2 3/3] net: phy: dp83822: Add support for changing the MAC termination
> > > 
> > > > > +static const u32 mac_termination[] = {
> > > > > +	99, 91, 84, 78, 73, 69, 65, 61, 58, 55, 53, 50, 48, 46, 44, 43,
> > > > 
> > > > Please add this list to the binding.
> > > 
> > > Add this list to "ti,dp83822.yaml" ?
> > 
> > Yes please. Ideally we want the DT validation tools to pick up invalid
> > values before they reach the kernel.
> >
> Ok, but then I would have to add "mac-termination-ohms" property to
> "ti,dp83822.yaml" as well together with the allowed values ? Ending up in
> some sort of duplication, because the property is already defined in
> "ethernet-phy.yaml". Is this the right way to do it ?

It is not duplication because you are adding constraints. I was thinking 
the definition in ethernet-phy.yaml should have some logical limit. Say
200 ohms as termination resistance is typically 10s of ohms. 

Seems like a long list to define to me, but if the driver is going to 
reject unknown values it makes sense. You could also make the driver 
just pick the closest match rather than require an exact match. 
Resistance values are nominal anyways.

Rob