2025-06-23 6:21 AM - edited 2025-06-23 6:25 AM
Hi there,
I am trying to use the stmmac driver the .dtsi here to connect two GMII MAC components.
gmac0 and gmac1 are activated as followed in a separate .dts file - note that gmac2 is configured and confirmed to be working prior to this:
&gmac0 {
status = "okay";
mac-mode = "gmii";
phy-mode = "gmii";
max-speed = <1000>;
max-frame-size = <9000>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
&gmac1 {
status = "okay";
mac-mode = "gmii";
phy-mode = "gmii";
max-speed = <1000>;
max-frame-size = <9000>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
&gmac2 {
status = "okay";
phy-mode = "rgmii-id";
phy-handle = <&emac2_phy0>;
max-frame-size = <9000>;
mdio0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";
emac2_phy0: ethernet-phy@0 {
reg = <1>;
};
};
};
When I then boot linux, I find the following error messages:
root@localhost:~# dmesg | grep "socfpga-dwmac"
[ 1.433914] socfpga-dwmac 10810000.ethernet: Adding to iommu group 0
[ 1.440789] socfpga-dwmac 10810000.ethernet: IRQ eth_wake_irq not found
[ 1.447387] socfpga-dwmac 10810000.ethernet: IRQ eth_lpi not found
[ 1.453610] socfpga-dwmac 10810000.ethernet: RX VLAN HW Stripping
[ 1.459766] socfpga-dwmac 10810000.ethernet: SMTG Hub Cross Timestamp supported
[ 1.467356] socfpga-dwmac 10810000.ethernet: User ID: 0x76, Synopsys ID: 0x31
[ 1.474476] socfpga-dwmac 10810000.ethernet: XGMAC2
[ 1.479421] socfpga-dwmac 10810000.ethernet: DMA HW capability register supported
[ 1.486867] socfpga-dwmac 10810000.ethernet: RX Checksum Offload Engine supported
[ 1.494311] socfpga-dwmac 10810000.ethernet: COE Type 1
[ 1.499510] socfpga-dwmac 10810000.ethernet: TX Checksum insertion supported
[ 1.506522] socfpga-dwmac 10810000.ethernet: TSO supported
[ 1.511980] socfpga-dwmac 10810000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 1.519954] socfpga-dwmac 10810000.ethernet: device MAC address ca:3e:cc:fb:1a:6f
[ 1.527409] socfpga-dwmac 10810000.ethernet: Enabled L3L4 Flow TC (entries=16)
[ 1.534597] socfpga-dwmac 10810000.ethernet: Enabled RFS Flow TC (entries=10)
[ 1.541696] socfpga-dwmac 10810000.ethernet: TSO feature enabled
[ 1.547672] socfpga-dwmac 10810000.ethernet: SPH feature enabled
[ 1.553647] socfpga-dwmac 10810000.ethernet: TX COE limited to 2 tx queues
[ 1.560490] socfpga-dwmac 10810000.ethernet: Using 40/40 bits DMA host/device width
[ 1.568244] socfpga-dwmac 10810000.ethernet (unnamed net_device) (uninitialized): failed to setup phy (-22)
[ 1.578069] socfpga-dwmac: probe of 10810000.ethernet failed with error -22
[ 1.585185] socfpga-dwmac 10820000.ethernet: Adding to iommu group 1
[ 1.591958] socfpga-dwmac 10820000.ethernet: IRQ eth_wake_irq not found
[ 1.598547] socfpga-dwmac 10820000.ethernet: IRQ eth_lpi not found
[ 1.604742] socfpga-dwmac 10820000.ethernet: RX VLAN HW Stripping
[ 1.610871] socfpga-dwmac 10820000.ethernet: SMTG Hub Cross Timestamp supported
[ 1.618262] socfpga-dwmac 10820000.ethernet: User ID: 0x76, Synopsys ID: 0x31
[ 1.625371] socfpga-dwmac 10820000.ethernet: XGMAC2
[ 1.630312] socfpga-dwmac 10820000.ethernet: DMA HW capability register supported
[ 1.637756] socfpga-dwmac 10820000.ethernet: RX Checksum Offload Engine supported
[ 1.645200] socfpga-dwmac 10820000.ethernet: COE Type 1
[ 1.650400] socfpga-dwmac 10820000.ethernet: TX Checksum insertion supported
[ 1.657412] socfpga-dwmac 10820000.ethernet: TSO supported
[ 1.662870] socfpga-dwmac 10820000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 1.670837] socfpga-dwmac 10820000.ethernet: device MAC address 9a:56:d9:98:64:37
[ 1.678288] socfpga-dwmac 10820000.ethernet: Enabled L3L4 Flow TC (entries=16)
[ 1.685476] socfpga-dwmac 10820000.ethernet: Enabled RFS Flow TC (entries=10)
[ 1.692576] socfpga-dwmac 10820000.ethernet: TSO feature enabled
[ 1.698551] socfpga-dwmac 10820000.ethernet: SPH feature enabled
[ 1.704526] socfpga-dwmac 10820000.ethernet: TX COE limited to 2 tx queues
[ 1.711367] socfpga-dwmac 10820000.ethernet: Using 40/40 bits DMA host/device width
[ 1.719030] socfpga-dwmac 10820000.ethernet (unnamed net_device) (uninitialized): failed to setup phy (-22)
[ 1.728811] socfpga-dwmac: probe of 10820000.ethernet failed with error -22
[ 1.735813] socfpga-dwmac 10830000.ethernet: Adding to iommu group 2
[ 1.742511] socfpga-dwmac 10830000.ethernet: IRQ eth_wake_irq not found
[ 1.749095] socfpga-dwmac 10830000.ethernet: IRQ eth_lpi not found
[ 1.755277] socfpga-dwmac 10830000.ethernet: RX VLAN HW Stripping
[ 1.761389] socfpga-dwmac 10830000.ethernet: SMTG Hub Cross Timestamp supported
[ 1.768798] socfpga-dwmac 10830000.ethernet: User ID: 0x76, Synopsys ID: 0x31
[ 1.775904] socfpga-dwmac 10830000.ethernet: XGMAC2
[ 1.780844] socfpga-dwmac 10830000.ethernet: DMA HW capability register supported
[ 1.788288] socfpga-dwmac 10830000.ethernet: RX Checksum Offload Engine supported
[ 1.795732] socfpga-dwmac 10830000.ethernet: COE Type 1
[ 1.800930] socfpga-dwmac 10830000.ethernet: TX Checksum insertion supported
[ 1.807942] socfpga-dwmac 10830000.ethernet: TSO supported
[ 1.813399] socfpga-dwmac 10830000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 1.821365] socfpga-dwmac 10830000.ethernet: Enabled L3L4 Flow TC (entries=16)
[ 1.828554] socfpga-dwmac 10830000.ethernet: Enabled RFS Flow TC (entries=10)
[ 1.835654] socfpga-dwmac 10830000.ethernet: TSO feature enabled
[ 1.841629] socfpga-dwmac 10830000.ethernet: SPH feature enabled
[ 1.847605] socfpga-dwmac 10830000.ethernet: TX COE limited to 2 tx queues
[ 1.854445] socfpga-dwmac 10830000.ethernet: Using 40/40 bits DMA host/device width
[ 2.448680] socfpga-dwmac 10830000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 2.457891] socfpga-dwmac 10830000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-1
[ 2.467051] socfpga-dwmac 10830000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-2
[ 2.476248] socfpga-dwmac 10830000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-3
[ 2.485428] socfpga-dwmac 10830000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-4
[ 2.494627] socfpga-dwmac 10830000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-5
[ 2.503864] socfpga-dwmac 10830000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-6
[ 2.513108] socfpga-dwmac 10830000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-7
[ 2.589649] socfpga-dwmac 10830000.ethernet eth0: PHY [stmmac-2:01] driver [Micrel KSZ9031 Gigabit PHY] (irq=POLL)
[ 2.600063] socfpga-dwmac 10830000.ethernet eth0: No Safety Features support found
[ 2.607619] socfpga-dwmac 10830000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[ 2.616428] socfpga-dwmac 10830000.ethernet eth0: registered PTP clock
[ 2.623199] socfpga-dwmac 10830000.ethernet eth0: FPE workqueue start
[ 2.629622] socfpga-dwmac 10830000.ethernet eth0: configuring for phy/rgmii-id link mode
[ 6.724299] socfpga-dwmac 10830000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
...
[ 12.301005] socfpga-dwmac 10810000.ethernet: Failed to reset the dma
[ 12.307534] socfpga-dwmac 10810000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
[ 12.322809] socfpga-dwmac 10810000.ethernet eth0: __stmmac_open: Hw setup failed
[ 12.666819] socfpga-dwmac 10820000.ethernet: Failed to reset the dma
[ 12.673381] socfpga-dwmac 10820000.ethernet eth1: stmmac_hw_setup: DMA engine initialization failed
[ 12.684623] socfpga-dwmac 10820000.ethernet eth1: __stmmac_open: Hw setup failed
Does anyone have some experience with this sort of issue?
Many thanks,
K
2025-06-23 7:00 AM
Welcome @K606, to the community!
Apart from the name of the driver, I don't see any reference to nor any device from STMicroelectronics. Wouldn't it make more sense to contact the maintainer of the repository on this topic (formerly Altera, now Silver Lake)?
Regards
/Peter
2025-06-23 7:04 AM
Thanks for the quick reply - yes I asked them also; but thought that it might be worth asking here as it seemed like a good idea to ask the originators of the tech
Kind Regards,
K