Failed to reinit phy of spacemit-dwmac when reset-gpio is present
Maxime Chevallier
maxime.chevallier at bootlin.com
Sun Jul 12 01:55:51 PDT 2026
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/cover.1761732347.git.buday.csaba@prolan.hu/
and maybe more intersting, Russell suggested an approach on how we could potentially
address this here :
https://lore.kernel.org/all/aTBeVTlsElGXUCSN@shell.armlinux.org.uk/
> ---
> --- 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 at 1 {
> - compatible = "ethernet-phy-ieee802.3-c22";
> + compatible = "ethernet-phy-id001c.c916",
> + "ethernet-phy-ieee802.3-c22";
Indeed that's merely a workaround :(
Maxime
More information about the linux-riscv
mailing list