Disabling the USB ports on the dev kit?

How do I go about disabling the USB ports on the dev kit? I’ve tried to disable the USB Pin (i.e. pin 87) and then recompile the device tree and flash, but when I plug something into any USB it still autodetects the device. Plus since there are 4, how do I know which USB port is associated with which pin in the spreadsheet?

I am trying to test that my method of enabling and disabling interfaces is correct.

Thanks for any advice you can provide.

Hi,
Please check tegra194-p3668-common.dtsi and keep only usb2-0 to status = “okay”. Set other ports to disabled.

And keep only usb2-0 in

	tegra_xhci: xhci@3610000 {
		extcon-cables = <&vbus_id_extcon 1>;
		extcon-cable-names = "id";
		#extcon-cells = <1>;
		phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>;
		phy-names = "usb2-0";
		nvidia,xusb-padctl = <&xusb_padctl>;
		status = "okay";
	};

So I modified the tegra194-p3668-common.dtsi (located at /source/hardware/nvidia/platform/t19x/jakku/kernel-dts/common/) by changing the ports of USB2-1, USB2-2, & USB2-3 to be “disabled” (starting at line 146, ports{ section of the .dtsi file). I also removed those from the tegra_xhci, phy-names section as you described (line 203 of the .dtsi file).

I ran my build script to recompile:

#!/bin/bash
set -e
export KERNEL_SRC_DIR=${HOME}/source/kernel/kernel-5.10
export CROSS_COMPILE=${HOME}/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
export TEGRA_KERNEL_OUT=${HOME}/Desktop/kernel_out
export ARCH=arm64
make -C $KERNEL_SRC_DIR ARCH=arm64 LOCALVERSION=“-tegra” O=$TEGRA_KERNEL_OUT tegra_defconfig
make -C $KERNEL_SRC_DIR ARCH=arm64 LOCALVERSION=“-tegra” O=$TEGRA_KERNEL_OUT -j8
make -C $KERNEL_SRC_DIR ARCH=arm64 INSTALL_MOD_PATH=$TEGRA_KERNEL_OUT/modules_install INSTALL_MOD_STRIP=1 O=$TEGRA_KERNEL_OUT modules_install -j8

Then I copied over the compiled kernel_out file (tegra194-p3668-all-p3509–0000.dtb) over to my Linux_for_Tegra/kernel/dtb/ directory.

I flashed just the kernel-dtb with the command below:

sudo ./flash.sh -k kernel-dtb jetson-xavier-nx-devkit-emmc mmcblk0p1

and also tried the full flash:

sudo ./flash.sh jetson-xavier-nx-devkit-emmc mmcblk0p1

Afterwards, neither flash resulted in the USB ports being disabled. What am I missing? Thanks in advance!

Give them permissions of 000.

Ie: “sudo chmod 000 dev/usb# “ for each of the available usb device number’s. It might work with “ sudo chmod 000 /media “ .

Thanks, but I want to verify I am changing the pinmux correctly, compile the kernel, and see the results (USBs or something else disabled) on the dev kit.

I have not been able to achieve that yet.

Hi,
Please run xxd command to check if the device tree are correct after booting:

$ xxd /proc/device-tree/xhci@3610000/phy-names

And if usb2-1, usb2-2, usb3-2 are disbled as expected.

I run that command and the response is:
00000000: 7573 62 32 2d30 0075 7362 322d 3100 7573 usb2-0.usb2-1.us
00000010: 6232 2d32 0075 7362 332d 3200 b2-2.usb3-2

Does this mean the USB ports are not disabled (I’m guessing not)? Do I need to add the tegra194-p3668-common.dtsi file I modified to my make specifically?

It seems like it didn’t get updated in the compile or I’m missing a step for it to build…

Hi,
Please check the steps in
Kernel Customization — Jetson Linux<br/>Developer Guide 34.1 documentation

It is not correct to copy dtb only. Please do

  1. For the device tree, replace the files in Linux_for_Tegra/kernel/dtb/ with a copy from:
    $kernel_out/arch/arm64/boot/dts/nvidia/

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