cancel
Showing results for 
Search instead for 
Did you mean: 

ksz8041 bring up

MWoło.2
Senior II

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".

22 REPLIES 22
PatrickF
ST Employee

Hi,

the message 'failed to reset the DMA' come usually from a missing clock on the GMAC (usually a clock from the PHY) which avoid the driver to correctly initialize the GMAC (ETH IP).

Please check the RefMan RCC "Clock distribution for Ethernet (ETH)".

See also https://wiki.st.com/stm32mpu/wiki/Ethernet_device_tree_configuration

By "self-generated quartz", could you confirm that this indicates there is a 25MHz Crystal on the PHY ?

Btw, if your PHY also support RMII, we encourage to use this interface.

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.
MWoło.2
Senior II

Hi Patrick,

I have self-generated quartz. I check using an oscilloscope and sine waveform exist on pin XI/REFCLK equals 25MHz.

Regarding RMII I need to use 50MHz? I decided to use MII, but if for some reason it is a problem I can change it in the next revision. If RMII can work on 25MHz I need to change just one resistor on PCB.

Below parts of my schematic

0693W00000FDhq1QAD.pngand

0693W00000FDhq6QAD.pngConnections generated from CubeMX.

In my current project, ETH_CLK is used as SPI1_MOSI and as ENET1-RX-CLK

0693W00000FDhqBQAT.png0693W00000FDhqVQAT.pngUnfortunately on

Ethernet device tree configuration - stm32mpu

there is no MII configuration.

PatrickF
ST Employee

Hi,

please try to remove the

st,ext-phyclk;

If it does not work after this change, please check the SYSCFG_PMCSETR register, by using either:

  • uBoot: md 0x50020004
  • Linux: devmem2 0x50020004 W (need to install devmem2 on the target which might be an issue without network)

field ETH_SEL should be 0b000

field ETH_SELMII should be 1

field ETH_REF_CLK_SEL should be 0

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.
MWoło.2
Senior II

Hi,

The result has been taken after stopped U-Boot execution. Of course, remove st,ext-phyclk; from U-Boot dts and Kernel dts.

0693W00000FDpqdQAD.pngAnd similar in the Kernel

0693W00000FDqHAQA1.pngHow to set this bit. Do I miss something in dts, or maybe this is still a hardware issue?

PatrickF
ST Employee

Hi,

according to uBoot dump, seems the value at 0x50020004 is 0x0020000, which could be explained by st,ext-phyclk;

Please check you are really using the expected DT.

Maybe share complete DT and uBoot + Linux log files.

please check you have st,syscon = <&syscfg 0x4>;

It should be present by default in ethernet0 node from the included stm32mp151.dtsi file during DT compilation

For kernel dump, maybe need to enable the SYSCFG bus clock before reading which could explain the read of 0.

please try:

devmem2 0x50000A10 W 0x00000800
devmem2 0x50020004 W

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.
MWoło.2
Senior II

Hi Patrick,

sorry for the delay.

In the attachment, boot logs.

Unfortunately, nothing helps.

MWoło.2
Senior II

I also add my dts files. IMHO there could be some dts issue or a driver. I used the latest MMDV - "openstlinux-5.10-dunfell-mp1-21-03-31".

MWoło.2
Senior II

FIles

MWoło.2
Senior II

In dts it could be a bit mesh I try to check many options, parameters.