自制板卡网口配置

我们为自制板卡网口进行了设备树重配,但是网口均无法正常使用,这是我们使用的对应的文件。

Orin-jetson_agx_orin_eth-gpio-default.dtsi.txt (5.0 KB)

tegra234-p3737-0000+p3701-0000.dts.txt (9.6 KB)

Orin-jetson_agx_orin_eth-pinmux.dtsi.txt (65.7 KB)

Orin-jetson_agx_orin_eth-padvoltage-default.dtsi.txt (2.4 KB)

tegra234-p3737-0000+p3701-0005-nv.dts.txt (1.0 KB)

以下是启动过程中的串口日志

Registered event_type:[0] for dce_core_ipc_type:[1]

Registered event_type:[1] for dce_core_ipc_type:[3]

dce_ipc State Initialized

RmBootstrap completed successfully

[ 10.087595] nvethernet 2310000.ethernet: Ethernet MAC index missing

[ 12.442266] using random self ethernet address

[ 12.442275] using random host ethernet address

[ 12.737505] using random self ethernet address

[ 12.737512] using random host ethernet address

[ 14.680448] nvethernet 6800000.ethernet: [poll_check][42][type:0x4][loga-0x0] poll_check: timeout

[ 14.680462] nvethernet 6800000.ethernet: ether_open: failed to initialize MAC HW core with reason -1

[ 14.907820] nvethernet 2310000.ethernet: failed to connect PHY

[ 14.907831] net eth1: ether_open: Cannot attach to PHY (error: -19)

[ 16.190694] rt5640 8-001c: Device with ID register 0xffff0000 is not rt5640/39

[ 21.087581] pstore: crypto_comp_decompress failed, ret = -22!

[ 21.087677] pstore: crypto_comp_decompress failed, ret = -22!

Ubuntu 22.04.5 LTS raycon-desktop ttyTCU0

raycon-desktop login: raycon (automatic login)

Welcome to Ubuntu 22.04.5 LTS (GNU/Linux 5.15.148-rt-tegra aarch64)

This system has been minimized by removing packages and content that are

not required on a system that users do not log into.

To restore this content, you can run the ‘unminimize’ command.

Expanded Security Maintenance for Applications is not enabled.

3 updates can be applied immediately.

To see these additional updates run: apt list --upgradable

Enable ESM Apps to receive additional future security updates.

See Ubuntu Expanded Security Maintenance | Security | Ubuntu or run: sudo pro status

Last login: Thu Feb 20 13:24:20 UTC 2025 on ttyAMA0

To run a command as administrator (user “root”), use “sudo ”.

See “man sudo_root” for details.

please convert your final dtb back to dts and attach it.

Those 2 dts is not the finalize one which might not be the precise file to check.

Also, which PHY is in use here?

phy@1

DTB_FILE=“tegra234-p3737-0000+p3701-0005-nv.dtb”;

using.dts.txt (320.6 KB)

Hi,

  1. We set below to pull-up. Are you sure you don’t need this with your hardware?
  • eqos_rd0_pe6, eqos_rd1_pe7, eqos_rd2_pf0, eqos_rd3_pf1, eqos_rx_ctl_pf2, eqos_rxc_pf3
