USB setting

Hello, the hardware circuit diagram is shown below. What files do I need to change to configure the USB? The configuration has been failing, I hope to help provide an idea, thank you!

Using TX2, r32.5.1

usb

Have you checked the adaptation guide?

In the file “tegra186-quill-p3310-1000-c03-00-base.dts”

    xhci@3530000 {
		phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
			<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
			<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-2}>,
			<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-0}>,
			<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-2}>;
		phy-names = "usb2-0", "usb2-1", "usb2-2", "usb3-0", "usb3-2";
		nvidia,boost_cpu_freq = <1200>;
	};

	xusb_padctl@3520000 {
		ports {
			usb3-0 {
				nvidia,usb2-companion = <0x1>;
				status = "okay";
			};
			usb3-2 {
				nvidia,usb2-companion = <0x2>;
				status = "okay";
			};
		};
	};

In the file “tegra186-quill-p3310-1000-a00-00-base.dts”

#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
	xudc@3550000 {
		status = "okay";
		phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>;
		phys = <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-0}>;
		phys = <&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-2}>;
		phy-names = "usb2", "usb3";
		nvidia,boost-cpu-freq = <1200>;
	};


#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
	xhci@3530000 {
		status = "okay";
		phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
			<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
			<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-2}>,
			<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-0}>,
			<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-2}>;
		phy-names = "usb2-0", "usb2-1", "usb2-2", "usb3-0", "usb3-2";
	};

	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";
					};
				};
			};
			usb3 {
				lanes {
					usb3-0 {
						nvidia,function = "xusb";
						status = "okay";
					};
					usb3-1 {
						nvidia,function = "xusb";
						status = "disabled";
					};
					usb3-2 {
						nvidia,function = "xusb";
						status = "okay";
					};
				};
			};
		};

		ports {
			usb2-0 {
				status = "okay";
				mode = "otg";
				vbus-supply = <&vdd_usb0_5v>;
				nvidia,oc-pin = <0>;
			};
			usb2-1 {
				status = "okay";
				mode = "host";
				vbus-supply = <&vdd_usb1_5v>;
				nvidia,oc-pin = <1>;
			};
			usb2-2 {
				status = "okay";
				mode = "host";
				vbus-supply = <&vdd_usb2_5v>;
			};
			usb3-0 {
				nvidia,usb2-companion = <1>;
				status = "okay";
			};
			usb3-1 {
				nvidia,usb2-companion = <1>;
				status = "disabled";
			};
			usb3-2 {
				nvidia,usb2-companion = <2>;
				status = "okay";
			};
		};
	};
};

Your device tree is not matching to your design at all…

Just some obvious error

If you usb2_D+/D- is for usb3.0 micro b, it should be otg, but why you only configure it as host?

Also, you use SS0 and SS1, but why your device tree enables SS0 and SS2??

I got the following two pieces of information from the OEM documentation, the usb-hub uses USB3.0, port0 and USB2.0, port1; the other USB uses USB3.0, port2 and USB2.0, port2


Could you directly share the schematic instead of the diagram so that we can make sure the pin you are using?

usb3.0

Hello, I have a question, in the source file, the device tree tegra186-quill-p3310-1000-c03-00-base.dts contains tegra186-quill-p3310-1000-a00-00-base.dts. But there are xhci@3530000 and xusb_padctl@3520000 nodes in both device trees. In this case, won’t it be repeated after inclusion? If I want to change it, do I need to change all the nodes in the two files to be the same?

If the “status” value in the node is omitted, does it mean: status=“disabled”

Your question is not related to usb config. I mean it is a common one on any kind of device tree.

In device tree rule, the later one will overwrite the previous one. That is why we have “soc” folder and “platform” folder and the dts from platform folder always “include” the one from soc folder.

Because “soc” are same type of SoC setting but “platform” folder may be different.

For example, both TX2-NX and TX2 use same t186 “soc”. But it goes into Lanai and Quill in “platform”. Only those changes in “Quill” will decide the finalized dtb result for your TX2 board dtb.

If the “status” value in the node is omitted, does it mean: status=“disabled”

No. If you understand above statement, you will know that it just means it will follow the previous device tree and won’t change it.

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