From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: Michael Nazzareno Trimarchi <michael@amarulasolutions.com>,
Andrew Lunn <andrew@lunn.ch>, Wei Fang <wei.fang@nxp.com>,
Shenwei Wang <shenwei.wang@nxp.com>,
Clark Wang <xiaoning.wang@nxp.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
"open list:FREESCALE IMX / MXC FEC DRIVER" <imx@lists.linux.dev>,
"open list:FREESCALE IMX / MXC FEC DRIVER"
<netdev@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] net: phy: integrate reset-after-clock quirk into phy_init_hw
Date: Thu, 29 Jan 2026 14:30:32 +0000 [thread overview]
Message-ID: <aXtvCN6-QDUGbi0P@shell.armlinux.org.uk> (raw)
In-Reply-To: <aXteX2YyH3LyDXq-@shell.armlinux.org.uk>
On Thu, Jan 29, 2026 at 01:19:28PM +0000, Russell King (Oracle) wrote:
> On Thu, Jan 29, 2026 at 01:12:41PM +0000, Russell King (Oracle) wrote:
> > Another possible solution beyond those I've already stated, given that
> > this only afflicts the FEC driver, ould be for the FEC MDIO driver to
> > walk the child nodes, checking to see whether they require any clocks,
> > and ensuring that those are properly initialised before registering the
> > MDIO bus.
> >
> > Since the MDIO bus layer can release the PHY reset just before probing
> > the driver, this seems to me to be the only way to guarantee that,
> > where boot firmware does not deal with this, the PHY manufacturers
> > specification for the initial release of reset can be met while keeping
> > this FEC specific behaviour out of the core MDIO/phylib layers.
>
> I'll also add... as kernel developers, we're not very good at insisting
> on generic names for things like clocks (see the mess that is stmmac,
> where the dwmac's various clock signals are named differently in the
> many platform glues.)
>
> So, I guess that FEC MDIO may need to have a list of clock names to
> look for when inspecting the PHY nodes if the clock is even specified
> there. If it isn't, then some other way of discovering that the PHY
> needs a clock (looking at the pinctrl configuration to see whether
> the pin is configured to output a clock to the PHY?) would need to be
> added.
>
> However, care needs to be taken in the case where the PHY has already
> been setup by boot firmware, that the clock signal is not disturbed,
> as interrupting it could provoke PHY problems - especially if the
> platform doesn't have the PHY reset specified in DT.
A further issue to add following on from that last paragraph is whether
one is indeed permitted to stop the PHYs XTAL/reference clock or not
after the PHY has been setup. This would depend on the design of the
PHY.
The safe thing to do is not to stop the clock, but if it is desirable
to do so with PHYs that allow it, and provided they do not lose
settings as a result, then we would need some way to inform the MDIO
bus layer when it is safe to stop those clocks. That would require
phylib/mdio code changes to have the driver indicate that this PHY
permits the clock to be stopped.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2026-01-29 14:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 9:46 [RFC PATCH] net: phy: integrate reset-after-clock quirk into phy_init_hw Michael Trimarchi
2026-01-28 13:25 ` Andrew Lunn
2026-01-28 13:33 ` Michael Nazzareno Trimarchi
2026-01-28 13:58 ` Russell King (Oracle)
2026-01-28 14:34 ` Michael Nazzareno Trimarchi
2026-01-28 20:26 ` Marco Felsch
2026-01-28 20:51 ` Andrew Lunn
2026-01-28 21:04 ` Michael Nazzareno Trimarchi
2026-01-28 21:20 ` Michael Nazzareno Trimarchi
2026-01-28 21:45 ` Andrew Lunn
2026-01-28 22:17 ` Russell King (Oracle)
2026-01-28 22:48 ` Russell King (Oracle)
2026-01-28 22:13 ` Russell King (Oracle)
2026-01-29 10:41 ` Marco Felsch
2026-01-29 10:55 ` Russell King (Oracle)
2026-01-29 11:17 ` Marco Felsch
2026-01-29 13:12 ` Russell King (Oracle)
2026-01-29 13:19 ` Russell King (Oracle)
2026-01-29 14:30 ` Russell King (Oracle) [this message]
2026-01-30 2:25 ` Wei Fang
2026-02-11 9:21 ` Michael Nazzareno Trimarchi
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=aXtvCN6-QDUGbi0P@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.felsch@pengutronix.de \
--cc=michael@amarulasolutions.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shenwei.wang@nxp.com \
--cc=wei.fang@nxp.com \
--cc=xiaoning.wang@nxp.com \
/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