Enabled OTG on AGX Xavier with J5.0.2

Hi

I have tried to enable the OTG on a micro usb by reference the developer guide and some topics
https://docs.nvidia.com/jetson/archives/r35.1/DeveloperGuide/text/HR/JetsonModuleAdaptationAndBringUp/JetsonAgxXavierSeries.html?highlight=ether#for-an-otg-on-the-go-port

I have modified the ucsi_ccg@8, xusb_padctl@3520000, xhci@3610000 refer to the developer guide, but it didn’t work

Then I reference a part of this topic:

Fisrt, disable TYPE-C function like: ucsi_ccg
Second, add a new extcon for USB configuration
Third, replace extcon-cables in tegra_xudc and tegra_xhci

Actually, I have done those steps on AGX Xavier with J4.6.2 and woked, but it did’nt work on J5.0.2

Is there anything not mention on developer guide that I need to notice?

Shall I need to modify the extcon-cables in tegra_xudc and tegra_xhc?

I saw there’s a condition about TEGRA_XUSB_DT_VERSION = DT_VERSION_2, so I think it maybe not important on 5.0.2.

Here’s the dts and dmsg,
tegra194-p2888-0001-p2822-0000-common.dtsi (10.9 KB)
dmesg.txt (90.0 KB)

and reference the topic

I don’t have any devices like camera or M.2 card on the device, but the ucsi errors still appear

Hi,

Why do you still have ccg_typec_con0 there? Didn’t you say you are trying to disable type C?

This is also mentioned in document. Please stop referring to some old 2020 or 2021 posts for your jeptpack5.x release software. They are not helping because the kernel driver in use are also changed. Read the document first.

Hi WayneWWW,

Thanks for reply

The document means the developer guide?

I add the ccg_typec_con0 cause the guide tell me to do on type c otg port

My purpose is to enable a micro usb otg port

If I want to reach the purpose, what should I notice?

I am not sure what does that mean “I add the ccg_typec_con0 cause the guide tell me to do on type c otg port”…

You don’t need to add something that is already in the default device tree…

You need to disable type C function and read the document for mciro usb case.
The whole " For an OTG (On-The-GO) Port" section on the document is talking about that

Sorry that I have some misunderstanding about “Why do you still have ccg_typec_con0 there?”

I thought you mean the remote-endpoint I modified

So I should close the ucsi_ccg to disuse the type c for OTG?

But the document mention that it take J512, USB3.1 type-C connector as an example of an OTG port.

It still apply to micro usb?

The only micro usb case is here

Please have some advice for me

I will check the document again

ucsi_ccg是AGX Xavier Devkit上面那個type C controller. 現在你沒有這個東西, 所以你要把它拿掉
然後文件那上個Connector 就是micro usb的例子. 希望這樣講解有解答到你的問題.

usci_ccg is the type C controller on AGX Xavier devkit. You don’t have this component on your board so you need to remove it. Also, the “Connector” on document is the example for micro usb.

Hope this clarify your question.

Thanks for your explain with patient

I will check document again

Hi,

I have disabled the status of ucsi_ccg and commented out the ccg_typec_con0

I also comment out the usb_role_switch0 under the usb2-0 cause it seems correspond to the type-c

But the OTG still not work

Actually I have two type-c ports set as host on my board, so I didn’t comment out all the ucsi_ccg

I also reference the J5.0.2 device tree of Xavier NX and it seems no much different with the document

Here’s the dts and dmesg
tegra194-p2888-0001-p2822-0000-common.dtsi (10.7 KB)
dmesg.txt (84.3 KB)

What is your method to tell “otg not work”?

Hi WayneWWW

Sorry late for reply

I used ssh with micro usb cable and my host can not connect to the target

Does “lsusb” on your host detect the device mode jetson?

No, the Nvidia device did not appear

Sorry for the late response, have you managed to get issue resolved or still need the support? Thanks

It still an issue but I have another project have to do first, so the topic may pending for a while