Skip to main content
MWoło.2
Senior III
October 23, 2021
Question

ksz8041 bring up

  • October 23, 2021
  • 22 replies
  • 9824 views

It seems that I have a problem with DMA, but I'm not sure. Would you please take a look at the below screen

0693W00000FDX7aQAH.pngDts looks

0693W00000FDX7zQAH.jpg0693W00000FDX84QAH.jpgI intend to achieve MII with self-generated quartz.

Unfortunately, I'm stuck on this "Failed to reset the DMA".

This topic has been closed for replies.

22 replies

MWoło.2
MWoło.2Author
Senior III
November 10, 2021
root@stm32mp157a-visionsom-dsi-sd-mx:~# devmem2 0x50000A10 W 0x00000800 
/dev/mem opened. 
Memory mapped at address 0xb6f4e000. 
Read at address 0x50000A10 (0xb6f4ea10): 0x00000000 
Write at address 0x50000A10 (0xb6f4ea10): 0x00000800, readback 0x00000800 
root@stm32mp157a-visionsom-dsi-sd-mx:~# devmem2 0x50020004 W 
/dev/mem opened. 
Memory mapped at address 0xb6fb1000. 
Read at address 0x50020004 (0xb6fb1004): 0x00100000 
root@stm32mp157a-visionsom-dsi-sd-mx:~# 

MWoło.2
MWoło.2Author
Senior III
November 10, 2021
root@stm32mp157a-visionsom-dsi-sd-mx:~# devmem2 0x50000A10 W 0x00000800 
/dev/mem opened. 
Memory mapped at address 0xb6f4e000. 
Read at address 0x50000A10 (0xb6f4ea10): 0x00000000 
Write at address 0x50000A10 (0xb6f4ea10): 0x00000800, readback 0x00000800 
root@stm32mp157a-visionsom-dsi-sd-mx:~# devmem2 0x50020004 W 
/dev/mem opened. 
Memory mapped at address 0xb6fb1000. 
Read at address 0x50020004 (0xb6fb1004): 0x00100000 
root@stm32mp157a-visionsom-dsi-sd-mx:~#

OlivierK
ST Technical Moderator
November 10, 2021

Hi MWoło.2  (Community Member),

That is the correct value according to your setup: MII with external oscillator/crystal. The applied clocks settings in the DT seems correct.

Have you checked the external PHY h/w connections: VDD supply, PHY boot strapping, reset signal?

What about a dhcp test in U-boot?

Rgds,

Olivier

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.
MWoło.2
MWoło.2Author
Senior III
November 10, 2021

Do I need connect reset to pin GPIO pin?

MWoło.2
MWoło.2Author
Senior III
November 10, 2021

Regarding hardware, I found a few mistakes. Please take a look at it

https://github.com/voloviq/stm32mp1-custom-devboard/issues

maybe these issues can be a real problem. I rework the circuit and keep you informed.

PatrickF
ST Employee
November 10, 2021

Hi,

please check on your board that the PHY is providing a clock on ETH_TX_CLK pin (output from PHY in MII mode) during initialization. Missing this clock is usually the root cause of 'failed to reset the dma' message.

If no clock, please check carefully PHY connections and PHY HW config pins.

Regards.

In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
OlivierK
ST Technical Moderator
November 10, 2021

Hi,

It's good common practice to connect the PHY reset input to a GPIO, here PA4 is used.

phy0: ethernet-phy@0 {

reset-gpios = <&gpioa 4 GPIO_ACTIVE_LOW>

reset-assert-us = <1000>;

reset-deassert-us = <2000>;

reg = <0>;

};

Rgds,

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.
OlivierK
ST Technical Moderator
November 10, 2021

One more thing, there are different Micrel properties applied depending of the Mickel 8041 chosen part, it may be important to add the right part version in the DT:

phy0: ethernet-phy@0 {

compatible = "ethernet-phy-id0007.c131";

reset-gpios = <&gpioa 4 GPIO_ACTIVE_LOW>

reset-assert-us = <1000>;

reset-deassert-us = <2000>;

reg = <0>;

};

You need to find and replace value 0007.c131 corresponding to your Ethernet PHY: this can be found in datasheet of the Ethernet PHY, and find PHY Identifier 1 and PHY Identifier 2 registers.

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.
MWoło.1
Associate
November 10, 2021

OK, I check it and go back with feedback.

Thanks a lot for the hints.

BR Michal

MWoło.2
MWoło.2Author
Senior III
November 15, 2021

Hi Olivier, Hi Patrick,

I think I got what is wrong. I experimented with RMII, and when no 50MHz appears on the clock "...fb," I have a DMA problem. It means that this is not a problem with DMA but with the missing clock. Additionally, I tested DIV, MUL in PLL, and when set 100MHz or 25MHz for RMII, it also indicated a DMA problem. Only 50MHz pass for RMII. So after reading the documentation RM0436 Rev 5 section Clock distribution for Ethernet (ETH), everything seems precise. Unfortunately, I can't understand why I have no clock on lines.

0693W00000GXe6TQAT.pngDo You have a receipt for that? Why on RXC and TXC I notice nothing, it should be 25MHz on both, am I right? If Yes, how to achieve this?