USB 2.0 Tuning, Add HS_SLEW, HS_RXEQ, HS_TXEQ to the device tree

We have a custom carrier where USB 2.0 works with most devices when we changed the HS_CURR_LEVEL offset in the device tree. We changed this in the device tree because when we used devmem2 to change the register it would revert back to 0 when a new device was plugged into the USB port. We added the following line to Xavier NX device tree in the USB section…
nvidia,hs_curr_level_offset = <6>;

Based on this post…
USB issue

The device tree property name “hs_curr_level_offset” is different than the register description “HS_CURR_LEVEL” in the tuning guide. Where do I find the names of the device tree properties that correspond to the “HS_SLEW”, “HS_RXEQ”, and “HS_TXEQ” registers?

Thanks,
Hal

Check the “prod-settings” in the device tree and there should be register address in it.

I’ve pasted a snippet of the device tree on our Xavier below showing the USB section. You can see where we added “nvidia,hs_curr_level_offset = <0x0000006>” to the USB ports. You can also see the “prod-settings” section at the end. Do I need to define the HS_SLEW, HS_RXEQ, and HS_TXEQ in this section so I can save the adjusted the settings in the device tree?

I also read a 2018 post at the following link stating all the “prod-settings” are generated from internal tools so there isn’t documentation are how to add another entry. Is there a document on how to add an entry to the “prod-settings” section?

Thanks,
Hal

DEVICE TREE USB SECTION BELOW
xusb_padctl@3520000 {
compatible = “nvidia,tegra194-xusb-padctl”;
reg = <0x00000000 0x03520000 0x00000000 0x00001000 0x00000000 0x03540000 0x00000000 0x00001000>;
reg-names = “padctl”, “ao”;
interrupts = <0x00000000 0x000000a7 0x00000004>;
resets = <0x00000004 0x00000072>;
reset-names = “padctl”;
status = “okay”;
vclamp-usb-supply = <0x0000000b>;
avdd-usb-supply = <0x0000029a>;
phandle = <0x0000029b>;
pads {
usb2 {
clocks = <0x00000004 0x000000a5>;
clock-names = “trk”;
lanes {
usb2-0 {
nvidia,hs_curr_level_offset = <0x00000006>;
status = “okay”;
#phy-cells = <0x00000000>;
nvidia,function = “xusb”;
phandle = <0x0000029c>;
};
usb2-1 {
nvidia,hs_curr_level_offset = <0x00000006>;
status = “okay”;
#phy-cells = <0x00000000>;
nvidia,function = “xusb”;
phandle = <0x0000029d>;
};
usb2-2 {
nvidia,hs_curr_level_offset = <0x00000006>;
status = “okay”;
#phy-cells = <0x00000000>;
nvidia,function = “xusb”;
phandle = <0x0000029e>;
};
usb2-3 {
nvidia,hs_curr_level_offset = <0x00000006>;
status = “disabled”;
#phy-cells = <0x00000000>;
};
};
};
usb3 {
lanes {
usb3-0 {
status = “disabled”;
#phy-cells = <0x00000000>;
};
usb3-1 {
status = “disabled”;
#phy-cells = <0x00000000>;
};
usb3-2 {
nvidia,hs_curr_level_offset = <0x00000006>;
status = “okay”;
#phy-cells = <0x00000000>;
nvidia,function = “xusb”;
phandle = <0x0000029f>;
};
usb3-3 {
status = “disabled”;
#phy-cells = <0x00000000>;
};
};
};
};
ports {
usb2-0 {
status = “okay”;
vbus-supply = <0x00000029>;
mode = “otg”;
usb-role-switch;
connector {
compatible = “usb-b-connector”, “gpio-usb-b-connector”;
label = “micro-USB”;
type = “micro”;
vbus-gpio = <0x0000000c 0x000000c9 0x00000001>;
};
};
usb2-1 {
status = “okay”;
vbus-supply = <0x00000029>;
mode = “host”;
};
usb2-2 {
status = “okay”;
vbus-supply = <0x00000029>;
mode = “host”;
};
usb2-3 {
status = “disabled”;
};
usb3-0 {
status = “disabled”;
};
usb3-1 {
status = “disabled”;
};
usb3-2 {
status = “okay”;
nvidia,usb2-companion = <0x00000001>;
};
usb3-3 {
status = “disabled”;
};
};
prod-settings {
#prod-cells = <0x00000004>;
prod_c_bias {
prod = <0x00000000 0x00000284 0x00000038 0x00000038>;
};
prod {
prod = <0x00000000 0x00000024 0x00000fff 0x00000000>;
};
};
};

I’ve downloaded the kernel source and searched for “hs_curr_level_offset” in the files to see where it’s defined. I recursively searched the directories for the text but couldn’t find anything. In the “Jetson Xavier NX Tuning and Compliance Guide” there should be an section on how to get the updated register settings into the device tree. Is there anyone that has built there own carrier card that send me a link to a document explaining how to get the “HS_SLEW”, “HS_RXEQ”, and “HS_TXEQ” registers in the device tree?

Hi,
We have checked this with our teams and think the default value of HS_SLEW, HS_RXEQ, HS_TXEQ should work if hardware is well designed. Would suggest check product design guide and see if there is deviation between the reference design and your design. We would expect default setting to work fine if you follow the reference design.

