TX1 lane config #2 with L4T 28.2

Hi,

I have a problem with lane configuration in L4T R28.2. We have a custom carrier board with second USB port connected to SATA pins, so it’s lane mapping config 2 from Jetson TX1 OEM Product Design Guide. With L4T R24.2.3 the following device-tree settings worked:

nvidia,ss_portmap = <0x3721>;
nvidia,lane_owner = <0x8f56>;
nvidia,portmap = <0xe0b>;

Now I’m trying to upgrade to L4T R28.2 with the following patch applied to device-tree (HDMI is disabled to get rid of I2C errors, since there’s no HDMI port on this board):

--- hardware/nvidia/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts.orig     2018-03-02 05:37:27.000000000 +0100
+++ hardware/nvidia/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts  2018-08-28 16:22:00.951848802 +0200
@@ -176,7 +176,7 @@
 
        sata@70020000 {
                compatible = "nvidia,tegra210-ahci-sata";
-               status = "okay";
+               status = "disabled";
        };
 
        backlight {
@@ -601,6 +601,19 @@
                        sata {
                                 nvidia,lanes = "uphy-lane-7";
                                 nvidia,function = "sata";
+                               status = "disabled";
+                       };
+                       usb2-ffc {
+                               nvidia,lanes = "otg-3";
+                               nvidia,function = "xusb";
+                               nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
+                       };
+                       usb3-ffc {
+                               nvidia,lanes = "uphy-lane-7";
+                               nvidia,function = "usb3";
+                               nvidia,usb3-port = <3>;
+                               nvidia,usb2-map = <3>;
+                               nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
                        };
                };
        };
@@ -614,8 +627,10 @@
                        <&tegra_padctl_uphy TEGRA_PADCTL_UPHY_USB3_P(1)>,
                        <&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(1)>,
                        <&tegra_padctl_uphy TEGRA_PADCTL_UPHY_USB3_P(0)>,
-                       <&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(0)>;
-               phy-names = "utmi-2", "usb3-1", "utmi-1", "usb3-0", "utmi-0";
+                       <&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(0)>,
+                       <&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(3)>,
+                       <&tegra_padctl_uphy TEGRA_PADCTL_UPHY_USB3_P(3)>;
+               phy-names = "utmi-2", "usb3-1", "utmi-1", "usb3-0", "utmi-0", "utmi-3", "usb3-3";
                nvidia,pmc-wakeup =
                        <&tegra_pmc
                                PMC_WAKE_TYPE_EVENT 39 PMC_TRIGGER_TYPE_HIGH>,
