Re: Failed to reinit phy of spacemit-dwmac when reset-gpio is present
Maxime Chevallier <[email protected]> Sun, 12 Jul 2026 10:55:51 +0200
| 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]> |
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]/ > --- > --- 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