The Xavier NX USB lines connect to a device without going through a hub on the carrier card. This device is permanently connected to the Xavier NX USB interface, but suppose the device itself has a slightly marginal USB interface where tweaks to HS_SLEW, HS_RXEQ, and HS_TXEQ could increase operational robustness by allowing further adjustment to the Eye Diagram. Perhaps adjustments to RPD_CTRL, TERM_RANGE_ADJ, HS_SQUELCH_LEVEL, and HS_DIN_DLY_SEL could also help. Understanding exactly how to adjust all parameters of the Eye Diagram via the device tree allows a potential software solution, rather than hardware solution, to accommodate the end USB device.

Does the DEVICE TREE USB SECTION listed above support the attached block level schematic? If not, would you recommend the changes that need to be made? Thank you.

@DaneLLL : The custom carrier card routes the Xavier NX USB traces straight to a connector without going through a hub. I modified the block diagram in the design guide to reflect that configuration. Do you see any issues with the Device Tree USB configuration previously shown and with the block diagram?

If this issue is not related to original question, please file a new topic.

Trying to get the block diagram to work is what created the original topic. Changing the HS_CURR_LEVEL to 6 permitted most USB 2 devices to work. The Tuning and Compliance Guide recommended running the compliance test to determine if any parameters other than HS_CURR_LEVEL might need to be adjusted to adapt the Xavier NX’s USB interface to the custom carrier card.

Comparing to the reference design was recommended. If the reference design referred to the Xavier NX development board carrier card, then we don’t have a hub. In case the reference design referred to the product design guide, I took the diagram from that and tweaked it to show our implementation. I wondered if you thought our implementation was specified correctly in the DEVICE TREE USB SECTION we provided because we currently do not know how to make any compliance test related tweaks other than to HS_CURR_LEVEL.

When I mentioned HS_CURR_LEVEL, I meant to say HS_CURR_LEVEL_OFFSET. Sorry about any confusion there.

If you want to discuss about device tree, then it is not really related to tuning. That is why I said your question is not related to original question.

Hope this explains you why you should file new topic…

I apologize if I was off topic. My co-worker’s original question was: “USB 2.0 Tuning, Add HS_SLEW, HS_RXEQ, HS_TXEQ to the device tree.” The only tuning we know how to add to the device tree is HS_CURR_LEVEL_OFFSET, which was definitely needed after we bi-passed the hub. We still do not know how to add HS_SLEW, HS_RXEQ, HS_TXEQ. I’m trying to ensure that an errored device tree is not a contributor to our wanting to add HS_SLEW, HS_RXEQ, HS_TXEQ to the device tree, especially since I deviated from the development carrier card design and from the block diagram in the design guide. If needed, I can file a new topic to confirm the device tree, but I’ll wait until my co-worker’s request is resolved. I do appreciate your time. Thanks!

Hi,
HS_SLEW, HS_RXEQ, HS_TXEQ cannot be adjusted in device tree. For programming the settings, please try to add a service in startup to set the values. You can refer to

Jetson Nano FAQ
Q: How to autorun an app or commands at startup?

It is still possible there is unknown defect in hardware design. We would expect default settings working fine if the custom board is good.

We’re having issue with one particular type of USB device. At the moment, the industrial Xavier NX seems to perform better with this USB device than does the development kit Xavier NX. I worked to design USB interface per design guide, but all hardware is currently under test to validate robustness of design.

When trying to set HS_SLEW, HX_RXEQ, and HS_TXEQ, we thought we saw it resetting when we plugged in a USB device. We saw the same with the HS_CURR_LEVEL_OFFSET until we implemented it in the device tree. Changing the HS_CURR_LEVEL_OFFSET from 0 to 6 was definitely needed.

I appreciate all the moderators’ feedback. Thanks!

Hi,
For setting nvidia,hs_curr_level_offset, there is an entry:
USB issue - #12 by DaneLLL

Please keep others in default value and adjust this.

And this design does not follow design guide and may trigger certain issue:

In our design duide, GPIO00 is output from module to a load switch to enable VBUS of USB1 port.
In the custom design, GPIO00 is used as input from USB0 port as VBUS_DETECTION, and the VBUS of USB1 port is always on.

Hi, @DaneLLL ,

Custom carrier card was modeled after development kit Xavier NX carrier card. Here, USB2-0 was used as recovery port and USB2-1 was a device port that was companion to USB3-2. The development kit Xavier NX was used for software development, and we switched to industrial grade Xavier NX for actual field deployment. We flashed the industrial grade Xavier NX. I need to go back and compare the development kit and industrial grade device trees for the Xavier NX to see if your “may trigger certain issue” is going to be problematic for me. I guess just stand by for the moment. Thanks for the feedback.

@DaneLLL , I’m looking at the USB ports and pads sections of the Device Trees for the development kit Xavier NX and for the industrial grade Xavier NX, and those sections look the same. However, the development kit Xavier NX uses GPIO00 for USB2-0 VBUS_Detection input, while industrial grade Xavier NX uses GPIO00 for USB2-1 VBUS enable output. Does mode = “otg” somehow allow the development kit Xavier NX and the industrial grade Xavier NX to both work in both the development kit carrier card and our custom carrier card? Or is there something else somewhere in the two different device trees that define differently how GPIO00 is supposed to work?

Hi,

As my previous suggestion, when you comes to discuss GPIO or how to configure device tree, it is already not related to your original question.

Directly file a new topic and ask your question there. If you don’t file a new topic, it will just start another 20 comments which discuss unrelated things.

Also, your comment is not quite clear and we don’t know what you are talking about.

For example, there is nothing called industrial grade Xavier NX. Xavier NX just has only one kind. No such thing called industrial grade.

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