eqos_rd0_pe6 {
        nvidia,pins = "eqos_rd0_pe6";
        nvidia,function = "eqos";
        nvidia,pull = <TEGRA_PIN_PULL_UP>;
        nvidia,tristate = <TEGRA_PIN_ENABLE>;
        nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
  1. Please check if the realtek PHY driver that you are using is really present on the runtime kernel.

ls -l /sys/class/mdio_bus/

This will show that.

1.我没有配置过相关的内容,我应该把他配置到哪个文件中;

2.raycon@raycon-desktop:~$ ls -l /sys/class/mdio_bus/
total 0
lrwxrwxrwx 1 root root 0 Feb 20 13:24 fixed-0 → ‘../../devices/platform/Fixed MDIO bus.0/mdio_bus/fixed-0’

  1. … this is pinmux file. You should know where to put them. You better reading the document first if you don’t know what I am posting.

  2. It looks like realtek driver is not present either. Please contact with Realtek first to confirm how to enable their driver in your kernel.

1.我的意思是eqos_rd0_pe6我们没有使用;而且pinmux file是通过excel生成的,pinmux、gpio、padvoltage文件我们放在了<install_path>/Linux_for_Tegra/bootloader/generic/BCT路径下,gpio放在了<install_path>/Linux_for_Tegra/bootloader路径下

2.realtek driver不包含在Driver Package (BSP) Sources中吗?

  1. I am not talking about just one pin. I am talking about the whole " * eqos_rd0_pe6, eqos_rd1_pe7, eqos_rd2_pf0, eqos_rd3_pf1, eqos_rx_ctl_pf2, eqos_rxc_pf3" pins setting are not matching to the document.
  1. We don’t guarantee any vendor driver is present in the BSP or not. Please check with vendor which driver is needed and check the kernel source by yourself.

1.当前我们的自制板载的硬件是:

  • 2310000.ethernet,即 EQOS;
  • RTL8211F 1G PHY;
  • RGMII 接口;
  • PHY MDIO 地址 1;
  • PHY reset 使用 nvidia,phy-reset-gpio。

2.Linux_for_Tegra\source\kernel\kernel-jammy-src\drivers\net\phy\realtek.c

  1. 所以你們到底有沒有需要更改pinmux? 我前面一直提到你們的pinmux跟文件不符合. (整個 eqos_rd0_pe6, eqos_rd1_pe7, eqos_rd2_pf0, eqos_rd3_pf1, eqos_rx_ctl_pf2, eqos_rxc_pf3 這些 pin, 你都沒有做pull up設定)
    這部份要跟你們的硬體設計搭配. 但你好像沒有聽懂我要表達的意思

  2. realtek source有在裡面不代表有在使用… 請你確認makefile還有最後Image中有沒有這個driver.

1.我们是自制板载,需要修改pinnux,你这里提到的和文件不符,具体指的哪个文件?

以下是我们的硬件图

excel文件无法发送,或许您可以给我一个邮箱,我将资料同步给您

RK_MCB_Pinmux_Config_V01.pdf (275.2 KB)

  1. 前面已經貼了文件連結了… 下圖中白色部份的地方就是

  2. 你不用貼excel給我… 你一開始就已經貼過pinmux dtsi了.

按照1对pinmux进行了修改,相关文件使用如下

test1.zip (12.7 KB)

烧录后依旧有如下错误:

[ 8.715218] systemd[1]: Starting Coldplug All udev Devices…
[ 8.766930] systemd[1]: Started Journal Service.
[ 8.826745] nvgpu: 17000000.gpu nvgpu_nvhost_syncpt_init:122 [INFO] syncpt_unit_base 60000000 syncpt_unit_size 4000000 size 10000
[ 8.826745]
[ 8.873127] systemd-journald[370]: Received client request to flush runtime journal.
I/TC: WARNING (insecure configuration): Failed to get monotonic counter for REE FS, using 0
I/TC: WARNING (insecure configuration): Failed to commit dirh counter 2
TCU debug prints will be routed to traces.
[ 9.342169] tegra-ivc-bus bc00000.rtcpu:ivc-bus:echo@0: ivc channel driver missing
[ 9.342171] tegra-ivc-bus bc00000.rtcpu:ivc-bus:dbg@1: ivc channel driver missing
[ 9.342172] tegra-ivc-bus bc00000.rtcpu:ivc-bus:dbg@2: ivc channel driver missing
[ 9.342174] tegra-ivc-bus bc00000.rtcpu:ivc-bus:ivccontrol@3: ivc channel driver missing
[ 9.342175] tegra-ivc-bus bc00000.rtcpu:ivc-bus:ivccapture@4: ivc channel driver missing
[ 9.342176] tegra-ivc-bus bc00000.rtcpu:ivc-bus:diag@5: ivc channel driver missing
[ 9.342181] tegra-hsp b950000.tegra-hsp: Try increasing MBOX_TX_QUEUE_LEN
[ 9.394344] (NULL device *): fops function table already registered
Starting RmBootstrap
Registered event_type:[0] for dce_core_ipc_type:[1]
Registered event_type:[1] for dce_core_ipc_type:[3]
dce_ipc State Initialized
RmBootstrap completed successfully
[ 12.779685] using random self ethernet address
[ 12.779692] using random host ethernet address
[ 13.096161] using random self ethernet address
[ 13.096169] using random host ethernet address
[ 13.726739] nvethernet 2310000.ethernet: failed to connect PHY
[ 13.726773] net eth0: ether_open: Cannot attach to PHY (error: -19)
[ 16.463486] rt5640 8-001c: Device with ID register 0xffff0000 is not rt5640/39

请帮忙确认一下是否还有遗漏,后续我们将进一步确认驱动的问题

建議可以量測hw訊號確認有沒有符合預期

Cannot attach to PHY (error: -19) 簡單來說就是

  1. 跟PHY 進行的溝通發生timeout
  2. 沒有正確的使用device driver.

2也可能造成1.

raycon@raycon-desktop:~$ uname -a
Linux raycon-desktop 5.15.148-rt-tegra #3 SMP PREEMPT_RT Mon Aug 3 15:50:51 CST 2026 aarch64 aarch64 aarch64 GNU/Linux
raycon@raycon-desktop:~$ uname -r
5.15.148-rt-tegra
raycon@raycon-desktop:~$ ls -lh /boot/Image
-rwxr-xr-x 1 root root 40M Aug 5 2026 /boot/Image
raycon@raycon-desktop:~$ strings /boot/Image | grep -i -E \

"realtek|rtl8211|001cc916|RTL8211F"

realtek,aldps-enable
realtek,clkout-disable
RTL8211 Gigabit Ethernet
RTL8211B Gigabit Ethernet
RTL8211C Gigabit Ethernet
RTL8211DN Gigabit Ethernet
RTL8211E Gigabit Ethernet
RTL8211F Gigabit Ethernet
RTL8211F VD-CG Gigabit Ethernet
Generic FE-GE Realtek PHY
Realtek
Realtek-ALC1220-VB-Desktop
raycon@raycon-desktop:~$ cat /proc/version
Linux version 5.15.148-rt-tegra (uih@uih-ThinkCentre-M8600t-N000) (aarch64-buildroot-linux-gnu-gcc.br_real (Buildroot 2022.08) 11.3.0, GNU ld (GNU Binutils) 2.38) #3 SMP PREEMPT_RT Mon Aug 3 15:50:51 CST 2026
raycon@raycon-desktop:~$ readlink -f /boot/Image
/boot/Image
raycon@raycon-desktop:~$ modinfo realtek
name: realtek
filename: (builtin)
license: GPL
file: drivers/net/phy/realtek
author: Johnson Leung
description: Realtek PHY driver

img_v3_0214b_ebb2e426-7086-44df-94a8-09baf23c3a5g

我们发现Cannot attach to PHY 之后,这个信号一直是低电平,导致PHY一直处于复位状态,能帮忙确认一下ENET_RST_N是否是低电平有效吗,如果是的低有效,下面对于2310000我们的配置是否正确

&{/bus@0/ethernet@2310000} {
status = “okay”;
nvidia,instance_id = <4>;
nvidia,mac-addr-idx = <0>;
nvidia,mdio_addr = <1>;
phy-mode = “rgmii-id”;

nvidia,phy-reset-gpio = <&gpio TEGRA234_MAIN_GPIO(G, 5) 0>;
nvidia,phy-rst-duration-usec = <10000>;
nvidia,phy-rst-pdelay-msec = <224>;

phy-handle = <&custom_rgmii_phy>;

mdio {
    compatible = "nvidia,eqos-mdio";
    status = "okay";
    #address-cells = <1>;
    #size-cells = <0>;

    custom_rgmii_phy: phy@1 {
        compatible = "realtek,rtl8211f";
        status = "okay";
        reg = <1>;

        interrupt-parent = <&gpio>;
        interrupts = <TEGRA234_MAIN_GPIO(G, 4) IRQ_TYPE_LEVEL_LOW>;
    };
};

};

0 in above means GPIO_ACTIVE_HIGH.

当nvidia,phy-reset-gpio = <&gpio TEGRA234_MAIN_GPIO(G, 5) 0>;

开机过程中,G5的波形,红色通道

当nvidia,phy-reset-gpio = <&gpio TEGRA234_MAIN_GPIO(G, 5) GPIO_ACTIVE_LOW>;

G5的波形如下,黄色通道

最终都会变成低,并维持

hi,根据官网的案例,我们最终按照nvidia,phy-reset-gpio = <&gpio TEGRA234_MAIN_GPIO(G, 5) 0>;进行设置,依旧还是nvethernet -19。

我们尝试执行sudo ip link set eth0 up,发现PHYRSTB复位后,MDC没有输出,能否帮忙确认一下原因。