AGX USB2.0 OTG(device) mode cannot turn to CONNECT status

Hello there,
I designed a carrier board which has a USB2-0 as OTG(device) port, I changed the dtsi file following the design guide and the topic before, now system boot up smoothly but USB2-0 doesn’t work. I compared the dmesg from this carrier board to devkit, the only difference I can saw is on devkit there is one message “android_work: sent uevent of USB_STATE= CONNECTED”, no connect event on my board, seems no interrupt triggered when usb cable plugin. can anybody give any hints how to debug it? any comments are appreciated.
BR,
Willian

Hi,
Here is a patch to run J512 on Xavier developer kit in device mode only:
RNDIS failed with USB 2.0 - #10 by DaneLLL

Please refer to it and apply to your case. To check if it runs fine in device mode only.

1 Like

Hi DaneLLL,
Thanks for your help, it works, after apply the patch, USB2-0 RNDIS works fine.
But a new issue pops up, USB2-3, which was a host port for mouse and keyboard, doesn’t work anymore, so I cannot login system since mouse/keyboard is not available.
My intention is to use USB2-0 and USB2-1 as device mode, and USB 2-3 is host mode, how can I enable them simultaneously?
Thanks in advance.
BR,
Willian
Please refer to the usb part of dtsi code attached below (so far USB 2-1 and USB 3 part keep disable to avoid any inteference):

  1. external-connection {
  2. vbus_id_extcon: extcon@1 {
  3. compatible = “extcon-gpio-states”;
  4. reg = <0x1>;
  5. extcon-gpio,name = “VBUS”;
  6. extcon-gpio,out-cable-names = <EXTCON_USB EXTCON_NONE>;
  7. cable-connected-on-boot = <0>;
  8. #extcon-cells = <1>;
  9. status = “okay”;
  10. };
  11. };
  • #if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
  • xusb_padctl: xusb_padctl@3520000 {
  1. status = “okay”;
  • pads {
  1. usb2 {
  2. lanes {
  3. usb2-0 {
  4. nvidia,function = “xusb”;
  5. status = “okay”;
  6. };
  7. usb2-1 {
  8. nvidia,function = “xusb”;
  9. status = “disabled”;
  10. };
  11. usb2-2 {
  12. nvidia,function = “xusb”;
  13. status = “disabled”;
  14. };
  15. usb2-3 {
  16. nvidia,function = “xusb”;
  17. status = “okay”;
  18. };
  19. };
  20. };
  21. usb3 {
  22. lanes {
  23. usb3-0 {
  24. nvidia,function = “xusb”;
  25. status = “disabled”;
  26. };
  27. usb3-2 {
  28. nvidia,function = “xusb”;
  29. status = “disabled”;
  30. };
  31. usb3-3 {
  32. nvidia,function = “xusb”;
  33. status = “disabled”;
  34. };
  35. };
  36. };
  37. };
  • ports {
  1. usb2-0 {
  2. mode = “device”;
  3. status = “okay”;
  4. };
  5. usb2-1 {
  6. mode = “host”;
  7. status = “disabled”;
  8. };
  9. usb2-2 {
  10. mode = “host”;
  11. status = “disabled”;
  12. };
  13. usb2-3 {
  14. mode = “host”;
  15. status = “okay”;
  16. };
  17. usb3-0 {
  18. nvidia,usb2-companion = <1>;
  19. status = “disabled”;
  20. };
  21. usb3-2 {
  22. nvidia,usb2-companion = <0>;
  23. status = “disabled”;
  24. };
  25. usb3-3 {
  26. nvidia,usb2-companion = <3>;
  27. nvidia,usb3-gen1-only= <1>;
  28. status = “disabled”;
  29. };
  30. };
  31. };
  32. #endif
  • tegra_xudc: xudc@3550000 {
  1. extcon-cables = <&vbus_id_extcon 0>;
  2. extcon-cable-names = “vbus”;
  3. #extcon-cells = <1>;
  4. phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>;
  5. phy-names = “usb2”;
  6. nvidia,xusb-padctl = <&xusb_padctl>;
  7. nvidia,boost_cpu_freq = <1200>;
  8. status = “okay”;
  9. };
  • tegra_xhci: xhci@3610000 {
  1. extcon-cables = <&vbus_id_extcon 1>;
  2. extcon-cable-names = “id”;
  3. #extcon-cells = <1>;
  4. phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-3}>;
  5. phy-names = “usb2-0”, “usb2-3”;
  6. nvidia,xusb-padctl = <&xusb_padctl>;
  7. status = “okay”;
  8. };

Hi DaneLLL,
Solved, please ignore the question above, sorry for any inconvenience, thanks again.
BR,
Willian

1 Like