No USB support on custom base/carrier board

Hi everybody,

we have some problems regarding USB on our custom base board.

Using our custom board with Parker Enineering Samples and L4T 27.1-EA: USB and PCIe work. So physically the board is fine. If we reproduce the test with Parker Qualification Samples and L4T 27.1 USB and PCIe do not work.

We found out that it could be somehow related to cboot’s plugin manager:

[0001.807] I> Updated bootarg info to DTB
[0001.812] I> eeprom_get_mac_addr: MAC (type: 0): 00:04:4b:81:c7:b0
[0001.818] I> eeprom_get_mac_addr: MAC (type: 1): 00:04:4b:81:c7:b1
[0001.824] I> eeprom_get_mac_addr: MAC (type: 2): 00:04:4b:81:c7:b2
[0001.830] E> "ids" doesn't exist, creating 
[0001.834] E> "connection" doesn't exist, creating 
[0001.839] E> "configs" doesn't exist, creating 
[0001.843] I> create_pm_ids: id: 3310-1000-B00-B, len: 15
[0001.848] I> config: mem-type:00,power-config:00,misc-config:00,modem-config:00,touch-config:00,display-config:00,, len: 93
[0001.859] I> create_pm_ids: id: XXXX-XXXX-XXX-X, len: 15
[0001.864] I> config: mem-type:ff,power-config:ff,misc-config:ff,modem-config:ff,touch-config:ff,display-config:ff,, len: 93
[0001.875] I> Adding plugin-manager/ids/3310-1000-B00=/i2c@c250000:module@0x50
[0001.882] E> "i2c@c250000" doesn't exist, creating 
[0001.887] E> "module@0x50" doesn't exist, creating 
[0001.892] I> Adding plugin-manager/ids/XXXX-XXXX-XXX=/i2c@3160000:module@0x50
[0001.899] E> "i2c@3160000" doesn't exist, creating 
[0001.904] E> "module@0x50" doesn't exist, creating 
[0001.910] I> Adding plugin-manager/ids/3310-1000-B00-B
[0001.917] I> Adding plugin-manager/configs/3310-mem-type 00
[0001.923] I> Adding plugin-manager/configs/3310-power-config 00
[0001.929] I> Adding plugin-manager/configs/3310-misc-config 00
[0001.934] I> Adding plugin-manager/configs/3310-modem-config 00
[0001.940] I> Adding plugin-manager/configs/3310-touch-config 00
[0001.946] I> Adding plugin-manager/configs/3310-display-config 00
[0001.952] E> "chip-id" doesn't exist, creating 
[0001.956] I> Adding plugin-manager/chip-id/A02P
[0001.963] I> Updated memory info to DTB
[0001.968] E> "reset" doesn't exist, creating 
[0001.973] E> "pmc-reset-reason" doesn't exist, creating 
[0001.978] E> "pmic-reset-reason" doesn't exist, creating 
[0001.983] I> disabled_core_mask: 0xffffff0c
[0001.994] I> tegrabl_load_kernel_and_dtb: Done

After that the USB controller can neither be enabled in U-Boot or Linux:

Tegra186 (xxxxx) # usb start
starting USB...
No controllers found

For comparison: Here is a working trace on a TX2 base board:

