Re: [PATCH] arm64: dts: renesas: white-hawk-cpu: Move avb0 reset gpio to mdio node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On 2024-09-06 20:09:19 +0200, Marek Vasut wrote:
> On 8/22/24 3:56 PM, Geert Uytterhoeven wrote:
> > Hi Marek,
> 
> Hi,
> 
> sorry for the delay.
> 
> > On Fri, Aug 2, 2024 at 7:16 PM Marek Vasut <marex@xxxxxxx> wrote:
> > > On 8/2/24 10:33 AM, Geert Uytterhoeven wrote:
> > > > What is your stance on this?
> > 
> > > > On Thu, Jul 4, 2024 at 5:26 PM Niklas Söderlund
> > > > <niklas.soderlund+renesas@xxxxxxxxxxxx> wrote:
> > > > > When creating a dedicated mdio node to describe the bus the gpio reset
> > > > > property was erroneously left in the phy node. The reason for adding
> > > > > mdio nodes on WhiteHawk was to ensure the PHYs where reset before they
> > > > > were probed, keeping the property in the phy node prevented this.
> > > 
> > > If the PHYs should be reset before they are probed, that is something
> > > the PHY driver should take care of, right ? The PHY driver can bind to
> > > the PHY via compatible string. Does the PHY driver not reset the PHYs ?
> > 
> > AFAIK, there is no requirement to reset the PHY before it is probed.
> 
> That would mean the PHY is in undefined state before it is probed, which is
> not good.
> 
> > However, the reset signal may be in asserted state when the PHY is
> > probed (e.g. after unbind from the Ethernet driver, or during kexec).
> > Identifying the PHY by reading the ID register requires deasserting
> > the reset first.
> That may not be the entire precondition. For example the SMSC LAN87xx PHYs
> also require PHY clock to be enabled before the reset is toggled, but such
> information is available only to the specific PHY driver.
> 
> The MDIO-level reset GPIO handling, as far as I understand it, applies in
> case there are more PHYs on the MDIO bus which share the same reset GPIO
> line.
> 
> In this case there is only one PHY on the MDIO bus, so the only bit which
> applies is the potential PHY-specific reset requirement handling. If the PHY
> driver ever gets extended with such a thing in the future, then having the
> reset-gpios in the PHY node is beneficial over having it in MDIO node.
> 
> It will always be a compromise between the above and best-effort PHY
> auto-detection though.

I agree this is not needed if the PHY is identified by the compatible 
string, but might be if it is not. In this case it works and the reason 
for this patch was just to align the style used here.

I'm happy to drop this patch, or send a rebased version that applies 
since the context changed ;-) Marek, Geert what is your view? I'm happy 
with either option.

-- 
Kind Regards,
Niklas Söderlund




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux