I have a custom board for the Xavier NX, and it works fine with micro-USB for USB0 -OTG (USB2.0 High Speed). but how to use the USB3.0/USB3.1 (SuperSpeed) in device mode as a slave. The custom board’s USB3 port is Type-C rather than Type-A like it was on the original carrier board.
To control the board, we intend to connect this to a desktop PC. And as of right now, the PC has not detected it; neither a PID nor a VID have been found; nothing has occurred. (Perhaps it is currently only in host mode.)
is it possible to configure or switch from “host-mode” to “device mode/slave mode” via software?
for the host-mode, this USB Type-C can work well, it can read/write keyboard and webcam.
Hallo @WayneWWW
Thank you so much for your reply.
that command does not work for me, I have no folder named ‘usb_role’ in /sys/class/
currenty, I am using JetPack 4.6.3 [L4T 32.7.3]
I have tried to modify the device tree, by following this reference: reference
Download and install the Toolchain wget http://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
Execute the following commands to extract the toolchain: mkdir $HOME/l4t-gcc cd $HOME/l4t-gcc tar xf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
Download the kernel sources NVIDIA Jetson Linux 32.7.3 - Driver BSP
Execute the following commands to extract the kernel: tar -xvf public_sources.tbz2 cd Linux_for_Tegra/source/public JETSON_XAVIER_NX_KERNEL_SOURCE=$(pwd) tar -xf kernel_src.tbz2
Modify the Device Tree - specifically for USB?
public_sources/Linux_for_Tegra/source/public/kernel_src/hardware/nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-p3668-common.dtsi tegra194-p3668-common.dtsi (11.7 KB)
i just edited:
ports {
usb2-0 {
mode = “otg”;
status = “okay”;
};
usb2-1 {
mode = “otg”;
status = “okay”;
};
usb2-2 {
mode = “otg”;
vbus-supply = <&battery_reg>;
status = “okay”;
};
usb3-2 {
nvidia,usb2-companion = <1>;
status = “okay”;
};
};
Compile kernel and dtb
the steps: cd $JETSON_XAVIER_NX_KERNEL_SOURCE TOOLCHAIN_PREFIX=$HOME/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- TEGRA_KERNEL_OUT=$JETSON_XAVIER_NX_KERNEL_SOURCE/build KERNEL_MODULES_OUT=$JETSON_XAVIER_NX_KERNEL_SOURCE/modules make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} tegra_defconfig make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target zImage make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target modulesmake -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target dtbs make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra INSTALL_MOD_PATH=$KERNEL_MODULES_OUT modules_install
Copy device tree into jetpack
sdk-manager has been installed. export NVIDIA_SDK_MANAGER=$HOME/nvidia/nvidia_sdk/
Select DTB and directory based on Jetson Xavier NX module type export DTB=tegra194-p3668-all-p3509-0000.dtb JETPACK_4_6_P3668=${NVIDIA_SDK_MANAGER}/JetPack_4.6-3_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra
Flash Jetson Board (device tree only)
This command flashes only the device tree, excluding the kernel image and filesystem.
the Jetson NANO is in recovery mode. cd ${JETPACK_4_3_P3448}
Copy device tree generated cp $JETSON_XAVIER_NX_KERNEL_SOURCE/build/arch/arm64/boot/dts/${DTB} kernel/dtb/
Ja, i still need help on this.
I’ve seen that this chip is supported on linux/tree/master/drivers/usb/typec/ hd3ss3220.c. and I have checked that JetPack 5.1.1 already has this library as well.
I thought if I upgrade to the latest version of JetPack. my USB-C should be able to run automatically, but it doesn’t work. when I connect it to PC HOST (device mode), PC doesn’t detect anything. But it still work as HOST only (mouse, webcam, etc)
We cannot help you on hd3ss3220.c. It is 3rdparty device and there are too many kinds. Unlikely to know every type C controller over the world.
What we can help is after you are sure the function of hd3ss3220.c is fine, you could refer to document here to write host side usb configuraiton.
I would like to seek clarification regarding Xavier NX USB.
According to the documentation(Datasheet), it mentions that USB3.0 can function in device mode, but there is no presence of a USB3.0 lane in the Xavier NX. it says USB.3.1’s support for host mode only. Consequently, does this imply that USB2.0 is the only option for operating in device mode?
I am confused because the document(Product Design Guide) only mentions USB2.0 and USB3.2, which leaves me uncertain about the support for USB3.1/2 and whether it is limited to host mode only.