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 13:12:41 +0000 [thread overview]
Message-ID: <aXtcydbhclLAxDWZ@shell.armlinux.org.uk> (raw)
In-Reply-To: <20260129111726.jjkcq46dpghuorco@pengutronix.de>
On Thu, Jan 29, 2026 at 12:17:26PM +0100, Marco Felsch wrote:
> IMHO this flag should be removed completely because it makes the
> phy-driver mac-driver dependent. Since the FEC is the only driver
> checking this flag.
From what I can see, the _only_ caller of phy_reset_after_clk_enable()
is the FEC driver. However, we seem to have DP83848C, DP83848C,
DP83620, TLK10X, LAN8710, LAN8720, LAN8740, and LAN8742 all needing
this flag. As also pointed out, other PHYs also require their XTAL
based clock to be running before reset is released.
This reconfirms my statements that this is *not* a PHY issue, but an
issue that afflicts FEC based systems because, on these systems, there
seems to be a tendency for hardware designers to omit the PHY's crystal
and source the PHY clock from the SoC.
My guess is that this doesn't happen anywhere else (since no workaround
is necessary.)
So, this backs up my stance that "this PHY requires a special reset
sequence" is incorrect.
Hence, I think PHY_RST_AFTER_CLK_EN + phy_reset_after_clk_enable()
should be entirely removed.
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.
--
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 13:12 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) [this message]
2026-01-29 13:19 ` Russell King (Oracle)
2026-01-29 14:30 ` Russell King (Oracle)
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=aXtcydbhclLAxDWZ@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