How to Set USB 2.0 Eye Diagram Registers to Fixed Values in Device Tree or Boot Time

Continuing the discussion from How to Set USB 2.0 Eye Diagram Registers to Fixed Values in Device Tree or Boot Time:
Hi @WayneWWW

I have same problem at USB2-2 @ JetPack 6.2 Orin NX as follows.
螢幕快照 2025-12-04 11-22-47
Address 0x03520108 modified from 0x028C88D0 to 0x028C88D2 tested pass @ devmem

I’m patched your patch, and add test property value in DTS as follows.

--- a/source/hardware/nvidia/t23x/nv-public/nv-platform/tegra234-p3768-0000+p3767-xxxx-nv-common.dtsi
+++ b/source/hardware/nvidia/t23x/nv-public/nv-platform/tegra234-p3768-0000+p3767-xxxx-nv-common.dtsi
@@ -195,6 +195,10 @@
 
 		padctl@3520000 {
 			ports {
+				usb2-2 {
+					nvidia,hs_curr_level_offset = <6>;
+				};
+
 				usb3-0 {
 					nvidia,usb2-companion = <2>;

But won’t work after boot.
I’m add debug message as follows

--- a/source/kernel/kernel-jammy-src/drivers/phy/tegra/xusb.c
@@ -141,1 +142,1 @@
        err = of_property_read_s32(np, "nvidia,hs_curr_level_offset", &offset);
        if (err == 0)
                usb2->hs_curr_level_offset = offset;

+        dev_err(dev, "err=%d, DTS offset = %d, Actual offset = %d\n", err, offset, usb2->hs_curr_level_offset);

        /* this property is optional, ignore -EINVAL error */
        if (err == -EINVAL)
                err = 0;

And result

[    1.784587]  usb2:  err=-22, DTS offset = -9125, Actual offset = 0
[    1.784607]  usb2:  err=-22, DTS offset = -9125, Actual offset = 0
[    1.784621]  usb2:  err=-22, DTS offset = -9125, Actual offset = 0
[    1.784650]  usb3:  err=-22, DTS offset = -9125, Actual offset = 0
[    1.784664]  usb3:  err=-22, DTS offset = -9125, Actual offset = 0

Look like got nvidia,hs_curr_level_offset failed.
Have I missing something?

Thanks you a lot.

*** Please note that this reply is generated by LLM automatically ***

Based on the provided context, it appears that you are experiencing an issue with setting USB 2.0 eye diagram registers to fixed values in the device tree or at boot time on a Jetson Orin NX device running JetPack 6.2.

You mentioned that you have applied a patch provided by WayneWWW, which modified the address 0x03520108 from 0x028C88 to 0x028C88, and added a test property value in the DTS file. However, after booting, the changes do not seem to take effect.

To troubleshoot this issue, let’s compare the steps you took with the recommended approach:

  1. Patch application: You mentioned that you applied the patch provided by WayneWWW. Ensure that the patch was applied correctly and that there were no errors during the application process.
  2. DTS file modification: You added a test property value in the DTS file. Verify that the DTS file was modified correctly and that the changes were saved.
  3. Debug message: You added a debug message to investigate the issue. The debug message indicates that the changes failed to take effect.

Considering the provided information, here are a few potential causes for the issue:

  • Incorrect patch application: Double-check that the patch was applied correctly, and that there were no errors during the application process.
  • DTS file modification issues: Verify that the DTS file was modified correctly, and that the changes were saved. Ensure that the DTS file is being used by the system.
  • Boot time configuration: It’s possible that the configuration is being overridden at boot time. Check the boot logs to see if there are any messages indicating that the configuration is being changed.
  • Hardware limitations: It’s possible that the hardware does not support the desired configuration. Check the documentation for the Jetson Orin NX device to see if there are any limitations or restrictions on configuring the USB 2.0 eye diagram registers.

To further troubleshoot the issue, you can try the following:

  • Check the boot logs: Investigate the boot logs to see if there are any messages indicating that the configuration is being changed or if there are any errors related to the USB 2.0 eye diagram registers.
  • Use devmem to verify the register values: Use the devmem command to verify that the register values are being set correctly.
  • Consult the documentation: Check the documentation for the Jetson Orin NX device to see if there are any specific requirements or restrictions for configuring the USB 2.0 eye diagram registers.

If you continue to experience issues, it may be helpful to provide more information about your setup, including the exact patch you applied, the modifications you made to the DTS file, and any relevant boot logs or debug messages.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Thanks you.

  • I’m checked patch, identical with @WayneWWW provided.
  • Tried to hard-code to set value as follows
--- a/source/kernel/kernel-jammy-src/drivers/phy/tegra/xusb.c
@@ -141,1 +142,1 @@
        err = of_property_read_s32(np, "nvidia,hs_curr_level_offset", &offset);
        if (err == 0)
                usb2->hs_curr_level_offset = offset;

+        usb2->hs_curr_level_offset = 4;

        /* this property is optional, ignore -EINVAL error */
        if (err == -EINVAL)
                err = 0;

Before (non hard-code set) value: 0x02CC88D0, after: 0x02CC88D4
It work, problem is DTS property nvidia,hs_curr_level_offset not apply here.
Is source/hardware/nvidia/t23x/nv-public/nv-platform/tegra234-p3768-0000+p3767-xxxx-nv-common.dtsi incorrect?
Trying add pad property as follows

padctl@3520000 {
+                       pads {
+                              usb2 {
+                                       lanes {
+                                               usb2-2 {
+                                                        nvidia,hs_curr_level_offset = <6>;
+                                                };
+                                      };
+                                };
+                        };
  • In patch of @WayneWWW, source/kernel/kernel-jammy-src/drivers/phy/tegra/xusb-tegra210.c patch also,
    And I added debug message below patch section as follows, but didn’t print-out anything, is patch of xusb-tegra210.c need?
+       } else
+               value |= HS_CURR_LEVEL(priv->fuse.hs_curr_level[index]);
++
++      dev_err(&phy->dev, "nya, tegra210, writel, index=%u\n", index);
++
        padctl_writel(padctl, value, XUSB_PADCTL_USB2_OTG_PADX_CTL0(index));

Thanks you.

Hi @carolyuu

Added follows property in source/hardware/nvidia/t23x/nv-public/nv-platform/tegra234-p3768-0000+p3767-xxxx-nv-common.dtsi is work.

padctl@3520000 {
+                       pads {
+                              usb2 {
+                                       lanes {
+                                               usb2-2 {
+                                                        nvidia,hs_curr_level_offset = <6>;
+                                                };
+                                      };
+                                };
+                        };

Get value by
$ sudo busybox devmem 0x03520108
Result: From rom 0x028C88D0 to 0x028C88D6
Other address is unchanged.

Notice: Removed patch section of source/kernel/kernel-jammy-src/drivers/phy/tegra/xusb-tegra210.c because unused look like, is correct?

Thanks you.

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