I’m working on a Jetson Orin NX with JetPack 5.1.2 and I’ve been having the following issue.
What happens is that I’m using the USB C port as a virtual UART but it only works if the cable is connected to the computer before the board boots.
If the cable is connected before the board boots, it works fine, the virtual UART serial console opens and is responsive to the inputs from the user. After the board has already booted, if I’m using the serial console and the cable is disconnected and reconnected again, it does not work anymore. If the board boots and then I connect the USB C to access the virtual UART serial console, it doesn’t work. The virtual UART serial console works if and only if the cable is connected before the board boots.
I did some research regarding this problem but I didn’t find any similar issues. What I found out is that there is an USB firmware that needs to be applied to the sources in order to fix a bug related to UART not receiving data.
That USB firmware version is for JetPack5.1.1, is there a new version of the USB firmware for JetPack5.1.2?
Is there a patch needed to solve this issue? Or what modifications to the kernel should I perform in order to fix the virtual UART serial console only working when the cable is connected before booting.
Yes, I connected the USB-C to the host. I’m using the port for debugging purposes and the behavior that I mention also happens on the virtual ethernet interface, not only on the serial console.
What I want is to be able to have a working serial console or virtual ethernet whenever I connect the USB-C to the host and not only if the cable is connected before the board boots.
I just double checked your log and notice there are some mislead in my previous comment.
Sorry in advance.
Are you talking about you have a usb device on the type C port like STM32 Virtual ComPort and Quad RS232-HS and you use that communicate with other device on UART protocol?
And you are opening /dev/ttyACM0 on your jetson but some kinds of host PC?
On dmesg there is no activity at all if I connect the usb cable after booting. I’ve tried multiple times but there are no new entries in dmesg -w.
I need to solve the issue on JP5.1.2. I checked if the issue also happens on JP5.1.1 (it does) and if it could be solved with the usb firmware but there was no success. I’m sorry for the dmesg on JP5.1.1 but I can confirm that the issue also happens on JP5.1.2
The STM32 and the other interfaces work as expected.
Just for us to be on the same page, I’m talking about he USB-C cable that it’s used for flashing, which is the same cable that enables the ACM0 on the host PC, which is also the same cable that sets up the l4tbr0 interface with 192.168.55.1 IP.
Ok, so you are still talking about the default /dev/ttyACM0 which you could see on host side.
Then my previous comment is still correct. There is no UART thing involved in this topic.
This is basically just another usb device mode issue.
I don’t think the usb firmware is related to your issue. The usb firmware is to fix issue when jetson is playing as usb host. But in your issue, jetson plays as usb device.
The issue seems to be the type C port you designed has something wrong in data role change. So that hotplug does not trigger the usb device mode.
Please share us your board schematic for usb part and also what is your device tree right now.
You could also try to reproduce your issue on devkit (I don’t have it right now) and see if only custom board would hit this.