[0001.891] I> Updated bootarg info to DTB
[0001.896] I> eeprom_get_mac_addr: MAC (type: 0): 00:04:4b:81:c7:20
[0001.903] I> eeprom_get_mac_addr: MAC (type: 1): 00:04:4b:81:c7:21
[0001.909] I> eeprom_get_mac_addr: MAC (type: 2): 00:04:4b:81:c7:22
[0001.915] E> "ids" doesn't exist, creating 
[0001.919] E> "connection" doesn't exist, creating 
[0001.923] E> "configs" doesn't exist, creating 
[0001.928] I> create_pm_ids: id: 3310-1000-B00-B, len: 15
[0001.933] I> config: mem-type:00,power-config:00,misc-config:00,modem-config:00,touch-config:00,display-config:00,, len: 93
[0001.944] I> create_pm_ids: id: 2597-0000-500-C, len: 15
[0001.949] I> config: mem-type:00,power-config:00,misc-config:00,modem-config:00,touch-config:00,display-config:00,, len: 93
[0001.960] I> create_pm_ids: id: 3326-1000-000-M, len: 15
[0001.965] I> config: mem-type:ff,power-config:ff,misc-config:ff,modem-config:ff,touch-config:ff,display-config:ff,, len: 93
[0001.976] I> Adding plugin-manager/ids/3310-1000-B00=/i2c@c250000:module@0x50
[0001.983] E> "i2c@c250000" doesn't exist, creating 
[0001.988] E> "module@0x50" doesn't exist, creating 
[0001.993] I> Adding plugin-manager/ids/2597-0000-500=/i2c@c250000:module@0x57
[0002.000] E> "module@0x57" doesn't exist, creating 
[0002.004] I> Adding plugin-manager/ids/3326-1000-000=/i2c@3180000:module@0x54
[0002.011] E> "i2c@3180000" doesn't exist, creating 
[0002.016] E> "module@0x54" doesn't exist, creating 
[0002.023] I> Adding plugin-manager/ids/3310-1000-B00-B
[0002.030] I> Adding plugin-manager/configs/3310-mem-type 00
[0002.035] I> Adding plugin-manager/configs/3310-power-config 00
[0002.041] I> Adding plugin-manager/configs/3310-misc-config 00
[0002.047] I> Adding plugin-manager/configs/3310-modem-config 00
[0002.053] I> Adding plugin-manager/configs/3310-touch-config 00
[0002.058] I> Adding plugin-manager/configs/3310-display-config 00
[0002.064] E> "chip-id" doesn't exist, creating 
[0002.069] I> Adding plugin-manager/chip-id/A02P
[0002.075] I> Updated memory info to DTB
[0002.081] E> "reset" doesn't exist, creating 
[0002.085] E> "pmc-reset-reason" doesn't exist, creating 
[0002.090] E> "pmic-reset-reason" doesn't exist, creating 
[0002.096] I> disabled_core_mask: 0xffffff0c
[0002.106] I> tegrabl_load_kernel_and_dtb: Done

We guess it has to do with the plugin manager which does not find a suitable EEPROM on our custom board. We did not populate such an EEPROM as we did not find any documentation on this requirement.

Can you please provide us with information on how to disable the plugin manager in cboot or how to enable USB and PCIe manually for U-Boot and Linux?

For your information: the plugin manager also seems to access the 2 GPIO expanders on the base board which we also do not have.

Best regards,

Olaf

Hi Olaf,

If I understand properly, for the working case you are using Jetson TX2 devkit which contains CVM and Base board provided by Nvidia. While in failing case, you are using a Jetson CVM ( with a QS sample) + your own base board.

Nvidia provided based board is called 2597-0000-500-C

Can you confirm this?
Also USB is not supported in uboot for TX2. PCIe is supported.

Your problem is usb3.0 not working after kernel boot?
If that is the case, make the below change in your DT and it should start working

  1. Change the supply with battery_reg using the .dtsi file located at:

hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi

The modifications are as follows:

pinctrl@3520000 {
vbus-0-supply = <&vdd_usb0_5v>;
vbus-1-supply = <&vdd_usb1_5v>;
vbus-2-supply = <&battery_reg>;

  • vbus-3-supply = <&vdd_usb2_5v>;
  • vbus-3-supply = <&battery_reg>;
    vddio-hsic-supply = <&battery_reg>;
    avdd_usb-supply = <&spmic_sd3>;
    vclamp_usb-supply = <&spmic_sd2>;
    avdd_pll_erefeut-supply = <&spmic_sd2>;
    };
  1. Regenerate the DTB.
  2. Flash with the correct DTB.

regards
Bibek

I had the same problem on my board but the content of the file:

hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi

was different than what was described by bbasu instead I had to change my file from this

pinctrl@3520000 {
    vbus-0-supply = <&vdd_usb0_5v>;
    vbus-1-supply = <&vdd_usb1_5v>;
    vbus-2-supply = <&vdd_usb2_5v>;
    vbus-3-supply = <&battery_reg>;
    vddio-hsic-supply = <&battery_reg>;
    hvdd_pex_pll-supply = <&spmic_sd2>;
    hvdd_pex-supply = <&spmic_sd2>;
    dvdd_pex-supply = <&spmic_ldo7>;
    avdd_usb-supply = <&spmic_sd3>;
    vclamp_usb-supply = <&spmic_sd2>;
    avdd_pll_erefeut-supply = <&spmic_sd2>;
  };