--- hardware/nvidia/platform/t210/common/kernel-dts/t210-common-platforms/tegra210-ers-hdmi-e2190-1100-a00.dtsi.orig    2018-03-02 05:37:27.000000000 +0100
+++ hardware/nvidia/platform/t210/common/kernel-dts/t210-common-platforms/tegra210-ers-hdmi-e2190-1100-a00.dtsi 2018-08-28 16:22:00.951848802 +0200
@@ -24,11 +24,11 @@
 / {
        host1x {
                sor1 {
-                       status = "okay";
+                       status = "disabled";
                        nvidia,ddc-i2c-bus = <&hdmi_ddc>;
                        nvidia,hpd-gpio = <&gpio TEGRA_GPIO(CC, 1) 1>; /* PN7 */
                        hdmi-display {
-                               status = "okay";
+                               status = "disabled";
                                compatible = "hdmi,display";
                                generic-infoframe-type = <HDMI_INFOFRAME_TYPE_HDR>;
                                disp-default-out {

But so far this second port works only with USB2 speed. Here’s an excerpt from dmesg (with USB3->SATA adapter attached to that port):

[    0.476077] tegra21x-padctl-uphy 7009f000.pinctrl: padctl mmio start 0x000000007009f000 end 0x000000007009ffff
[    0.476127] tegra21x-padctl-uphy 7009f000.pinctrl: TEGRA_FUSE_SKU_CALIB_0 0x71a9c0e
[    0.476164] tegra21x-padctl-uphy 7009f000.pinctrl: TEGRA_FUSE_USB_CALIB_EXT_0 0x4
[    0.477577] tegra21x-padctl-uphy 7009f000.pinctrl: UTMI-0 is used by XUSB
[    0.477615] tegra21x-padctl-uphy 7009f000.pinctrl: using UTMI port 0 for otg
[    0.477646] tegra21x-padctl-uphy 7009f000.pinctrl: UTMI-2 is used by XUSB
[    0.477684] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 5, set usb3_lanes = 0x20
[    0.477730] tegra21x-padctl-uphy 7009f000.pinctrl: USB3 port 1 maps to USB2 port 2
[    0.477765] tegra21x-padctl-uphy 7009f000.pinctrl: UTMI-1 is used by XUSB
[    0.477801] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 6, set usb3_lanes = 0x60
[    0.477845] tegra21x-padctl-uphy 7009f000.pinctrl: USB3 port 0 maps to USB2 port 1
[    0.477892] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 1, set pcie_lanes = 0x2
[    0.477942] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 2, set pcie_lanes = 0x6
[    0.477991] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 3, set pcie_lanes = 0xe
[    0.478039] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 4, set pcie_lanes = 0x1e
[    0.478086] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 0, set pcie_lanes = 0x1f
[    0.478127] tegra21x-padctl-uphy 7009f000.pinctrl: UTMI-3 is used by XUSB
[    0.478161] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 7, set usb3_lanes = 0xe0
[    0.478203] tegra21x-padctl-uphy 7009f000.pinctrl: USB3 port 3 maps to USB2 port 3
[    0.478588] tegra21x-padctl-uphy 7009f000.pinctrl: mailbox is not ready yet
<.......>
[    2.855167] tegra-xudc-new 700d0000.xudc: usb2 phy is not available yet
<.......>
[    4.033402] xhci-tegra 70090000.xusb: can't get usb3-0 phy (-517)
[    4.034031] tegra21x-padctl-uphy 7009f000.pinctrl: padctl mmio start 0x000000007009f000 end 0x000000007009ffff
[    4.034042] tegra21x-padctl-uphy 7009f000.pinctrl: TEGRA_FUSE_SKU_CALIB_0 0x71a9c0e
[    4.034050] tegra21x-padctl-uphy 7009f000.pinctrl: TEGRA_FUSE_USB_CALIB_EXT_0 0x4
[    4.035394] tegra21x-padctl-uphy 7009f000.pinctrl: UTMI-0 is used by XUSB
[    4.035405] tegra21x-padctl-uphy 7009f000.pinctrl: using UTMI port 0 for otg
[    4.035413] tegra21x-padctl-uphy 7009f000.pinctrl: UTMI-2 is used by XUSB
[    4.035428] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 5, set usb3_lanes = 0x20
[    4.035443] tegra21x-padctl-uphy 7009f000.pinctrl: USB3 port 1 maps to USB2 port 2
[    4.035449] tegra21x-padctl-uphy 7009f000.pinctrl: UTMI-1 is used by XUSB
[    4.035463] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 6, set usb3_lanes = 0x60
[    4.035477] tegra21x-padctl-uphy 7009f000.pinctrl: USB3 port 0 maps to USB2 port 1
[    4.035494] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 1, set pcie_lanes = 0x2
[    4.035513] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 2, set pcie_lanes = 0x6
[    4.035531] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 3, set pcie_lanes = 0xe
[    4.035549] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 4, set pcie_lanes = 0x1e
[    4.035566] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 0, set pcie_lanes = 0x1f
[    4.035577] tegra21x-padctl-uphy 7009f000.pinctrl: UTMI-3 is used by XUSB
[    4.035589] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 7, set usb3_lanes = 0xe0
[    4.035602] tegra21x-padctl-uphy 7009f000.pinctrl: USB3 port 3 maps to USB2 port 3
[    4.036276] usb-vbus1: supplied by vdd-3v3
[    4.038573] tegra21x-padctl-uphy 7009f000.pinctrl: Done tegra21x_padctl_uphy_probe
<.......>
[    4.049301] tegra-xudc-new 700d0000.xudc: USB charger detection disabled
[    4.049796] tegra-xudc-new 700d0000.xudc: entering ELPG
[    4.050630] tegra_core_action core_dvfs_cdev_floor: Tegra CORE DVFS 'floor cooling device' registered
[    4.050985] tegra21x-padctl-uphy 7009f000.pinctrl: trying to assert IDDQ while XUSB partitions are on
[    4.051372] tegra-xudc-new 700d0000.xudc: entering ELPG done
<.......>
[    4.058970] xhci-tegra 70090000.xusb: UTMI port 0 has OTG_CAP
[    4.058973] xhci-tegra 70090000.xusb: No USB3 port has OTG_CAP
[    4.062675] xhci-tegra 70090000.xusb: Direct firmware load for tegra21x_xusb_firmware failed with error -2
[    4.062677] xhci-tegra 70090000.xusb: Falling back to user helper
<.......>
[    5.455687] xhci-tegra 70090000.xusb: cannot find firmware....retry after 1 second
<.......>
[    6.455863] xhci-tegra 70090000.xusb: Firmware timestamp: 2017-10-20 11:40:00 UTC, Version: 50.19 release
[    6.457901] xhci-tegra 70090000.xusb: xHCI Host Controller
[    6.457920] xhci-tegra 70090000.xusb: new USB bus registered, assigned bus number 1
[    6.458750] xhci-tegra 70090000.xusb: hcc params 0x0184f525 hci version 0x100 quirks 0x00010810
[    6.458777] xhci-tegra 70090000.xusb: irq 319, io mem 0x70090000
[    6.458922] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    6.458926] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    6.458928] usb usb1: Product: xHCI Host Controller
[    6.458930] usb usb1: Manufacturer: Linux 4.4.38-tegra xhci-hcd
[    6.458932] usb usb1: SerialNumber: 70090000.xusb
[    6.459885] hub 1-0:1.0: USB hub found
[    6.460186] hub 1-0:1.0: 5 ports detected
[    6.474391] xhci-tegra 70090000.xusb: xHCI Host Controller
[    6.474399] xhci-tegra 70090000.xusb: new USB bus registered, assigned bus number 2
[    6.474544] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    6.474547] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    6.474549] usb usb2: Product: xHCI Host Controller
[    6.474551] usb usb2: Manufacturer: Linux 4.4.38-tegra xhci-hcd
[    6.474553] usb usb2: SerialNumber: 70090000.xusb
[    6.475148] hub 2-0:1.0: USB hub found
[    6.475332] hub 2-0:1.0: 4 ports detected
[    6.583489] tegra-xudc-new 700d0000.xudc: exiting ELPG
[    6.584050] tegra-xudc-new 700d0000.xudc: exiting ELPG done
[    6.584066] tegra-xudc-new 700d0000.xudc: ep 0 (type: 0, dir: out) enabled
[    6.584128] tegra-xudc-new 700d0000.xudc: entering ELPG
[    6.584327] tegra-xudc-new 700d0000.xudc: entering ELPG done
[    6.584338] tegra-xudc-new 700d0000.xudc: exiting ELPG
[    6.585202] tegra-xudc-new 700d0000.xudc: exiting ELPG done
[    6.585224] tegra-xudc-new 700d0000.xudc: entering ELPG
[    6.585428] tegra-xudc-new 700d0000.xudc: entering ELPG done
<.......>
[    6.774260] usb 1-4: new high-speed USB device number 2 using xhci-tegra
<.......>
[    7.164547] usb 2-1: new SuperSpeed USB device number 2 using xhci-tegra
[    7.181231] usb 1-4: feature bit otg_vbus_off set
[    7.185972] usb 1-4: New USB device found, idVendor=174c, idProduct=5136
[    7.192814] usb 1-4: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[    7.200041] usb 1-4: Product: AS2105
[    7.203721] usb 1-4: Manufacturer: ASMedia
[    7.207871] usb 1-4: SerialNumber: 00000000000000000000
[    7.214087] xhci-tegra 70090000.xusb: tegra_xhci_mbox_work mailbox command 6
[    7.221271] usb 2-1: New USB device found, idVendor=0955, idProduct=09ff
[    7.228116] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6
<.......>
[    7.240958] usb-storage 1-4:1.0: USB Mass Storage device detected
[    7.247125] usb 2-1: Product: USB 10/100/1000 LAN
[    7.251889] usb 2-1: Manufacturer: Nvidia
[    7.255952] usb 2-1: SerialNumber: 000001000000
[    7.260660] scsi host0: usb-storage 1-4:1.0
[    7.267563] xhci-tegra 70090000.xusb: tegra_xhci_mbox_work mailbox command 6
<.......>
[    7.391205] usb 2-1: reset SuperSpeed USB device number 2 using xhci-tegra
<.......>
[    8.283283] sd 0:0:0:0: [sda] Attached SCSI removable disk

Note that I had to use 8 as lane number for this USB3 port in nvidia,lane_owner for L4T 24.2.3, not 7 as one might expect. With 7 port works only in USB2 mode (so behaves the same as with R28.2). Might that be related? If not, what have I missed?

Hi parafin,

[    4.033402] xhci-tegra 70090000.xusb: can't get usb3-0 phy (-517)

Above error halts USB3 initialization. You need to check vbus in device tree.

For TX2, most custom board does not have gpio expander and has to apply below patch:
https://elinux.org/Jetson/TX2_USB#Patching_the_DTS
https://devtalk.nvidia.com/default/topic/1027955/jetson-tx2/i-o-expander-tca9539-configuring-with-device-tree/post/5230731/#5230731

Hi DaneLLL,

thanx, I will check vbus. But this message is about usb3-0 (to which Ethernet controller is connected internally), which works, as also does usb3-1. Only usb3-3 doesn’t work.

Hi parafin,
Please try not to apply below:

sata@70020000 {
                compatible = "nvidia,tegra210-ahci-sata";
-               status = "okay";
+               status = "disabled";
        };

Seems not required because adaptation guide does not mention it.

Hi DaneLLL,

I’ve checked dmesg from ordinary Jetson DevKit installation with no patches: “can’t get usb3-0 phy” is present there too, so it’s just some init sequence artifact. Nonetheless I’ve tried adding the following change:

--- hardware/nvidia/platform/t210/jetson/kernel-dts/jetson-platforms/tegra210-jetson-cv-power-tree-p2597-2180-a00.dtsi.orig     2018-08-29 10:11:26.751078477 +0200
+++ hardware/nvidia/platform/t210/jetson/kernel-dts/jetson-platforms/tegra210-jetson-cv-power-tree-p2597-2180-a00.dtsi  2018-08-29 10:11:45.610936521 +0200
@@ -269,7 +269,7 @@
        pinctrl@7009f000 {
                vbus-0-supply = <&usb_vbus1>;
                vbus-2-supply = <&en_usb_vbus2>;
-               vbus-3-supply = <&vdd_3v3>;
+               vbus-3-supply = <&battery_reg>;
                vddio-hsic-supply = <&max77620_ldo0>;
                avdd_pll_uerefe-supply = <&max77620_ldo7>;
                hvdd_pex_pll_e-supply = <&max77620_sd3>;

It didn’t make a difference. I’ve also tried re-enabling sata like you suggested - both with vbus-3-supply patch and without it: still no changes.

Hi parafin,
Please check if it about gpio voltage:
https://devtalk.nvidia.com/default/topic/1037872/jetson-tx1/patch-for-enabling-usb3-on-m2-slot-using-latest-jetpack-3-2-1/post/5275725/#5275725

Hi DaneLLL,

I’m not sure how GPIO comes into play here (it’s not an M.2 slot with multiple interfaces, just plain USB port), but I tried copying device-tree changes from the linked topic anyway. Still no luck. Here’s current version of changes:

--- hardware/nvidia/platform/t210/common/kernel-dts/t210-common-platforms/tegra210-ers-hdmi-e2190-1100-a00.dtsi.orig	2018-03-02 05:37:27.000000000 +0100
+++ hardware/nvidia/platform/t210/common/kernel-dts/t210-common-platforms/tegra210-ers-hdmi-e2190-1100-a00.dtsi	2018-08-29 10:34:05.000811452 +0200
@@ -28,7 +28,7 @@
 			nvidia,ddc-i2c-bus = <&hdmi_ddc>;
 			nvidia,hpd-gpio = <&gpio TEGRA_GPIO(CC, 1) 1>; /* PN7 */
 			hdmi-display {
-				status = "okay";
+				status = "disabled";
 				compatible = "hdmi,display";
 				generic-infoframe-type = <HDMI_INFOFRAME_TYPE_HDR>;
 				disp-default-out {
--- hardware/nvidia/platform/t210/jetson/kernel-dts/jetson-platforms/tegra210-comms-p2530-0930.dtsi.orig	2018-08-30 10:15:14.246829396 +0200
+++ hardware/nvidia/platform/t210/jetson/kernel-dts/jetson-platforms/tegra210-comms-p2530-0930.dtsi	2018-08-30 10:16:50.806175599 +0200
@@ -20,11 +20,18 @@
 			gpios = <
 				TEGRA_GPIO(H, 0) 0
 				TEGRA_GPIO(I, 0) 0
-				TEGRA_GPIO(I, 2) 0
 				>;
 			label = "wlan-default-output-high-h0",
 				"wlan-default-output-high-i0";
 		};
+
+		wlan-default-output-low {
+			gpio-hog;
+			output-low;
+			gpios = <
+				TEGRA_GPIO(I, 2) 0
+				>;
+		};
 	};
 
 	bluedroid_pm { /* BT BCM43340 in P2530 Compute Module */
--- hardware/nvidia/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts.orig	2018-03-02 05:37:27.000000000 +0100
+++ hardware/nvidia/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts	2018-08-30 10:07:51.809953645 +0200
@@ -549,7 +549,7 @@
 				nvidia,function = "xusb";
 				nvidia,port-cap =
 					<TEGRA_PADCTL_PORT_OTG_CAP>;
-				nvidia,usb3-port-fake = <3>;
+				nvidia,usb3-port-fake = <2>;
 			};
 			usb2-std-A-port0 {
 				 nvidia,lanes = "otg-2";
@@ -601,6 +601,19 @@
 			sata {
 				 nvidia,lanes = "uphy-lane-7";
 				 nvidia,function = "sata";
+				status = "disabled";
+			};
+			usb2-ffc {
+				nvidia,lanes = "otg-3";
+				nvidia,function = "xusb";
+				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
+			};
+			usb3-ffc {
+				nvidia,lanes = "uphy-lane-7";
+				nvidia,function = "usb3";
+				nvidia,usb3-port = <3>;
+				nvidia,usb2-map = <3>;
+				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
 			};
 		};
 	};
@@ -614,8 +627,10 @@
 			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_USB3_P(1)>,
 			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(1)>,
 			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_USB3_P(0)>,
-			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(0)>;
-		phy-names = "utmi-2", "usb3-1", "utmi-1", "usb3-0", "utmi-0";
+			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(0)>,
+			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(3)>,
+			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_USB3_P(3)>;
+		phy-names = "utmi-2", "usb3-1", "utmi-1", "usb3-0", "utmi-0", "utmi-3", "usb3-3";
 		nvidia,pmc-wakeup =
 			<&tegra_pmc
 				PMC_WAKE_TYPE_EVENT 39 PMC_TRIGGER_TYPE_HIGH>,

I also noticed nvidia,usb3-port-fake was set to 3 in usb2-micro-AB-xusb section, so I changed it to 2, but it didn’t help.

Hi parafin,
Can you check the voltage of VBUS? To see if it is as expected.

We have seen issues with VBUS being turned on too early. If you turn on VBUS before booting to kernel, please also try ot trun it on after kernel is booted.
https://devtalk.nvidia.com/default/topic/1036547/jetson-tx1/usb2-b43-b42-not-working-on-tx1-with-r28-2/post/5265708/#5265708

Hi DaneLLL,

VBUS on this port is always on (or more precisely it’s controlled by CARRIER_PWR_ON) and isn’t explicitly managed by Tegra, so the voltage is OK. Just a note - I’ve tried both connecting a USB3 device before powering up the TX1 and after it boots, with same result - it enumerates with USB2 speed.

Hi DaneLLL,

do you have any other suggestions? It looks more and more like a bug in 4.4 kernel and not device-tree misconfiguration. Maybe we can check values of some registers used for pinctrl and usb controller configuration and compare between working and non-working releases of L4T? But I would need some pointers on which ones exactly to look at.

Hi parafin,
Please try below patch

@@ -549,7 +549,7 @@
                                nvidia,function = "xusb";
                                nvidia,port-cap =
                                        <TEGRA_PADCTL_PORT_OTG_CAP>;
-                               nvidia,usb3-port-fake = <3>;
+                               nvidia,usb3-port-fake = <2>;
                        };
                        usb2-std-A-port0 {
                                 nvidia,lanes = "otg-2";
@@ -579,6 +579,20 @@
                                 nvidia,port-cap =
                                        <TEGRA_PADCTL_PORT_HOST_ONLY>;
                        };
