Xavier SOM USB fail on customer board

on my board we designed, we use usb2.0.1 and usb 2.0.2 for host and usb type A port, we change device tree. but still have problems.

the log as follow:

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.140-tegra (buildbrain@mobile-u64-1935) (gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05) ) #1 SMP PREEMPT Mon Dec 9 22:52:02 PST 2019
[    0.000000] Boot CPU: AArch64 Processor [4e0f0040]
[    0.000000] OF: fdt:memory scan node memory, reg size 48,
[    0.000000] OF: fdt: - 80000000 ,  2c000000
[    0.000000] OF: fdt: - ac200000 ,  44600000
[    0.000000] OF: fdt: - 100000000 ,  380000000
[    0.000000] earlycon: tegra_comb_uart0 at MMIO32 0x000000000c168000 (options '')
[    0.000000] bootconsole [tegra_comb_uart0] enabled
<hit enter to activate fiq debugger>
[    1.936784] tegra-slvs-ec 15ac0000.slvs-ec: probe failed: -19
[    2.046088] Reading powergate-id failed
[    2.046271] tegra-xusb 3610000.xhci: failed to get SS powergate id
[    2.329157] tegra210-axbar tegra210-axbar: Can't retrieve parent clock
[   27.780108] cgroup: cgroup2: unknown option "nsdelegate"
[   27.781648] pstore: decompression failed;returned -5
[   29.091012] random: crng init done
[   29.091110] random: 7 urandom warning(s) missed due to ratelimiting
[   29.815203] CPU4: shutdown
[   29.887472] CPU5: shutdown
[   29.948214] CPU6: shutdown
[   30.011516] CPU7: shutdown

