Re: [PATCH] dts: riscv: spacemit: k3: Fix I/O power settings

From: Yixun Lan

Date: Fri Jun 05 2026 - 05:02:47 EST


Hi E Shattow,

On 13:17 Wed 03 Jun , E Shattow wrote:
>
> Hi Yixun,
>
> This property on its own does not seem to be enough to get the ethernet
> network port functional on Sipeed K3 Pico-ITX 32GB model that I have,
> when it is loading Debian 13 Trixie debian-installer netinst initramfs
> (with cross-compiled Linux kernel and modules from -next 20260602).
>
I don't think your problem directly connect to this pacth..

> Reproducer instructions for cross-compiling and debian-installer netinst
> initramfs modification at:
> https://wiki.debian.org/InstallingDebianOn/SpacemiT/K3PicoITX?action=recall&rev=2
>
> In addition to those instructions above I am using within the factory
> pre-installed vendor U-Boot the following commands to try what your
> patch does:
>
> fdt addr $fdt_addr_r
> fdt resize
> fdt header get filesize totalsize
> fdt rm /soc/pinctrl@d401e000 spacemit,apbc
> fdt get value spacemit_apbc_phandle /soc/system-controller@d4015000 phandle
> fdt set /soc/pinctrl@d401e000 spacemit,apbc <$spacemit_apbc_phandle>
>
> I then verify within Linux environment the presence of
> /sys/firmware/devicetree/base/soc/pinctrl@d401e000/spacemit,apbc
>
> The same Linux kernel and modules as modified into the installer then do
> have functional ethernet networking on that board if running from the
> installed system and with the spacemit,apbc devicetree property. Is this
> a dependency or ordering issue of the modules, or the Kconfig options?
>
I've checked with the failure kernel dmesg log (you provided offline),
the dwmac driver has been probed twice, with first time failed, it
might be the PHY driver not been initialized, adjust following
configuration works for me..

CONFIG_STMMAC_ETH=y
CONFIG_REALTEK_PHY=y
CONFIG_I2C_K1=y

the PMIC/Power Regulator rely on I2C driver..

> Also, the more general problem is that cycling rmmod and modprobe on the
> ethernet networking related modules fails:
>
> rmmod dwmac_spacemit
> rmmod stmmac_platform
> rmmod stmmac
> rmmod mdio
> modprobe dwmac_spacemit
>
> [ 1487.618517] mdio_bus stmmac-0: MDIO device at address 1 is missing.
>
> [ 1487.623815] spacemit-dwmac cac80000.ethernet end0: renamed from eth0
>
> rmmod dwmac_spacemit
> rmmod stmmac_platform
> rmmod stmmac
> rmmod mdio
> modprobe dwmac_spacemit
>
Need to investigate, could be problem of resource deinitialization issue..

> [ 1539.374486] spacemit-dwmac cac80000.ethernet end0: cannot attach to
> PHY (erro
> r: -ENODEV)
> [ 1615.299451] spacemit-dwmac cac80000.ethernet end0: stmmac_dvr_remove:
> removin
> g driver
>
> Please advise how to troubleshoot? Thanks,
>
> - E Shattow
>

--
Yixun Lan (dlan)