To this

pinctrl@3520000 {
    vbus-0-supply = <&vdd_usb0_5v>;
    vbus-1-supply = <&vdd_usb1_5v>;
    //vbus-2-supply = <&vdd_usb2_5v>;
    vbus-2-supply = <&battery_reg>;
    //vbus-3-supply = <&battery_reg>;
    vbus-3-supply = <&vdd_usb2_5v>;
    vddio-hsic-supply = <&battery_reg>;
    hvdd_pex_pll-supply = <&spmic_sd2>;
    hvdd_pex-supply = <&spmic_sd2>;
    dvdd_pex-supply = <&spmic_ldo7>;
    avdd_usb-supply = <&spmic_sd3>;
    vclamp_usb-supply = <&spmic_sd2>;
    avdd_pll_erefeut-supply = <&spmic_sd2>;
  };

and it works!

Thanks a lot!

Dave

Great!!
If you are using a different base board than Nvidia provided P2597, you need to review the schematic of your base board and make necessary change in the powertree dt so that your boards configuration is reflected there.
There could be gpio expanders not present in your board which are being used as fixed regulators in P2597

@bbasu: you wrote “Nvidia provided based board is called 2597-0000-500-C”

How to get a name of a currently used based board from a terminal?

I’ve received a message from a developer

“I tried switching the tx2 to the orbety carrier board but the USB 3 and USB otg did not work”

Is that likely that the power-tree adjustment declared above could help resolve the issue ?

Please advise.

Reference link:

http://connecttech.com/product/orbitty-carrier-for-nvidia-jetson-tx2-tx1/

@Andrey P2597 refrence you will get in the device boot log. For example

[0001.933] I> config: mem-type:00,power-config:00,misc-config:00,modem-config:00,touch-config:00,display-config:00, len: 93
[0001.944] I> create_pm_ids: id: 2597-0000-500-C, len: 15

You can get what device ID here: xxd /proc/device-tree/chosen/plugin-manager/ids/

Not all customer board designs are fully compatible between TX1 and TX2. If customer boards are following the same config of lane mapping as done in P2597 nvidia boards, then it should work out of the box. At most you need to solve the power tree change mentioned above.
Lane mapping details are provide adaptation guide.
please review the lane mapping and post the config used in the board.

regards
Bibek

How do I find the power tree ?

you have said : “hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi”

How do I get to the file, presuming I am in the root “/” folder ?
dmesg returns a very loooooooong path for “DTS File Name”:

/dvs/git/dirty/git-master_linux/kernel/kernel-4.4/arch/arm64/boot/dts/…/…/…/…/…/…/hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-base.dts

How do I find and open the file for edition?
Neither find nor locate haven’t managed to distinguish the file.

Shall I edit one of the following instead ?

/boot# ls                                                                                                                 
dtb  extlinux  initrd                                     tegra186-quill-p3310-1000-a00-00-dsi-hdmi-dp.dtb                                  
efi  Image     tegra186-quill-p3310-1000-a00-00-base.dtb  tegra186-quill-p3310-1000-c03-00-base.dtb

Hopefully http://elinux.org/Device_Tree_Reference seems to have some information on that.

However, that doesn’t clarify the issue " where to find the file" , though, there exist a definition on the “dsi” file format : .dtsi - File name suffix, by convention, for devicetree source to be included by a .dts or .dtsi file.

That gives a breezy feeling that the file should be located approximately at /proc/device-tree/ somewhere.

Somehow I should locate source files from which the file tegra186-quill-p3310-1000-a00-00-base.dtb was compiled, shouldn’t I?

Please advice.

I have also found a folder there: /usr/src/linux-headers-4.4.15-tegra/arch/arc/boot/dts
All it contains is a Makefile
And I found /usr/src/linux-headers-4.4.15-tegra/include/dt-bindings/gpio/tegra186-gpio.h
And
/usr/src/linux-headers-4.4.15-tegra/include/dt-bindings/power/mt8173-power.h
/usr/src/linux-headers-4.4.15-tegra/include/dt-bindings/power/rk3288-power.h
/usr/src/linux-headers-4.4.15-tegra/include/dt-bindings/soc/nvidia,tegra186-powergate.h
/usr/src/linux-headers-4.4.15-tegra/include/dt-bindings/soc/tegra186-powergate.h