+                       usb2-std-A-port1 {
+                                nvidia,lanes = "otg-3";
+                                nvidia,function = "xusb";
+                                nvidia,port-cap =
+                                       <TEGRA_PADCTL_PORT_HOST_ONLY>;
+                       };
+                       usb3-std-A-port1 {
+                                nvidia,lanes = "uphy-lane-8";
+                                nvidia,function = "usb3";
+                                nvidia,usb3-port = <3>;
+                                nvidia,usb2-map = <3>;
+                                nvidia,port-cap =
+                                       <TEGRA_PADCTL_PORT_HOST_ONLY>;
+                       };
                        hsic {
                                 nvidia,lanes = "hsic-0";
                                 nvidia,function = "hsic";
@@ -614,8 +628,10 @@
                        <&tegra_padctl_uphy TEGRA_PADCTL_UPHY_USB3_P(1)>,
                        <&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(1)>,
                        <&tegra_padctl_uphy TEGRA_PADCTL_UPHY_USB3_P(0)>,
-                       <&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(0)>;
-               phy-names = "utmi-2", "usb3-1", "utmi-1", "usb3-0", "utmi-0";
+                       <&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(0)>,
+                       <&tegra_padctl_uphy TEGRA_PADCTL_UPHY_USB3_P(3)>,
+                       <&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(3)>;
+               phy-names = "utmi-2", "usb3-1", "utmi-1", "usb3-0", "utmi-0", "usb3-3", "utmi-3";
                nvidia,pmc-wakeup =
                        <&tegra_pmc
                                PMC_WAKE_TYPE_EVENT 39 PMC_TRIGGER_TYPE_HIGH>,
@@ -626,7 +642,7 @@
        };

         xudc@700d0000 {
-               nvidia,portmap = <0x0108>;
+               nvidia,portmap = <0x0104>;
                #extcon-cells = <1>;
                status = "okay";
                phys =  <&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(0)>;

If the issue is still present please enable debug prints in pinctrl-tegra21x-padctl-uphy.c and share the log.

Hi DaneLLL,

there’s no uphy-lane-8 so with your patch Linux doesn’t boot at all. Changing just nvidia,portmap in xudc section has no effect on the issue. Full dmesg output with debugging in pinctrl-tegra21x-padctl-uphy.c enabled is attached. Current patch that was applied to devicetree is as follows:

--- hardware/nvidia/platform/t210/common/kernel-dts/t210-common-platforms/tegra210-ers-hdmi-e2190-1100-a00.dtsi.orig	2018-03-02 05:37:27.000000000 +0100
+++ hardware/nvidia/platform/t210/common/kernel-dts/t210-common-platforms/tegra210-ers-hdmi-e2190-1100-a00.dtsi	2018-08-29 10:34:05.000811452 +0200
@@ -28,7 +28,7 @@
 			nvidia,ddc-i2c-bus = <&hdmi_ddc>;
 			nvidia,hpd-gpio = <&gpio TEGRA_GPIO(CC, 1) 1>; /* PN7 */
 			hdmi-display {
-				status = "okay";
+				status = "disabled";
 				compatible = "hdmi,display";
 				generic-infoframe-type = <HDMI_INFOFRAME_TYPE_HDR>;
 				disp-default-out {
--- hardware/nvidia/platform/t210/jetson/kernel-dts/jetson-platforms/tegra210-comms-p2530-0930.dtsi.orig	2018-08-30 10:15:14.246829396 +0200
+++ hardware/nvidia/platform/t210/jetson/kernel-dts/jetson-platforms/tegra210-comms-p2530-0930.dtsi	2018-08-30 10:16:50.806175599 +0200
@@ -20,11 +20,18 @@
 			gpios = <
 				TEGRA_GPIO(H, 0) 0
 				TEGRA_GPIO(I, 0) 0
-				TEGRA_GPIO(I, 2) 0
 				>;
 			label = "wlan-default-output-high-h0",
 				"wlan-default-output-high-i0";
 		};
+
+		wlan-default-output-low {
+			gpio-hog;
+			output-low;
+			gpios = <
+				TEGRA_GPIO(I, 2) 0
+				>;
+		};
 	};
 
 	bluedroid_pm { /* BT BCM43340 in P2530 Compute Module */
--- hardware/nvidia/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts.orig	2018-03-02 05:37:27.000000000 +0100
+++ hardware/nvidia/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts	2018-09-04 11:24:01.790748163 +0200
@@ -549,7 +549,7 @@
 				nvidia,function = "xusb";
 				nvidia,port-cap =
 					<TEGRA_PADCTL_PORT_OTG_CAP>;
-				nvidia,usb3-port-fake = <3>;
+				nvidia,usb3-port-fake = <2>;
 			};
 			usb2-std-A-port0 {
 				 nvidia,lanes = "otg-2";
@@ -601,6 +601,19 @@
 			sata {
 				 nvidia,lanes = "uphy-lane-7";
 				 nvidia,function = "sata";
+				status = "disabled";
+			};
+			usb2-std-A-port1 {
+				nvidia,lanes = "otg-3";
+				nvidia,function = "xusb";
+				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
+			};
+			usb3-std-A-port1 {
+				nvidia,lanes = "uphy-lane-7";
+				nvidia,function = "usb3";
+				nvidia,usb3-port = <3>;
+				nvidia,usb2-map = <3>;
+				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
 			};
 		};
 	};
