NVIDIA Developer Forum Post - Custom Carrier AGX Orin RGMII Ethernet Issue (Jetson Linux R36.4.4)

Hello, I designed a custom carrier for AGX ORIN. I can’t activate RGMII Ethernet Phy. The changes I’m making aren’t showing up in the logs.

At least my expectation was that even if the phy didn’t work directly, the multigigabit ethernet line would be deactivated and the relevant log for gigabit ethernet (2310000.ethernet) would be obtained. However, some things seem to be wrong after compilation.
Hardware Configuration

  • Host PC: Ubuntu 22.04.5

  • Jetson Linux: Release 36.4.4

  • Module: P3701-0004 (AGX Orin standalone module)

  • Carrier Board: Custom carrier designed by me (shematics nearly identical to original devkit carrier, Gigabit Ethernet with RGMII interface, note that empty EEPROM)

Problem Description LOGS

  1. I have already disabled MGBE ethernet from dts.

[ 17.514962] mdio_bus 6800000.ethernet: MDIO device at address 0 is missing.
[ 17.514980] nvethernet 6800000.ethernet: failed to connect PHY
[ 17.514984] net eno1: ether_open: Cannot attach to PHY (error: -19)

  1. RGMII Ethernet (2310000) does not appear in boot logs, but other DTS changes (in USB section ) work fine after flash.

Sources that I usedTo

Flash the Jetson Developer Kit Operating Software

Jetson AGX Orin Platform Adaptation and Bring-Up

Kernel Customization

My Complete Build & Flash Process

The files downloaded from Jetson Linux Release 36.4.4 | NVIDIA Developer and their locations are as follows:

———————————————————————————————————————

Drivers and Sources downloaded into file destination -----> “/home/ryhew/Desktop/Packages”

Jetson_Linux_R36.4.4_aarch64.tbz2 ——–>(Driver Package (BSP))
Tegra_Linux_Sample-Root-Filesystem_R36.4.4_aarch64.tbz2 ——–>(Sample Root Filesystem)
public_sources.tbz2 ——–>(Driver Package (BSP) Sources)
——————————————————————————————————————————————————
Compiler
file destination in -----> “/home/ryhew/l4t-gcc”

aarch64–glibc–stable-2022.08-1 ——–> Bootlin Toolchain gcc 11.3
——————————————————————————————————————————————————-
“/home/ryhew/jetson-r36.4.4”
is currently empty; installation and flashing will be done from here.

——————————————————————————————————————————————————-

1.BSP Setup


$cd ~/jetson-r36.4.4
$tar xf ~/Desktop/Packages/Jetson_Linux_R36.4.4_aarch64.tbz2
$cd ~/jetson-r36.4.4/Linux_for_Tegra/rootfs/
$sudo tar xpf ~/Desktop/Packages/Tegra_Linux_Sample-Root-Filesystem_R36.4.4_aarch64.tbz2
$cd ~/jetson-r36.4.4/Linux_for_Tegra/
$sudo ./tools/l4t_flash_prerequisites.sh
$sudo ./apply_binaries.sh

2. Pinmux & GPIO Configuration

Necessary pin configurations were made from Excel:
**pinmux.dtsi** → name changed to **tegra234-mb1-bct-pinmux-p3701-0000.dtsi**
(the following change was made: "#include "tegra234-mb1-bct-gpio-p3701-0000.dtsi")

→ Copied to: `/home/ryhew/jetson-r36.4.4/Linux_for_Tegra/bootloader/generic/BCT` and changed with orginal one

**gpio.dtsi** → name changed to **tegra234-mb1-bct-gpio-p3701-0000.dtsi**

→ Copied to: `/home/ryhew/jetson-r36.4.4/Linux_for_Tegra/bootloader` and changed with orginal one

3. BSP SOURCES EXTRACT


$cd ~/Desktop/Packages

$mkdir -p public_sources && tar xf public_sources.tbz2 -C public_sources

$cd ~/Desktop/Packages/public_sources/Linux_for_Tegra/source

$tar -xjf kernel_src.tbz2

$tar -xjf kernel_oot_modules_src.tbz2

$tar -xjf nvidia_kernel_display_driver_source.tbz2

-DTS Modifications**

Directly Modified DTS File and location:

“/home/ryhew/Desktop/Packages/public_sources/Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/tegra234-p3737-0000+p3701-0000.dts”

// Disable multigigabit Ethernet
ethernet@6800000 {
    status = "disabled";
};

// Enable RGMII Gigabit
ethernet@2310000 {
    status = "okay";
    phy-mode = "rgmii-id";
    phy-handle = <&phy0>;
    nvidia,phy-reset-gpio = <&gpio TEGRA234_MAIN_GPIO(G, 5) 0>;

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

        phy0: ethernet-phy@0 {
            reg = <0>;
            nvidia,phy-rst-pdelay-msec = <224>;
            nvidia,phy-rst-duration-usec = <10000>;
            interrupt-parent = <&gpio>;
            interrupts = <TEGRA234_MAIN_GPIO(G, 4) IRQ_TYPE_LEVEL_LOW>;
        };
    };
};

4. Kernel Build in BSP SOURCES and replace with Main kernel BSP


$cd /home/ryhew/Desktop/Packages/public_sources/Linux_for_Tegra/source

$export CROSS_COMPILE=$HOME/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-

$make -C kernel

$export INSTALL_MOD_PATH=~/jetson-r36.4.4/Linux_for_Tegra/rootfs/

$sudo -E make install -C kernel

