Unable to configure custom TX2 carrier board for lane mapping configuration #6

To the moderator,

We have developed a custom TX2 carrier board that is designed to utilize SATA/PCIe/USB lane mapping Configuration #6. Working from the general info I found in this thread:

I followed the instructions similar to what is documented therein, especially wrt. modifying ODMDATA=0x3090000 in p2771-0000.conf.common file + then reflash’ed my new carrier board so to attempt to boot for Configuration #6 lane mapping as documented in:

JetsonTX2_TX2i_OEM_Product_Design_Guide_20180618.pdf

In addition, I have also mod’ed tegra186-quill-p3310-1000-a00-00-base.dts to config xusb_padctl@3520000/ports/usb2-0 port for host mode (instead of otg) as follows:

usb2-0 {
				status = "okay";
				mode = "host";
				vbus-supply = <&vdd_usb0_5v>;
				nvidia,oc-pin = <1>;
			};

And mod’ed pcie-controller@10003000 lane mapping as follows:

pcie-controller@10003000 {
		status = "okay";
		pci@1,0 {
			nvidia,num-lanes = <2>;
			status = "okay";
		};
		pci@2,0 {
			nvidia,num-lanes = <1>;
			status = "okay";
		};
		pci@3,0 {
			nvidia,num-lanes = <1>;
			status = "disabled";
		};
	};

I also tried duplicating the Jetson TX2 EVM carrier board EEPROM (I2C bus 7 @ addr 0x57) onto my new carrier board to see if that helps - instead of just an empty carrier board EEPROM. Best I can tell, this does not appear to make a difference in resolving the lane mapping.

I am flashing onto my new carrier board the standard Ubuntu 18.04 distro + dtb’s out of the box from Nvidia based on JetPack 4.2.1, fyi - with the only real change being the ODMDATA mod. I’ve made no changes to u-boot, etc.

All that said, I am unable to realize configuration #6 lane mapping upon flash-boot after modifying ODMDATA=0x3090000. I assume I am missing a step, but I don’t know where to look. One question I have is… what all content for the TX2 target need to be rebuilt on the host, and what partitions need to be reflashed when there is just a change to ODMDATA?

Finally, here are some dmesg content that show the problem around unable to obtain desired lane mapping configuration:

[    0.947113] tegra-pcie 10003000.pcie-controller: 4x1, 1x1 configuration
[    0.948218] tegra-pcie 10003000.pcie-controller: PCIE: Enable power rails
[    0.948652] tegra-pcie 10003000.pcie-controller: probing port 0, using 4 lanes
[    0.952303] tegra-pcie 10003000.pcie-controller: probing port 2, using 1 lanes
[    1.406930] tegra-pcie 10003000.pcie-controller: link 0 down, retrying
[    1.808942] tegra-pcie 10003000.pcie-controller: link 0 down, retrying
[    2.212886] tegra-pcie 10003000.pcie-controller: link 0 down, retrying
[    2.214920] tegra-pcie 10003000.pcie-controller: link 0 down, ignoring
[    2.630906] tegra-pcie 10003000.pcie-controller: link 2 down, retrying
[    3.058961] tegra-pcie 10003000.pcie-controller: link 2 down, retrying
[    3.488922] tegra-pcie 10003000.pcie-controller: link 2 down, retrying
[    3.490956] tegra-pcie 10003000.pcie-controller: link 2 down, ignoring

(and)

[    0.935033] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[    1.507485] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[    1.529743] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[    1.545171] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[    2.579092] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[    3.220569] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[    4.572401] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[    4.588926] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[    4.853799] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517
[    4.872024] tegra-xusb-padctl 3520000.xusb_padctl: failed to setup XUSB ports: -517

All the while, the following lane assignments based on USB Lane Mapping - Jetson TX2 - NVIDIA Developer Forums topic appear to suggestest configuration #6 as noted as follows:

nvidia@nvidia-desktop:~$ sudo devmem2 0x02520284 b
/dev/mem opened.
Memory mapped at address 0x7f7f22d000.
Value at address 0x2520284 (0x7f7f22d284): 0x0
nvidia@nvidia-desktop:~$ sudo devmem2 0x02530284 b
/dev/mem opened.
Memory mapped at address 0x7fb6de1000.
Value at address 0x2530284 (0x7fb6de1284): 0x0
nvidia@nvidia-desktop:~$ sudo devmem2 0x02540284 b
/dev/mem opened.
Memory mapped at address 0x7f9cf22000.
Value at address 0x2540284 (0x7f9cf22284): 0x1
nvidia@nvidia-desktop:~$ sudo devmem2 0x02550284 b
/dev/mem opened.
Memory mapped at address 0x7f8e37a000.
Value at address 0x2550284 (0x7f8e37a284): 0x1
nvidia@nvidia-desktop:~$ sudo devmem2 0x02560284 b
/dev/mem opened.
Memory mapped at address 0x7fb290d000.
Value at address 0x2560284 (0x7fb290d284): 0x1
nvidia@nvidia-desktop:~$ sudo devmem2 0x02570284 b
/dev/mem opened.
Memory mapped at address 0x7f85174000.
Value at address 0x2570284 (0x7f85174284): 0x2

Hi mbarnett,

To have a correct usb lane mapping

  1. The odmdata should be correct. According to your register values, it is correct now.
  2. The device tree should be correct. Looks not correct now.

For the device tree, there are some points to check

  1. rel-32 and rel-28 have difference in configuring usb. You have to be careful about the forum topic you are referring to.

For rel-32, you could refer to the latest TX2 adaptation guide(uploaded date 2019/7/x).
rel-28, please refer to TX2 adaptation guide v1.7 uploaded in 2018/6/x and also this wiki page.
https://elinux.org/Jetson/TX2_USB

  1. Please be careful about the “plugin-manager”. This mechanism would override your device tree, so we need to disable it. This mechanism exists in both rel-28 and rel-32. Please check below link for it.

https://elinux.org/Jetson/TX2_USB