@@ -614,8 +627,10 @@
 			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_USB3_P(1)>,
 			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(1)>,
 			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_USB3_P(0)>,
-			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(0)>;
-		phy-names = "utmi-2", "usb3-1", "utmi-1", "usb3-0", "utmi-0";
+			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(0)>,
+			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_USB3_P(3)>,
+			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(3)>;
+		phy-names = "utmi-2", "usb3-1", "utmi-1", "usb3-0", "utmi-0", "usb3-3", "utmi-3";
 		nvidia,pmc-wakeup =
 			<&tegra_pmc
 				PMC_WAKE_TYPE_EVENT 39 PMC_TRIGGER_TYPE_HIGH>,
@@ -626,7 +641,7 @@
 	};
 
 	xudc@700d0000 {
-		nvidia,portmap = <0x0108>;
+		nvidia,portmap = <0x0104>;
 		#extcon-cells = <1>;
 		status = "okay";
 		phys =  <&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(0)>;

dmesg.txt (186 KB)

Hi DaneLLL,

did debug log help to find the problem?

Hi parafin, we are still checking.

Hi DaneLLL,

any progress? I’m willing to test kernel patches or whatever you require.

Hi parafin,
Please contact NVIDIA salesperson to prioritize the issue.

Hi parafin,
Please apply below patch and try again.

diff --git a/drivers/pinctrl/pinctrl-tegra21x-padctl-uphy.c b/drivers/pinctrl/pinctrl-tegra21x-padctl-uphy.c
index 7e1ce80..db1eebe 100644
--- a/drivers/pinctrl/pinctrl-tegra21x-padctl-uphy.c
+++ b/drivers/pinctrl/pinctrl-tegra21x-padctl-uphy.c
@@ -82,7 +82,7 @@
 
 #define XUSB_PADCTL_USB3_PAD_MUX_0             (0x28)
 #define   SEL(_lane, _val)                     (((_val) & 0x3)         \
-                                               << (((_lane) * 2) + 12))
+                                               << (((_lane) * 2) + 12 + ((_lane == 7) ? 4 : 0)))
 #define   SEL_PCIE_X1(_lane)                   SEL(_lane, 0)
 #define   SEL_USB3(_lane)                      SEL(_lane, 1)
 #define   SEL_SATA(_lane)                      SEL(_lane, 2)

