Re: Failed to reinit phy of spacemit-dwmac when reset-gpio is present
Inochi Amaoto <[email protected]> Mon, 13 Jul 2026 06:32:02 +0800
| Newsgroups | dev.linux.lists.spacemit,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-riscv,org.kernel.vger.linux-kernel,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Jul 12, 2026 at 10:55:51AM +0200, Maxime Chevallier wrote: > Hi Inochi, > > On 7/12/26 06:52, Inochi Amaoto wrote: > > TL;DR: > > > > The DWMAC on Spacemit K3 is failled to register phy after the reload > > the driver module (rmmod then insmod). Because the reset-gpio is > > asserted while unloading the driver and is not desserted before reading > > the c22 id, which leads to a fault. > > You're not the first one facing this type of issues, this is a long standing > source of issues. The problem is partially hidden by the fact that often times > the bootloader deals with the PHY reset (like the case you're facing) > > Take a look at these discussions : > > https://lore.kernel.org/netdev/[email protected]/ > > and maybe more intersting, Russell suggested an approach on how we could potentially > address this here : > > https://lore.kernel.org/all/[email protected]/ > > Yeah, I have found these links, but it is something more than I want, so I think I should deal with this carefully. I will have a try if I have enough time, but currently I will send this workaround to dlan to solve the problem.... Regards, Inochi > > --- > > --- a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts > > +++ b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts > > @@ -196,7 +196,8 @@ ð0 { > > > > mdio { > > phy0: phy@1 { > > - compatible = "ethernet-phy-ieee802.3-c22"; > > + compatible = "ethernet-phy-id001c.c916", > > + "ethernet-phy-ieee802.3-c22"; > > Indeed that's merely a workaround :( > > Maxime