Skip to main content
Associate III
May 15, 2024 5:48 PM UTC
Solved

"EQOS_DMA_MODE_SWR stuck FAILED: -110" error for ethernet in uboot

Hi everyone,

recently we have developed a custom board based on stm32mp157 mpu. We have used openstlinux distribution and the branch is "kirkstone". Ethernet is working perfectly on the Linux kernel. But problem arises when I am in the uboot mode (We want to have access to the ethernet from uboot). First, the ethernet can not find the mac address. It shows the following Error:

 

 

invalid MAC address 0 in OTP 00:00:00:00:00:00

Error: ethernet@5800a000 address not set.
No ethernet found.

 

 
The I set the ethernet mac address using the "setenv" command and then I enter dhcp command to test the ethernet connection, it shows the following error:
 

 

EQOS_DMA_MODE_SWR stuck FAILED: -110 in stm32mp157 for u-boot

 

 

I have the following configuration for the ethernet in uboot device tree.

 

 

&ethernet0{
 pinctrl-names = "default", "sleep";
 pinctrl-0 = <&eth1_pins_mx>;
 pinctrl-1 = <&eth1_sleep_pins_mx>;
 status ="okay";

 /* USER CODE BEGIN ethernet0 */
 phy-mode = "rmii";
 max-speed = <100>;
 phy-handle = <&phy0>;
 phy-supply = <&vdd_usb>;
 nvmem-cells = <&ethernet_mac_address>;
 nvmem-cell-names = "mac-address";

 clock-names = "stmmaceth",
 "mac-clk-tx",
 "mac-clk-rx",
 "ethstp",
 "eth-ck",
 "syscfg-clk";
 clocks = <&rcc ETHMAC>,
 <&rcc ETHTX>,
 <&rcc ETHRX>,
 <&rcc ETHSTP>,
 <&rcc ETHCK_K>,
 <&rcc SYSCFG>;
 st,eth_ref_clk_sel;
 phy-reset-gpios = <&gpiob 0 GPIO_ACTIVE_LOW>;

 mdio0 {
 #address-cells = <1>;
 #size-cells = <0>;
 compatible = "snps,dwmac-mdio";
 phy0: ethernet-phy@0 {
 reset-gpios = <&gpiob 0 GPIO_ACTIVE_LOW>;
 reset-duration = <200>;
 reg = <0>;
 };
 };
 /* USER CODE END ethernet0 */
};

 

 

Can anyone help me to solve those above two errors? Thanks in advance.

This topic has been closed for replies.
ahamod3.1416Best answer
Associate III
May 24, 2024 10:31 AM UTC

Finally got the solution for the Error. This Error basically indicate the clock issue. EQOS_DMA_MODE_SWR function is being called if software reset is not done in the SWR time interval. I set the wrong clock. I figured it out by measuring the clock using oscilloscope.

6 replies

Associate III
May 17, 2024 11:28 AM UTC

I got solution for the the first problem in defconfig I added "CONFIG_NET_RANDOM_ETHADDR=y".

Which is getting a random mac address. Now I do not have to set the mac address manually. But still I have the second error and can not establish the connection with the internet.

ahamod3.1416AuthorBest answer
Associate III
May 24, 2024 10:31 AM UTC

Finally got the solution for the Error. This Error basically indicate the clock issue. EQOS_DMA_MODE_SWR function is being called if software reset is not done in the SWR time interval. I set the wrong clock. I figured it out by measuring the clock using oscilloscope.

TBind.2
Associate
Dec 17, 2024 2:33 PM UTC

Hello, do you recall how you fixed this issue. Which clock is incorrect? Can you maybe show the dt after the fix?

Associate III
Dec 21, 2024 4:57 PM UTC

Hi TBind.2, first of all sorry for late reply, as I am in vacation. In u-boot 2021, ethernet node you have to change the clock name, instead of 

st,eth_ref_clk_sel

 

use the following clock, 

st,ext-phyclk;

 

This change solved my issue.