Hi parafin, please update the result with the patch applied. Thanks.

Hi DaneLLL,

yes, this patch fixed the issue, thank you!

I will do more tests to figure out the exact minimal necessary changes to devicetree and report back here for completeness sake.

OK, so here’s a working patch (for kernel and device-tree together) for TX1 lane config #2 on L4T 28.2:

--- kernel/kernel-4.4/drivers/pinctrl/pinctrl-tegra21x-padctl-uphy.c.orig	2018-10-02 12:59:16.454953451 +0200
+++ kernel/kernel-4.4/drivers/pinctrl/pinctrl-tegra21x-padctl-uphy.c	2018-10-02 12:59:43.014757589 +0200
@@ -82,7 +82,7 @@
 
 #define XUSB_PADCTL_USB3_PAD_MUX_0		(0x28)
 #define   SEL(_lane, _val)			(((_val) & 0x3)		\
-						<< (((_lane) * 2) + 12))
+						<< (((_lane) * 2) + 12 + ((_lane == 7) ? 4 : 0)))
 #define   SEL_PCIE_X1(_lane)			SEL(_lane, 0)
 #define   SEL_USB3(_lane)			SEL(_lane, 1)
 #define   SEL_SATA(_lane)			SEL(_lane, 2)
--- hardware/nvidia/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts.orig	2018-03-02 05:37:27.000000000 +0100
+++ hardware/nvidia/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts	2018-09-04 11:24:01.790748163 +0200
@@ -549,7 +549,7 @@
 				nvidia,function = "xusb";
 				nvidia,port-cap =
 					<TEGRA_PADCTL_PORT_OTG_CAP>;
