NVIDIA Jetson AGX Orin Custom Carrier Board RGMII Ethernet is unable to receive data

Software Environment: R35.6.0
Hardware Environment: Jetson AGX Orin connected to YT8521 PHY via RGMII. The PC and Orin are on the same network segment, directly connected via an Ethernet cable.

Issue:
When pinging the PC from Orin, Wireshark on the PC can capture the ARP request packets sent by Orin. However, the ARP reply packets from the PC are not received by Orin. Using an oscilloscope to monitor the RGMII Rx signal shows that data is being transmitted.


Troubleshooting Steps:

  1. Checked the statistics of eth0 using ethtool -S eth0, and found that the counters related to reception (rx) did not increase.
  2. After executing ifconfig eth0 up/down, checked the interrupt count using cat /proc/interrupts | grep eth0, and observed that the interrupt count increased. When the Ethernet status changes, the corresponding Ethernet interrupt count will increase.

Consistent with the phenomenon described in the following post:


Orin RGMII RX[0:3] → PHY RX[0:3],Is this connection incorrect?

You could check pinmux setting by directly reading register for each pin.

If they are all correct, please review hardware or check with PHY vendor.

EQOS_TXC sudo busybox devmem 0x02445058 0x00002400
EQOS_TD0 sudo busybox devmem 0x02445018 0x00002400
EQOS_TD1 sudo busybox devmem 0x02445010 0x00002400
EQOS_TD2 sudo busybox devmem 0x02445008 0x00002400
EQOS_TD3 sudo busybox devmem 0x02445000 0x00002400
EQOS_TX_CTL sudo busybox devmem 0x02445068 0x00002400

EQOS_RXC sudo busybox devmem 0x02445060 0x00002458
EQOS_RD0 sudo busybox devmem 0x02445040 0x00002458
EQOS_RD1 sudo busybox devmem 0x02445030 0x00002458
EQOS_RD2 sudo busybox devmem 0x02445028 0x00002458
EQOS_RD3 sudo busybox devmem 0x02445020 0x00002458
EQOS_RX_CTL sudo busybox devmem 0x02445070 0x00002458

EQOS_SMA_MDIO sudo busybox devmem 0x02445038 0x00002440
EQOS_SMA_MDC sudo busybox devmem 0x02445048 0x00002400

ENET_RST_N sudo busybox devmem 0x02434078 0x00000000
ENET_INT_N sudo busybox devmem 0x02434078 0x00000058

管脚配置没问题

The image above shows the result of my command cat /proc/interrupts | grep eth , which is printed by me. Compared to the results printed by other developers, the output is missing the part highlighted in red as shown below.

Then you forgot to set the interrupt pin to GPIO input.

The PHY interrupt pin uses GPIO3_PG.04, as shown in the image below:


image

The modifications related to the device tree are shown in the image below:




Is there something missing that still needs to be modified?

Are you sure the pinmux file is the one your board is using?

Yes, I directly used the command sudo ./flash.sh jetson-agx-orin-devkit internal to flash the device.

pinmux register values are as follows:
EQOS_TXC sudo busybox devmem 0x02445058 0x00002400
EQOS_TD0 sudo busybox devmem 0x02445018 0x00002400
EQOS_TD1 sudo busybox devmem 0x02445010 0x00002400
EQOS_TD2 sudo busybox devmem 0x02445008 0x00002400
EQOS_TD3 sudo busybox devmem 0x02445000 0x00002400
EQOS_TX_CTL sudo busybox devmem 0x02445068 0x00002400

EQOS_RXC sudo busybox devmem 0x02445060 0x00002458
EQOS_RD0 sudo busybox devmem 0x02445040 0x00002458
EQOS_RD1 sudo busybox devmem 0x02445030 0x00002458
EQOS_RD2 sudo busybox devmem 0x02445028 0x00002458
EQOS_RD3 sudo busybox devmem 0x02445020 0x00002458
EQOS_RX_CTL sudo busybox devmem 0x02445070 0x00002458

EQOS_SMA_MDIO sudo busybox devmem 0x02445038 0x00002440
EQOS_SMA_MDC sudo busybox devmem 0x02445048 0x00002400

ENET_RST_N sudo busybox devmem 0x02434078 0x00000000
ENET_INT_N sudo busybox devmem 0x02434078 0x00000058

pinmux and gpio setting are separate register. You should check gpio register too.

I understand. I modified the following two files, and the detailed modifications can be found in the previous reply.
tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi
tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi

I mean did you read the gpio register on the board or not…

I don’t have the board with me right now, so I’ll try it out tomorrow. Thanks for the reply.

Thanks for provide answer.


Is the register address and value read for soc_gpio17_pg4 as ENET_INT_N correct? As shown in the figure below, according to the TRM manual, only the input function is enabled?


image

Are you sure your device tree change for kernel really takes effect ?

Viewing the flashing log, the file used is tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi . Previously, the wrong file tegra234-mb1-bct-pinmux-p3701-0000.dtsi was modified, which resulted in an error as shown in the image below.
image

Could you just stop sharing everything here in screenshot?

If you want to share log, give out full text file. Those partial screenshot really cannot clarify your situation well.

I’m sorry, I thought using screenshots to highlight the issue would help you quickly locate the problem.

The following three files have been modified:

flash log:
flash_log.txt (493.2 KB)

dmesg log:
dmesg.txt (69.5 KB)

PG.04 pinmux:
sudo busybox devmem 0x02434070
0x00000058

PG.04 gpio config:
sudo busybox devmem 0x02214080
0x00000001

sudo cat /sys/kernel/debug/gpio | grep PG
gpio-347 (PGG.00 )
gpio-383 (PG.00 |force-recovery ) in hi IRQ ACTIVE LOW
gpio-384 (PG.01 |temp-alert ) in hi IRQ
gpio-385 (PG.02 |sleep ) in hi IRQ ACTIVE LOW
gpio-386 (PG.03 )
gpio-387 (PG.04 )
gpio-388 (PG.05 |phy_reset ) out hi
gpio-389 (PG.06 )
gpio-390 (PG.07 |cd ) in hi IRQ

The PG.04 pin interrupt function is not enabled.

Your error log does not have this thing as screenshot mentioned.

image

Which log is correct? That is why you should stop sharing screenshot, because they are lacking of context and not clear at all.

Also, are you sure the device tree running on the board matches to what you flashed? I don’t care about how the original file looks like now. Check the dts file converted from dtb file and also check /proc/device-tree on your device.

The previous modification was made to the file tegra234-mb1-bct-pinmux-p3701-0000.dtsi, which led to the error shown in the screenshot. After synchronizing the changes to the file tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi, the error disappeared, indicating that the actual file in use is tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi.

Below are the dts files and the devicetree compressed package:
sudo dtc -I dtb -O dts -o devicetree_gen.dts /boot/dtb/kernel_tegra234-p3701-005-p3737-000.dtb
devicetree_gen.dts.txt (552.1 KB)

sudo tar -cvf devicetree.tar /sys/firmware/devicetree
devicetree_2.zip (397.6 KB)