# Device tree USB issues, documentation incomplete

**URL:** <https://forums.developer.nvidia.com/t/device-tree-usb-issues-documentation-incomplete/75090>\
**Category:** Jetson AGX Xavier\
**Created:** [May 21, 2019, 8:46pm UTC](https://forums.developer.nvidia.com/t/device-tree-usb-issues-documentation-incomplete/75090 "2019-05-21T20:46:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![qmilloy](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@qmilloy](https://forums.developer.nvidia.com/u/qmilloy)\
**Post date:** [May 21, 2019, 8:46pm UTC](https://forums.developer.nvidia.com/t/device-tree-usb-issues-documentation-incomplete/75090/1 "2019-05-21T20:46:46Z")

</div>

Hi there,

I have been following the Jetson AGX Xavier Platform Adaptation and Bring-up Guide,([https://developer.download.nvidia.com/embedded/L4T/r32\_Release\_v1.0/Docs/Tegra\_Linux\_Driver\_Package\_AGX\_Xavier\_Adaptation\_Guide.pdf](https://developer.download.nvidia.com/embedded/L4T/r32_Release_v1.0/Docs/Tegra_Linux_Driver_Package_AGX_Xavier_Adaptation_Guide.pdf)) and am having issues on a custom carrier board with a different USB configuration than the dev kit. The guide references documentation files for the device tree bindings, but these documentation files do not exists. For instance, for xusb bindings, the guide references **kernel/kernel-4.9/Documentation/devicetree/bindings/pinctrl/nvidia,tegra194-padctl.txt** but no such file exists.

So without the full documentation of bindings, I am trying to work through what I may have missed by digging through the .dtsi files. Here is what our custom carrier has:

USB2.0

- [0] - Disabled (not present)
- [1] - Disabled (not present)
- [2] - Run to 3-0, host mode
- [3] - Run to 3-3, host mode  
USB3.1
- [0 (uphy6)] - Companion 2-2 - type A
- [1] - Disabled (not present)
- [2] - Disabled (not present)
- [3 (uphy 11)] - Companion 2-3, gen1 only - type A

1. Should I the leave the pads enabled but disable the ports, or do I need to disable both?
2. How might I implement xHCI with the given setup? I am somewhat confused on the xHCI format.
3. What other things do I need to disable in my dts? xudc comes to mind as a possible issue?

Here is what I currently have for the dts, I am sure it is incomplete. As is, it does not work.

```auto
/ {
  xusb_padctl: xusb_padctl@3520000 {
    pads {
      usb2 {
        lanes {
          usb2-0 {
            nvidia,function = "xusb";
            status = "okay";
          };
          usb2-1 {
            nvidia,function = "xusb";
            status = "okay";
          };
          usb2-2 {
            nvidia,function = "xusb";
            status = "okay";
          };
          usb2-3 {
            nvidia,function = "xusb";
            status = "okay";
          };
        };
      };
      usb3 {
        lanes {
          usb3-0 {
            nvidia,function = "xusb";
            status = "okay";
          };
          usb3-1 {
            nvidia,function = "xusb";
            status = "okay";
          };
          usb3-2 {
            nvidia,function = "xusb";
            status = "okay";
          };
          usb3-3 {
            nvidia,function = "xusb";
            status = "okay";
          };
        };
      };
    };
    ports {
      usb2-0 {
        mode = "host";
        vbus-supply = <&battery_reg>;
        status = "disabled";
      };
      usb2-1 {
        mode = "host";
        vbus-supply = <&battery_reg>;
        status = "disabled";
      };
      usb2-2 {
        mode = "host";
        vbus-supply = <&battery_reg>;
        status = "okay";
      };
      usb2-3 {
        mode = "host";
        vbus-supply = <&battery_reg>;
        status = "okay";
      };
      usb3-0 {
        nvidia,usb2-companion = <2>;
        status = "okay";
      };
      usb3-1 {
        nvidia,usb2-companion = <1>;
        status = "disabled";
      };
      usb3-2 {
        nvidia,usb2-companion = <0>;
        status = "disabled";
      };
      usb3-3 {
        nvidia,usb2-companion = <3>;
        status = "okay";
        nvidia,usb3-gen1-only = <1>;
      };
    };
  };
};

```

Thanks!

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [May 22, 2019, 3:09am UTC](https://forums.developer.nvidia.com/t/device-tree-usb-issues-documentation-incomplete/75090/2 "2019-05-22T03:09:03Z")

</div>

Some example for you from other customer who also only uses type A.  
If you use type A, there is no need to configure xudc.

```auto
xusb_padctl: xusb_padctl@3520000 {
		status = "okay";

		pads {
			usb2 {
				lanes {
					usb2-0 {
						nvidia,function = "xusb";
						status = "okay";
					};
					usb2-1 {
						nvidia,function = "xusb";
						status = "okay";
					};
					usb2-2 {
						nvidia,function = "xusb";
						status = "okay";
					};
					usb2-3 {
						nvidia,function = "xusb";
						status = "okay";
					};
				};
			};
			usb3 {
				lanes {
					usb3-0 {
						nvidia,function = "xusb";
						status = "okay";
					};
					usb3-2 {
						nvidia,function = "xusb";
						status = "okay";
					};
					usb3-3 {
						nvidia,function = "xusb";
						status = "okay";
					};
				};
			};
		};

		ports {
			usb2-0 {
				mode = "host";
				status = "okay";
			};
			usb2-1 {
				mode = "host";
				status = "okay";
			};
			usb2-2 {
				mode = "host";
				status = "okay";
			};
			usb2-3 {
				mode = "host";
				status = "okay";
			};
			usb3-0 {
				nvidia,usb2-companion = <1>;
				status = "okay";
			};
			usb3-2 {
				nvidia,usb2-companion = <0>;
				status = "okay";
			};
			usb3-3 {
				nvidia,usb2-companion = <3>;
				nvidia,usb3-gen1-only= <1>;
				status = "okay";
			};
		};
	};

	tegra_xhci: xhci@3610000 {
		phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
			<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
			<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-3}>,
			<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-2}>,
			<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-2}>,
			<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-0}>,
			<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-3}>;
		phy-names = "usb2-0", "usb2-1", "usb2-3", "usb2-2",
			"usb3-2", "usb3-0", "usb3-3";
		nvidia,xusb-padctl = <&xusb_padctl>;
		status = "okay";
	};

```

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [October 18, 2021, 6:24pm UTC](https://forums.developer.nvidia.com/t/device-tree-usb-issues-documentation-incomplete/75090/3 "2021-10-18T18:24:36Z")

</div>

Closed on October 18, 2021, 6:24pm UTC