-				nvidia,usb3-port-fake = <3>;
+				nvidia,usb3-port-fake = <2>;
 			};
 			usb2-std-A-port0 {
 				 nvidia,lanes = "otg-2";
@@ -601,6 +601,19 @@
 			sata {
 				 nvidia,lanes = "uphy-lane-7";
 				 nvidia,function = "sata";
+				status = "disabled";
+			};
+			usb2-ffc {
+				nvidia,lanes = "otg-3";
+				nvidia,function = "xusb";
+				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
+			};
+			usb3-ffc {
+				nvidia,lanes = "uphy-lane-7";
+				nvidia,function = "usb3";
+				nvidia,usb3-port = <3>;
+				nvidia,usb2-map = <3>;
+				nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
 			};
 		};
 	};
@@ -614,8 +627,10 @@
 			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_USB3_P(1)>,
 			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(1)>,
 			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_USB3_P(0)>,
-			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(0)>;
-		phy-names = "utmi-2", "usb3-1", "utmi-1", "usb3-0", "utmi-0";
+			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(0)>,
+			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_USB3_P(3)>,
+			<&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(3)>;
+		phy-names = "utmi-2", "usb3-1", "utmi-1", "usb3-0", "utmi-0", "usb3-3", "utmi-3";
 		nvidia,pmc-wakeup =
 			<&tegra_pmc
 				PMC_WAKE_TYPE_EVENT 39 PMC_TRIGGER_TYPE_HIGH>,
@@ -626,7 +641,7 @@
 	};
 
 	xudc@700d0000 {
-		nvidia,portmap = <0x0108>;
+		nvidia,portmap = <0x0104>;
 		#extcon-cells = <1>;
 		status = "okay";
 		phys =  <&tegra_padctl_uphy TEGRA_PADCTL_UPHY_UTMI_P(0)>;

Thank you again, DaneLLL, for resolving this issue.