cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP255F eth1 driver error

OKN
Associate III

Hello

I am building Linux on a custom board using the STM32MP255F-AK.


The following error occurs during kernel boot:

[ 15.371350] stm32-dwmac 482c0000.eth1: Failed to reset the DMA
[ 15.386447] stm32-dwmac 482c0000.eth1 end0: stmmac_hw_setup: DMA engine initialization failed
[ 15.389570] stm32-dwmac 482c0000.eth1 end0: __stmmac_open: Hw setup failed


After embedding printk in the kernel source code to investigate,
I found that dwmac4_dma_reset() in /drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c was returning ETIMEDOUT(110).

[dwmac4_lib.c]

int dwmac4_dma_reset(void __iomem *ioaddr)
{
    u32 value = readl(ioaddr + DMA_BUS_MODE);

    /* DMA SW reset */
    value |= DMA_BUS_MODE_SFT_RESET;
    writel(value, ioaddr + DMA_BUS_MODE);

    return readl_poll_timeout(ioaddr + DMA_BUS_MODE, value,
           !(value & DMA_BUS_MODE_SFT_RESET),10000, 1000000);
}

I expect 0x482c0000 to be stored in ioaddr, but different values such as 0x82108000, 0x82128000, and 0x82xxx000 were stored there each time.


I’ve looked into it from various angles but haven’t found a solution.
I suspect there’s an issue with the Device Tree or other settings that’s preventing ioaddr from being set correctly...

Where should I look to resolve this?

Best Regards,
--
okn

1 REPLY 1
PatrickF
ST Employee

HI @OKN 

Ethernet "DMA engine initialization failed" come usually from a missing clock (from PHY or RCC).

Maybe this post could give you some investigation angles.

https://community.st.com/t5/stm32-mpus-products-and-hardware/failing-eth2-on-stm32mp2/m-p/849378

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Tip of the day: Try Sidekick STM32 AI agent, see here