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

E Shattow e at freeshell.de
Fri Jun 5 03:12:07 PDT 2026



On 6/5/26 01:58, Yixun Lan wrote:
> 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 at d401e000 spacemit,apbc
>> fdt get value spacemit_apbc_phandle /soc/system-controller at d4015000 phandle
>> fdt set /soc/pinctrl at d401e000 spacemit,apbc <$spacemit_apbc_phandle>
>>
>> I then verify within Linux environment the presence of
>> /sys/firmware/devicetree/base/soc/pinctrl at 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
>>
> 

Yes, confirming now that the network is functional (with -next 20260603
from 4th Jun 2026, inclusive of this patch as-is) in debian-installer
netinst by manually configure and ping the network interface before the
application begins the network probe action. After the network probe
action the network device is not reachable.

I'm not experienced with internals of debian-installer to know if the
module is rmmod/modprobe cycled or how else this may be triggered by the
debian-installer application and its network probe action. I do note the
following, that 'lsmod' output has changed:

 Module                  Size  Used by
 sd_mod                167936  0
 uas                    36864  0
 usb_storage           110592  1 uas
 scsi_mod              405504  3 sd_mod,usb_storage,uas
 scsi_common            20480  4 scsi_mod,sd_mod,usb_storage,uas
 onboard_usb_dev        24576  0
 xhci_plat_hcd          24576  0
 xhci_hcd              569344  1 xhci_plat_hcd
 dwc3_generic_plat      12288  0
 dwc3                  471040  1 dwc3_generic_plat
-realtek                61440  0
+realtek                61440  1
 phy_package            16384  1 realtek
 udc_core              114688  1 dwc3
 roles                  20480  1 dwc3
 dwmac_spacemit         12288  0
 stmmac_platform        40960  1 dwmac_spacemit
 stmmac                495616  2 stmmac_platform,dwmac_spacemit
 usbcore               536576  6
xhci_hcd,onboard_usb_dev,usb_storage,uas,xhci_pl
 at_hcd,dwc3
 pcs_xpcs               36864  1 stmmac
 phylink               118784  2 stmmac,pcs_xpcs
 i2c_k1                 28672  0
 usb_common             24576  6
xhci_hcd,usbcore,dwc3_generic_plat,xhci_plat_hcd
 ,dwc3,udc_core
 phy_k1_usb2            12288  2

before and after probe respectively. There is no other change in the
'lsmod' output. The corresponding change in dmesg as follows:

 [    4.911996]  sda: sda1

 [    4.912160] sd 0:0:0:0: [sda] Attached SCSI removable disk

 [   14.820291] workqueue: work func deferred_probe_timeout_work_func
enqueued on deprecated workqueue. Use system_{percpu|dfl}_wq instead.

+[   33.767106] dldo4: disabling

+[   47.890240] spacemit-dwmac cac80000.ethernet end0: Register
MEM_TYPE_PAGE_POOL RxQ-0
+[   47.920334] spacemit-dwmac cac80000.ethernet end0: PHY [stmmac-0:01]
driver [RTL8211F Gigabit Ethernet] (irq=POLL)

+[   47.921411] dwmac4: Master AXI performs any burst length

+[   47.921426] spacemit-dwmac cac80000.ethernet end0: No Safety
Features support found
+[   47.921791] spacemit-dwmac cac80000.ethernet end0: IEEE 1588-2008
Advanced Timestamp supported

+[   47.921958] spacemit-dwmac cac80000.ethernet end0: registered PTP
clock
+[   47.921966] spacemit-dwmac cac80000.ethernet end0: configuring for
phy/rgmii-id link mode

+[   49.087144] spacemit-dwmac cac80000.ethernet end0: Register
MEM_TYPE_PAGE_POOL RxQ-0
+[   49.128304] spacemit-dwmac cac80000.ethernet end0: PHY [stmmac-0:01]
driver [RTL8211F Gigabit Ethernet] (irq=POLL)

+[   49.238342] dwmac4: Master AXI performs any burst length

+[   49.238357] spacemit-dwmac cac80000.ethernet end0: No Safety
Features support found
+[   49.238400] spacemit-dwmac cac80000.ethernet end0: IEEE 1588-2008
Advanced Timestamp supported

+[   49.238580] spacemit-dwmac cac80000.ethernet end0: registered PTP
clock
+[   49.238588] spacemit-dwmac cac80000.ethernet end0: configuring for
phy/rgmii-id link mode

+[   52.325163] spacemit-dwmac cac80000.ethernet end0: Link is Up -
1Gbps/Full - flow control rx/tx

Thanks for looking into this,

-E



More information about the linux-riscv mailing list