From: Marek Vasut <marex@denx.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org,
"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Subject: Re: [PATCH] arm64: dts: renesas: white-hawk-cpu: Move avb0 reset gpio to mdio node
Date: Fri, 6 Sep 2024 20:09:19 +0200 [thread overview]
Message-ID: <50b37c36-643c-4307-9d4e-ad49b306ba8a@denx.de> (raw)
In-Reply-To: <CAMuHMdXRhUr1My-w0+hoAhQKgOq9iwecjow4iZTh82ED5DEfdA@mail.gmail.com>
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@denx.de> 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@ragnatech.se> 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.
next prev parent reply other threads:[~2024-09-06 18:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 15:26 [PATCH] arm64: dts: renesas: white-hawk-cpu: Move avb0 reset gpio to mdio node Niklas Söderlund
2024-08-02 8:33 ` Geert Uytterhoeven
2024-08-02 17:16 ` Marek Vasut
2024-08-22 13:56 ` Geert Uytterhoeven
2024-09-06 13:52 ` Niklas Söderlund
2024-09-06 18:09 ` Marek Vasut [this message]
2024-10-15 14:48 ` Niklas Söderlund
2024-10-20 22:16 ` Marek Vasut
2024-10-21 7:13 ` Geert Uytterhoeven
2024-10-21 21:31 ` Marek Vasut
2024-10-22 7:38 ` Geert Uytterhoeven
2024-10-27 15:21 ` Marek Vasut
2024-10-28 10:13 ` Geert Uytterhoeven
2024-10-28 18:18 ` Marek Vasut
2024-10-29 8:26 ` Geert Uytterhoeven
2024-10-30 14:45 ` Marek Vasut
2025-01-23 13:18 ` Niklas Söderlund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50b37c36-643c-4307-9d4e-ad49b306ba8a@denx.de \
--to=marex@denx.de \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=krzk+dt@kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=niklas.soderlund+renesas@ragnatech.se \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).