I have changed the device tree according to the adaptation. Because there is no usb device so I remove the USB PD controler part and xudc part.

	xusb_padctl@3520000 {
		compatible = "nvidia,tegra19x-xusb-padctl";
		reg = <0x0 0x3520000 0x0 0x1000 0x0 0x3540000 0x0 0x1000>;
		reg-names = "padctl", "ao";
		interrupts = <0x0 0xa7 0x4>;
		resets = <0x5 0x72>;
		reset-names = "padctl";
		status = "okay";
		pex_dvdd-supply = <0x7e>;
		pex_hvdd-supply = <0x7f>;
		pex_pll_hvdd-supply = <0x7f>;
		vclamp_usb-supply = <0xa>;
		avdd_usb-supply = <0xe2>;
		avdd_pll_nvhs_eutmip-supply = <0x7f>;
		linux,phandle = <0xe4>;
		phandle = <0xe4>;

		pads {

			usb2 {
				clocks = <0x4 0xa5>;
				clock-names = "trk";

				lanes {

					usb2-0 {
						status = "okay";
						#phy-cells = <0x0>;
						nvidia,function = "xusb";
						linux,phandle = <0xe5>;
						phandle = <0xe5>;
					};

					usb2-1 {
						status = "okay";
						#phy-cells = <0x0>;
						nvidia,function = "xusb";
						linux,phandle = <0xe7>;
						phandle = <0xe7>;
					};

					usb2-2 {
						status = "okay";
						#phy-cells = <0x0>;
						nvidia,function = "xusb";
						linux,phandle = <0xe9>;
						phandle = <0xe9>;
					};

					usb2-3 {
						status = "disabled";
						#phy-cells = <0x0>;
						nvidia,function = "xusb";
						linux,phandle = <0xe8>;
						phandle = <0xe8>;
					};
				};
			};

			usb3 {

				lanes {

					usb3-0 {
						status = "okay";
						#phy-cells = <0x0>;
						nvidia,function = "xusb";
						linux,phandle = <0xea>;
						phandle = <0xea>;
					};

					usb3-1 {
						status = "disabled";
						#phy-cells = <0x0>;
					};

					usb3-2 {
						status = "disabled";
						#phy-cells = <0x0>;
						nvidia,function = "xusb";
						linux,phandle = <0xe6>;
						phandle = <0xe6>;
					};

					usb3-3 {
						status = "disabled";
						#phy-cells = <0x0>;
						nvidia,function = "xusb";
						linux,phandle = <0xeb>;
						phandle = <0xeb>;
					};
				};
			};
		};

		ports {

			usb2-0 {
				status = "okay";
				vbus-supply = <0x1c>;
				mode = "otg";
			};

			usb2-1 {
				status = "okay";
				vbus-supply = <0x1c>;
				mode = "host";
			};

			usb2-2 {
				status = "okay";
				vbus-supply = <0x1c>;
				mode = "host";
			};

			usb2-3 {
				status = "disabled";
				vbus-supply = <0xe3>;
				mode = "host";
			};

			usb3-0 {
				status = "okay";
				nvidia,usb2-companion = <0x1>;
			};

			usb3-1 {
				status = "disabled";
			};

			usb3-2 {
				status = "disabled";
				nvidia,usb2-companion = <0x0>;
			};

			usb3-3 {
				status = "disabled";
				nvidia,usb2-companion = <0x3>;
				nvidia,usb3-gen1-only = <0x1>;
			};
		};

		prod-settings {
			#prod-cells = <0x4>;

			prod_c_bias {
				prod = <0x0 0x284 0x38 0x38>;
			};

			prod {
				prod = <0x0 0x24 0xfff 0x0>;
			};
		};
	};

	usb_cd {
		compatible = "nvidia,tegra194-usb-cd";
		nvidia,xusb-padctl = <0xe4>;
		phys = <0xe5>;
		phy-names = "otg-phy";
		status = "okay";
		linux,phandle = <0x1d1>;
		phandle = <0x1d1>;
	};


	xhci@3610000 {
		compatible = "nvidia,tegra194-xhci";
		reg = <0x0 0x3610000 0x0 0x40000 0x0 0x3600000 0x0 0x10000>;
		interrupts = <0x0 0xa3 0x4 0x0 0xa4 0x4 0x0 0xa7 0x4>;
		interrupt-parent = <0x39>;
		clocks = <0x4 0x10a 0x4 0x10b 0x4 0x10c 0x4 0x10d 0x4 0x10e 0x4 0x10f 0x4 0x110 0x4 0x111 0x4 0x113 0x4 0x115 0x4 0x67 0x4 0xe 0x4 0x64>;
		clock-names = "xusb_hs_src", "xusb_host", "xusb_core_superspeed_clk", "xusb_falcon_src", "xusb_falcon_host_clk", "xusb_falcon_superspeed_clk", "xusb_fs_src", "xusb_fs_host_clk", "xusb_ss_src", "xusb_ss", "pll_u_480m", "clk_m", "pll_e";
		nvidia,xusb-padctl = <0xe4>;
		iommus = <0x2 0x1b>;
		dma-coherent;
		status = "okay";
		extcon-cables = <0x81 0x1>;
		extcon-cable-names = "id";
		#extcon-cells = <0x1>;
		phys = <0xe5 0xe7 0xe9 0xea>;
		phy-names = "usb2-0", "usb2-1", "usb2-2", "usb3-0";
		linux,phandle = <0x1d3>;
		phandle = <0x1d3>;
	};

I plug the usb mouse into the usb type A port, the led on mouse don’t flash. and no any information in kernel. no any information when use the command “lsusb”.

we use the usb port as follow: they are all host.
@kayccc @linuxdev


Hi,
This is not right, it configures USB2-0 is an OTG port.

			usb2-0 {
				status = "okay";
				vbus-supply = <0x1c>;
				mode = "otg";
			};

This configures USB2-1 and USB3-0 to be a USB3 type-A port.

			usb2-1 {
				status = "okay";
				vbus-supply = <0x1c>;
				mode = "host";
			};
			usb3-0 {
				status = "okay";
				nvidia,usb2-companion = <0x1>;
			};

vbus-supply also looks not right. Both the OTG port and USB3 type-A port are configured to the same 0x1c