lkml.org 
[lkml]   [2021]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH net-next 1/4] dt-bindings: net: add dt binding for realtek rtl82xx phy
Date

Hi Andrew,

> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: 2021年6月2日 10:39
> To: Joakim Zhang <qiangqing.zhang@nxp.com>
> Cc: davem@davemloft.net; kuba@kernel.org; robh+dt@kernel.org;
> hkallweit1@gmail.com; linux@armlinux.org.uk; f.fainelli@gmail.com;
> dl-linux-imx <linux-imx@nxp.com>; netdev@vger.kernel.org;
> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH net-next 1/4] dt-bindings: net: add dt binding for realtek
> rtl82xx phy
>
> > +properties:
> > + rtl821x,clkout-disable:
> > + description: Disable CLKOUT clock.
> > + type: boolean
> > +
> > + rtl821x,aldps-disable:
> > + description: Disable ALDPS mode.
> > + type: boolean
>
> I think most of the problems are the ambiguity in the binding.
>
> If rtl821x,clkout-disable is not present, should it enable the CLKOUT?
> That needs clear define here.
No, don't need to, CLKOUT clock default is enabled after PHY hardware reset. Add this property for users
request to disable this clock output. I will improve the description.

> Do we actually want a tristate here?
>
> rtl821x,clkout = <true>;
>
> means ensure the clock is outputting.
>
> rtl821x,clkout = <false>;
>
> means ensure the clock is not outputting.
I think it's unnecessary. A boolean type here is enough.

> And if the property is not in DT at all, leave the hardware alone, at either its
> default value, or whatever came before has set it to?
Seems not.
1. If enable CLKOUT in boot loader or keep the hardware default value (CLKOUT enabled), DT would work with this patch.
2. If disable CLKOUT in boot loader, with this patch, driver would enable this clock if this property is not in DT.

So, I need first read PHYCR2 register, if DT has property then disable the clock, if not, keep the original value?

However, for ALDPS mode, the hardware default value is disabled. The driver enable ALDPS by default which caused issue at my side. So need a property to disable it.

We had better add a property like " rtl821x,aldps-enable", but It seems break the existing behavior.

Best Regards,
Joakim Zhang
> Andrew
\
 
 \ /
  Last update: 2021-06-02 05:15    [W:0.277 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site