xxd /proc/device-tree/chosen/plugin-manager/ids/xxd: Is a directory

ls /proc/device-tree/chosen/plugin-manager/ids/
2597-0000-501 3310-1000-B00 3310-1000-B00-E 3326-1000-100 connection name

that returns id’s

how to display the device boot log?
dmesg displays the boot log
bugtrack.txt (64.2 KB)

I have found a thread there giving impression that I should get kernel sources from somewhere, edit dtsi source files and compile the kernel after that :

https://devtalk.nvidia.com/default/topic/1001443/jetson-tx2/extlinux-conf-fdt-no-longer-used-for-dtb-file-specification-/

However, I will be researching the issue and would be grateful for any exact advice and instruction steps to get the issue fixed.
Got found there https://devtalk.nvidia.com/default/topic/1000617/jetson-tx2/issues-rebuilding-the-kernel-gk20a-gk20a-h-no-such-file-or-directory/ link to thte instruction where is defined where to get kernel sources.
Downloading it.
Should I compile the kernel from sources?
Which way would be more straightforward?
Yet an idea to compile the kernel at a target device got to my mind. Shall I consider use of host oS instead?
I have downloaded the kernel sources from the link : http://developer.download.nvidia.com/embedded/L4T/r27_Release_v1.0/BSP/r27.1.0_sources.tbz2
I have found the following directives at the driver package manual for 27.1 :

4. Execute the following command to create the kernel device tree components:
$ make O=$TEGRA_KERNEL_OUT dtbs

As I understand, we could omit step 1 from the instruction on kernel build if we are compiling it naively at Jetson:

To build the Tegra Kernel
1. Export the following environment variables:
$ export CROSS_COMPILE=<crossbin>
$ export TEGRA_KERNEL_OUT=<outdir>
$ export ARCH=arm64

Once we unpack kernel_src.tbz2 we should get access to the power-tree dtsi file, as it seems to me. In the unpacked kernel folder we could navigate to the folder /hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms and there we find the file : tegra186-quill-power-tree-p3310-1000-a00-00.dtsi, finally.
Next step should be to edit the file according to the instructions provided above in the posts of cospan and bbsu. My dtsi file has:

