调试ORIN平台有线网络接口时遇到问题,MDIO接口正常,RGMII数据无信号,但RGMII tx/rx时钟都有信号

Yes, this GPIO G4 seems quite odd. It appears that only when the GPIO is used as an “GPIO” function , reading devmem 0x02214080 returns 0x03. For example, if I swap G4 and G5 in the marked “1” section of the screenshot below, then both devmem 0x022140a0 and devmem 0x02214080 return 0x03. Otherwise, devmem 0x02214080 returns 0x0, even if the following two lines are commented out:
//interrupt-parent = <&gpio>;
//interrupts = <TEGRA234_MAIN_GPIO(G, 4) IRQ_TYPE_LEVEL_LOW>;
In other words, even if G4 is not used, devmem 0x02214080 still reads 0x0.

Additionally, I have another question. In the marked “2” section of the screenshot, I replaced &tegra_main_gpio with &gpio because tegra_main_gpio is not defined in my SDK’s device tree. Is this an acceptable approach?

You need to check what is “gpio” defined in your device tree. “tegra_main_gpio” has its own definition and you should confirm your “gpio” alias is same as it.

Also, I am not sure why your comment is “comment out” GPIO G,4 here. They should be in use and your hardware should have it connected. You should put it in “gpio-input” list in the MB1 gpio dtsi file too.

gpio is defined as :


I don’t know the definition of tegra_main_gpio, and I couldn’t find any references to it in my code.

I comment out the G,4 is just for demostration , that, if I use G,4 as a generic purpose IO , devmem 0x02214080 will read out as 0x03 , otherwise it 's 0x0;

The definition of device tree alias is located in the final dtb.

Your link for GPIO is correct.

But the value for your GPIO G,4 is not. Even 0x3 is not a correct number.

This is GPIO enable register. Your GPIO G,4 should be an input and “0x3” means it is still a output…

I rechecked the file bootloader/tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi and confirmed that G,4 was missing from the input list—it might have been removed during earlier debugging. After adding G,4 back to the input list, reading 0x02214080 now returns 0x01.(show below) Is this the expected value?

As for the network card issue, it still persists. Where exactly is this interrupt being used in the driver? What is the registered interrupt name after initialization? I don’t see any part of the driver actually utilizing this interrupt.

root@ubuntu:/linux_share# busybox devmem 0x02434070
0x00000458
root@ubuntu:/linux_share# busybox devmem 0x02434078
0x00000000
root@ubuntu:/linux_share# busybox devmem 0x02445058
0x00002400
root@ubuntu:/linux_share# busybox devmem 0x02445018
0x00002400
root@ubuntu:/linux_share# busybox devmem 0x02445010
0x00002400
root@ubuntu:/linux_share# busybox devmem 0x02445008
0x00002400
root@ubuntu:/linux_share# busybox devmem 0x02445000
0x00002400
root@ubuntu:/linux_share# busybox devmem 0x02445068
0x00002400
root@ubuntu:/linux_share# busybox devmem 0x02445040
0x00002450
root@ubuntu:/linux_share# busybox devmem 0x02445030
0x00002450
root@ubuntu:/linux_share# busybox devmem 0x02445028
0x00002450
root@ubuntu:/linux_share# busybox devmem 0x02445020
0x00002450
root@ubuntu:/linux_share# busybox devmem 0x02445070
0x00002450
root@ubuntu:/linux_share# busybox devmem 0x02445060
0x00002450
root@ubuntu:/linux_share# busybox devmem 0x02445038
0x00002448
root@ubuntu:/linux_share# busybox devmem 0x02445048
0x00002400
root@ubuntu:/linux_share# busybox devmem 0x02445050
0x00002000
root@ubuntu:/linux_share# busybox devmem 0x022140a0
0x00000003
root@ubuntu:/linux_share# busybox devmem 0x02214080
0x00000001

Dump out your latest dmesg first.

dmesg.txt (53.3 KB)

please share cat /proc/interrupts too

interrupts.txt (20.7 KB)

I don’t see obvious error.

Please follow our document for the prerequisites

Prerequisites

Ensure that PHY comes out of reset mode and is in a ready state when the PHY reset GPIO is toggled.

  • The read PHY ID should use the mdio tool to ensure that PHY is out of the reset mode.
  • Ensure that the PHY driver is available.
  • Ensure that PHY comes out of reset and supplies the Rx clock to EQOS.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.