$cp kernel/kernel-jammy-src/arch/arm64/boot/Image ~/jetson-r36.4.4/Linux_for_Tegra/kernel/Image

5. OOT Modules

$cd /home/ryhew/Desktop/Packages/public_sources/Linux_for_Tegra/source
$export CROSS_COMPILE=$HOME/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-
$export KERNEL_HEADERS=$PWD/kernel/kernel-jammy-src
$make modules

$export INSTALL_MOD_PATH=~/jetson-r36.4.4/Linux_for_Tegra/rootfs/
$sudo -E make modules_install

$cd /home/ryhew/jetson-r36.4.4/Linux_for_Tegra
$sudo ./tools/l4t_update_initrd.sh

6. DTB Build

$cd /home/ryhew/Desktop/Packages/public_sources/Linux_for_Tegra/source
$export CROSS_COMPILE=$HOME/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-
$export KERNEL_HEADERS=$PWD/kernel/kernel-jammy-src
$make dtbs
$cp kernel-devicetree/generic-dts/dtbs/* ~/jetson-r36.4.4/Linux_for_Tegra/kernel/dtb/

7. Flash

After recovery start mode
lsusb
7223 nvdia id

cd ~/jetson-r36.4.4/Linux_for_Tegra
sudo ./flash.sh jetson-agx-orin-devkit mmcblk0p1

Here are my questions:

  1. Are the file locations I’m working with and the targets I’m changing correct?
    Are the device tree compilations I made correct?

  2. I’m copying the directory to play with pinmux configurations and changing the same folder name; is this correct, or will it cause an error?

  3. Is compilation necessary after replacing the pinmux DTS with the DTS in the target BSP? If it’s not necessary, is this process done after the flash command?

  4. In the device tree DTS file
    ethernet@6800000 { status = “disabled”; // Multigigabit - explicitly disabled}; Why does it still try to turn it on in the logs after boot?Because its already

  5. Why don’t I see any changes in the logs even though I added the ethernet @2310000 node to the device tree?


Files Available

Can someone point out what I’m missing?

Just want to clarify this before reading anything in the file.

The module you are using here is

  • Module: P3701.0004 (AGX Orin standalone module)

But none of these files are the one used by P3701.0004.

0004 module ends with p3701-0004 in kernel DT. Also, the pinmux file has “-a04” in name as suffix.

There are two files in the location /home/ryhew/jetson-r36.4.4/Linux_for_Tegra/bootloader/generic/BCT:
integra234-mb1-bct-pinmux-p3701-0000.dt and
integra234-mb1-bct-pinmux-p3701-0000-a04.dtsi.

In the /home/ryhew/jetson-r36.4.4/Linux_for_Tegra/bootloader, there are also
integra234-mb1-bct-gpio-p3701-0000.dt and
integra234-mb1-bct-gpio-p3701-0000-a04.dtsi.
I couldn’t find which of these is affected in the supporting documentation. What are the differences between them? Do I need to change both of them when making the change?
————————————————————————————————————————————————————

If we talk about device tree
When I examine tegra234-p3737-0000+p3701-0004-nv.dts, I see that it’s already dependent on the main devkit module, am I wrong?
——————————————————————————————————

tegra234-p3737-0000+p3701-0004-nv.dts includes these—>


#include “staging/tegra234-p3737-0000+p3701-0004.dts”
#include “tegra234-p3737-0000+p3701-xxxx-nv-common.dtsi”
#include “tegra234-p3701-0000.dtsi”

————————————————————————————-
staging/tegra234-p3737-0000+p3701-0004.dts includes these—>

#include “tegra234-p3737-0000+p3701-0000.dts”

meaning any change made here (tegra234-p3737-0000+p3701-0000.dts)

This means that after the DTB files in the BSP source are built, the resulting DTB files are generated separately for each module. We copy these to the main BSP file in place of the relevant kernel DTB files.
I didn’t quite understand what you meant.

Hi,

You could read your flash log and it will tell you what pinmux file is in use.

As my experience in supporting Orin AGX, P3701-0004 module by default is using tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi but not another one. So your modification may not take effect all.

This means that after the DTB files in the BSP source are built, the resulting DTB files are generated separately for each module. We copy these to the main BSP file in place of the relevant kernel DTB files.

If you are sure you know what you are doing then I am ok. My point here is you should understand what files got flashed to the board by reading the flash log first. That is a very common mistakes and it may waste lots of your time (e.g. modify the wrong file and keep flashing the board many times)

I managed to deactivate the MultiGigabit node; could you please verify the code for enable the relevant node for my gigabit ethernet?

I couldn’t find any source confirming that the ethernet@2310000 node exists.

`// Enable RGMII Gigabit
ethernet@2310000 
{status = “okay”;
phy-mode = “rgmii-id”;
phy-handle = <&phy0>;
nvidia,phy-reset-gpio = <&gpio TEGRA234_MAIN_GPIO(G, 5) 0>;
mdio {
    compatible = "nvidia,eqos-mdio";
    #address-cells = <1>;
    #size-cells = <0>;

    phy0: ethernet-phy@0 {
        reg = <0>;
        nvidia,phy-rst-pdelay-msec = <224>;
        nvidia,phy-rst-duration-usec = <10000>;
        interrupt-parent = <&gpio>;
        interrupts = <TEGRA234_MAIN_GPIO(G, 4) IRQ_TYPE_LEVEL_LOW>;
    };
  };
};`

Pinmux change missing is the most common mistakes happened when enabling RGMII.

That was why my previous point should be resolved first.

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