Jetpack 4.4-> 4.5.1 EXAR usb serial failed

Hi
I use Exar usb serial device on Jetson NX , running Jetpack 4.4 and 4.5.1
Kernel of 4.4 and 4.5.1 are 4.9-140 and 4.9-201
Running same EXAR usb serial driver
Linux 3.6.x and newer 1C
https://www.maxlinear.com/support/design-tools/software-drivers

But EXAR usb uart seems only worked on Jetpack 4.4 , kernel 4.9-140
When it is running on Jetpack 4.5.1 , transmission are not worked properly.
I use a self-loop adaptor to test serial send and receive.

Jetpack 4.5.1

Jetpack 4.4

You can see log doesnt shows read_bulk_callback and submit_read_urb while running transmission on 4.5.1 , just open and close operation in driver message.

Is there any usb host modification in 4.9-201 affect this issue?
How can it be fixed ?
Thanks

Hi,
Would like to get more information. Is the error observed on developer kit or custom board? For running Exar usb serial device, do we need to enable certain kernel config?

Hi
We use emmc module on our own custom board , and Exar usb serial device is located usb-in-line on board.
The usage should be same while using a Exar usb serial apdaptor plug in devkit’s usb port.
For Exar driver , it is built in with kernel and add exar device to ignore list in cdc-acm driver (rebuilt cdc-acm.ko).
1628135883795


Hi Nvidia:
Since our customer has request of using deepstream 5.1 on Jetpack 4.5.1,
If i use kernel 4.9-140 of Jetpack 4.4 to build with rootfs file system of Jetpack 4.5.1 to let this exar uart driver worked properly.
Will it come out any possible issue?

Hi,
Is it possible to provide steps so that we can reproduce it on Xavier NX devkit? Not sure if we can buy the same or similar device online. If you have web link to the device or similar device, please also share it. Thanks.

Hi,
I use Jetson L4t package to build image , including kernel compile.
Add above EXAR usb driver into kernel source code(KCONFIG , Makefile) ,
then recompile and flash to NX.
Kernel will generate ttyXRUSB0 device if you plug in EXAR USB serial devices.

Compatible device chips:
XR21V1410/1412/1414
XR21B1411|XR21B1420/1422/1424|
XR22801/802/804

Open terminal.

Setup ttyXRUSB0 serial device
stty -F /dev/ttyXRUSB0 115200 -echo -onlcr

Test transmission
Use jumper or cable to connect TX,RX together to test self-transmission.
Open 2 terminals , one with command “cat /dev/ttyXRUSB0”
another with command “echo xxxxx > /dev/ttyXRUSB0”

result with Jetpack 4.4 , kernel 4.9-140
(dmesg kernel logs as topic article shows)
the device receive texts from echo cmd sent in cat cmd terminal.
driver shows xr_ysb_serial_read_bulk_callback, xr_usb_serial_submit_read_urb function calls while receive text at RX pin.

but in Jetpack 4.5.1 , kernel 4.9-201 ,
echo cmd terminal doesn’t receive any text while transmit, only shows tty_open,tty_close , serial_softint fuction calls in driver logs.

Is it related to some changes of USB host driver of mainline kernel 4.9-201?
https://android.googlesource.com/kernel/common/+/09bf7fb0bd33ea586aaca174240e062a45bd7717
https://githubmemory.com/repo/bacnh85/Quectel_Linux_USB_Driver/issues/6

Hi,
The USB firmware is same on Jetpack 4.4and Jetpack 4.5.1. The version is 60.06:

[    5.856813] tegra-xusb 3610000.xhci: Firmware timestamp: 2019-07-24 05:47:34 UTC, Version: 60.06 release

So it is very likely to be an issue triggered by upstream patches. Is it possible you can revert the patches and rebuild kernel for a try?

Hi:
How do i locate upstream patches , by compare these two version of kernel source code or provided by you?

Hi,
Since we don’t have the device, would need your help to check it. You can download kernel source code with git by following Obtaining the Kernel Sources with Git

And then you can rebuild/replace kernel for further checking.

Hi,
I rebuild L4T 32.5.1 (jetpack 4.5.1) with older 4.9-140 kernel source from L4T 32.4.3(jetpack 4.4 ).
build_l4t.sh (2.5 KB)
and l4t file structure

I delete 4.9-201 in rootfs/lib/modules/ , use 4.9-140.
Then flash to NX
When it boot up , System logo is the newer 32.5.1 one.
nv_tegra_release shows 5.1 as well.
Kernel is the replaced 4.9-140.

But it has some issues like :
nvpmodel power mode switch will failed


apt repo and network also work not properly.

Most important , exar driver is also not worked, as above reply described.

As result, it seems not associated with kernel 4.9-201.

Is there any possible changes of l4t 32.5.1 other than kernal related to this issue?

Next time i will take a experiment to build older L4T 32.4.3-Jetpack4.4 with newer kernel 4.9-201 to double check root course again.