AGX Question : Changing USB Type C OTG port to device only 2.0 port

Dear,
We are developing our own carrier board for AGX.
We want to remove J512 (USB type C OTG port) and add a simple device only 2.0 port that can be connected to a USB host for SDK manager. We will use J513 and a USB hub for USB host mode.
I referenced “Jetson/FAQ/BSP/Remove TypeC - eLinux.org” for this.

  1. ucsi_ccg : status = “disabled”;
  2. ports : usb2-0 : mode = “device”;
  3. removed extcon stuffs from tegra_xudc, tegra_xhci, and head0/1/2
    Unfortunately, it did not work and I couldn’t connect sdkmanager.
    question 1) I did not use id pin and I only connected 4 pins (vbus, dn, dp, gnd) to my 2.0 connector. Is it ok?
    question 2) Is my modification to “tegra194-p2888-0001-p2822-0000-common.dtsi” ok?
    Thanks in advance.

    Hugh Chang

Hi,
It looks like you only have usb2-0 on the custom board. You would need to remove usb2-1,usb2-2,usb2-3,usb3-0,usb3-2,usb3-3 from device tree. And add VBUS pin by setting vbus-supply. For more detail, please refer to Porting USB in adaptation guide.

Hi DaneLLL,

Thanks for your reply.

It looks like you only have usb2-0 on the custom board.
You would need to remove usb2-1,usb2-2,usb2-3,usb3-0,usb3-2,usb3-3 from device tree.

usb2-0 is used as device mode for sdkmanager connection.
Others (usb2/3-1/2/3) are used as host mode.
My goal is to set usb2-0 as device mode instead of otg mode.

I found that “RNDIS failed with USB 2.0 - #10 by DaneLLL” is similar to my question. I’m trying to modify “tegra194-p2888-0001-p2822-0000-common.dtsi” and it seems to me that it is about different dtsi file.

And add VBUS pin by setting vbus-supply.
For more detail, please refer to Porting USB in adaptation guide.

Yes, that is exactly what I want to do.
When I read the “Porting USB” section, I can see

Under the extcon Node (Not Used on the P2822 Carrier Board)

So the description does not fit to “tegra194-p2888-0001-p2822-0000-common.dtsi”.

	ucsi_ccg: ucsi_ccg@8 {
		status = "okay";
		typec-extcon {
			typec_port0: port-0 {
				status = "okay";
				#extcon-cells = <1>;
                cable-connected-on-boot = <0>;
			};
			typec_port1: port-1 {
				status = "okay";
				#extcon-cells = <1>;
                cable-connected-on-boot = <1>;
			};
		};
		/*typec-pd {
			typec_pd: pd {
				status = "okay";
				#extcon-cells = <1>;
			};
		};*/
	};
};

The above is a sketch of my idea. I want to hard-code vbus and id signal value without actual extcon cable for device mode. But I can’t find a document to do it.
Would you help me please?

Best regards,
Hugh Chang

Hi DaneLLL,

  1. Original dtsi : tegra194-p2888-0001-p2822-0000-common.dtsi.org_otg (8.3 KB)
  2. Modification 1 : tegra194-p2888-0001-p2822-0000-common.dtsi.device_only (8.7 KB)
  3. Modification 2 : tegra194-p2888-0001-p2822-0000-common.dtsi.device_only_2 (8.5 KB)

I’m uploading my 2 modifications and the original dtsi file for your reference.
Hoping your help…

Hugh Chang

Hi DaneLLL,
I’ve realized that I need to modify the device driver source code to solve my problem because we do not have “TUSB1046-DCI: USB Type-C crosspoint switch” and the “extcon_*” functions do not work.
I did it by modifying “tegra_xudc.c” and it works well now.
Thank you very much.
Hugh Chang