2024-05-15 10:48 AM
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.
EQOS_DMA_MODE_SWR stuck FAILED: -110 in stm32mp157 for u-boot
I have the following configuration for the ethernet in uboot device tree.
ðernet0{
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <ð1_pins_mx>;
        pinctrl-1 = <ð1_sleep_pins_mx>;
        status ="okay";
        /* USER CODE BEGIN ethernet0 */
        phy-mode = "rmii";
        max-speed = <100>;
        phy-handle = <&phy0>;
        phy-supply = <&vdd_usb>;
        nvmem-cells = <ðernet_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.
Solved! Go to Solution.
2024-05-24 3:31 AM
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.
2024-05-17 4:28 AM
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.
2024-05-24 3:31 AM
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.
2024-12-17 6:33 AM
Hello, do you recall how you fixed this issue. Which clock is incorrect? Can you maybe show the dt after the fix?
2024-12-21 8:57 AM - edited 2025-06-16 7:02 AM
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. 
2025-06-16 5:40 AM
I'm also curious but you write the same clock twice (
st,eth_ref_clk_sel) so what was the correct clock to use?
2025-06-16 7:03 AM
Sorry for the mistake. I have changed correct clock name.