pinctrl@3520000 {
                vbus-0-supply = <&vdd_usb0_5v>;
                vbus-1-supply = <&vdd_usb1_5v>;
                vbus-2-supply = <&vdd_usb2_5v>;
                vbus-3-supply = <&battery_reg>;
                vddio-hsic-supply = <&battery_reg>;
                hvdd_pex_pll-supply = <&spmic_sd2>;
                hvdd_pex-supply = <&spmic_sd2>;
                dvdd_pex-supply = <&spmic_ldo7>;
                avdd_usb-supply = <&spmic_sd3>;

The above seems to be patched already! No rather it is the same as in the post of cospan. There we are changing the lines for vbus 2 and vbus 3 values “2.5v” and “battery_reg”. To the live vbus-2-supply we are putting the value from the line vbus-3-supply and vice versa.

- vbus-2-supply = <&vdd_usb2_5v>;
+ vbus-2-supply = <&battery_reg>;
-vbus-3-supply = <&battery_reg>;
+vbus-3-supply = <&vdd_usb2_5v>;

Now it seems like that:

pinctrl@3520000 {
                vbus-0-supply = <&vdd_usb0_5v>;
                vbus-1-supply = <&vdd_usb1_5v>;
                vbus-2-supply = <&battery_reg>;
                vbus-3-supply = <&vdd_usb2_5v>;
                vddio-hsic-supply = <&battery_reg>;
                hvdd_pex_pll-supply = <&spmic_sd2>;
                hvdd_pex-supply = <&spmic_sd2>;
                dvdd_pex-supply = <&spmic_ldo7>;
                avdd_usb-supply = <&spmic_sd3>;

Unfortunately by now I have a slightly idea what to do next. Shall I run “make O=$TEGRA_KERNEL_OUT dtbs”? Shall I perform that from jetson for simplicity? Or I rather should use HOST OS 64 bit [which I have not], or not only the dtbs build required but more componens to be processed? If you could provide more detailed instructions on that aspects I would be grateful.
References:
http://developer.download.nvidia.com/embedded/L4T/r27_Release_v1.0/Docs/Tegra_Linux_Driver_Package_Documents_R27.1.tar
http://developer.download.nvidia.com/embedded/L4T/r27_Release_v1.0/BSP/r27.1.0_sources.tbz2
https://devtalk.nvidia.com/default/topic/1000617/jetson-tx2/issues-rebuilding-the-kernel-gk20a-gk20a-h-no-such-file-or-directory
https://devtalk.nvidia.com/default/topic/1001443/jetson-tx2/extlinux-conf-fdt-no-longer-used-for-dtb-file-specification-/

Having the same problem here. Orbitty carrier USB not working.

If you find a solution to the problem, please post it. Thanks.

This is what dmesg shows for me

dmesg | grep -i usb

[ 15.834574] tegra186-padctl 3520000.pinctrl: FUSE_SKU_USB_CALIB_0 0x2aa914
[ 15.834576] tegra186-padctl 3520000.pinctrl: FUSE_USB_CALIB_EXT_0 0x9
[ 15.838385] xhci-tegra 3530000.xhci: can’t get usb3-0 phy (-517)
[ 15.838621] tegra-usb-cd usb_cd: otg phy is not available yet
[ 15.839896] tegra-xudc-new 3550000.xudc: usb2 phy is not available yet

lsusb shows nothing

lsusb

From the Orbitty manual, this seems to imply no changes should be needed:

“The Orbitty Carrier is designed to be used with the stock NVIDIA Linux For Tegra (L4T) Builds.HDMI, Gigabit Ethernet, USB 3.0, USB OTG (Host & Client), UARTs, GPIO, SD Card and I2C will all be supported natively with no BSP modifications needed.”

BSP is “Board Support Package”, an additional package that can be downloaded from Conecttech.

I have got a response from the manufacturer. They suggest dtb for substitution and extlinux.conf. But they say that USB ports won’t work in USB 3 high speed mode but in USB 2 mode only. Please clarify if with power tree file modification we are capping bandwidth of power-tree to USB mode .
Is there a way to maintain USB 3.0 mode with the power-tree modification method?

Can you get USB 2.0 to work? I can’t get anything from the USB port. However, I do know the USB ports are functional at a hardware level because I used the micro USB port to flash the device. So, it seems like a software issue.

Yes, I got two files to make the USB 2.0 functioning, I am not sure if that affects USB 3.0 performance at standard nvidia carrier board. Make sure to make backups!

Copy the provided dtb into the /boot folder on your device
Replace the extlinux.conf in the /boot/extlinux/ with the one provided.

Downloads.tar.gz (46.5 KB)

Thanks so much. I will try this tomorrow. I’d really like USB 3.0 to work but USB 2.0 will allow me to continue development with the carrier.

Not at all. It was a patch provided by carriers manufacturer - connecttech.
Let us know it that helps get usb 2.0 functioning.

That fixed it. The extlinux.conf modification just sets the location of the new tegra .dtb. The .dtb itself has some changes from the previous one to fix the issue.

For anyone else, the dtb is the device tree binary file. One way to see the text version is to decompile it with dtc. You can install dtc or use the one on the host that was installing during the setup process.

For example, to see changes between two dtbs <before.dtb> and <after.dtb> using the dtc installed on the host:

/64_TX2/Linux_for_Tegra_tx2/kernel/dtc -I dtb -O dts -o /tmp/before.dts <before.dtb>
/64_TX2/Linux_for_Tegra_tx2/kernel/dtc -I dtb -O dts -o /tmp/after.dts <after.dtb>
diff /tmp/before.dts /tmp/after.dts

Does dtc start from Jetson?

I receive:

dtc tegra186-quill-p3310-1000-a00-00-dsi-hdmi-dp.dtb 
Error: tegra186-quill-p3310-1000-a00-00-dsi-hdmi-dp.dtb:1.1-2 syntax error
FATAL ERROR: Unable to parse input tree