USB Hub TUSB8041 4-Port Hub caused flash failed @ JetPack 6.2

Hi All

I’m using a customized board and I have connected a USB Hub TUSB8041 that caused flashing failed @ JetPack 6.2.
But JetPack 5.1.3 flashing OK (DTS changed because one of device connect USB3.0 with SOM directly but connect USB2.0 with other model of USB HUB chip).

Detail:

  • H/W: SOM side @ USB 3.0
  • H/W: SOM side @ USB 2.0
  • H/W: TUSB8041 side
  • DTS: Official, unchanged.
  • Flash command: ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml --erase-all -p “-c bootloader/generic/cfg/flash_t234_qspi.xml” --showlogs --network usb0 jetson-orin-nano-devkit-super internal
  • JetPack 6.2 flashing success case: TUSB8041=RESET state (Pin GRSTz=L)
  • JetPack 6.2 flashing failed case: TUSB8041=Action state (Pin GRSTz=H), got error as follows
    Waiting for target to boot-up…
    Waiting for target to boot-up…
    Waiting for target to boot-up…
    Waiting for target to boot-up…
    Waiting for target to boot-up…
    Timeout
    Device failed to boot to the initrd flash kernel. Please retrive the serial log during flashing to debug further.
    Cleaning up…
  • JetPack 5.1.3/6.2 after flashing successful, H/W set TUSB8041=Action state, and boot. linux could be detected HUB as follows
    $ lsusb
    Bus 002 Device 002: ID 0451:8140 Texas Instruments, Inc. TUSB8041 4-Port Hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 005: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse
    Bus 001 Device 004: ID 046d:c31c Logitech, Inc. Keyboard K120
    Bus 001 Device 002: ID 0451:8142 Texas Instruments, Inc. TUSB8041 4-Port Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Current action: Building USB-Serial adapter for collect serial log.

Someone have similar problem? any suggestions are welcome.
Thanks a lot.

Check your uart log during flash failure as the host log tells you to do.

And did you ever configure the device tree before? Your setting is different from NV devkit hardware so device tree has to be updated.

NV devkit is usb3-1+ usb2-0 but your design is usb3-1 + usb2-1.

Hi @WayneWWW

Host & Serial log as follows for your reference.
JP6.2-TUSB8014-Action-flashing-failed-Host.log (298.1 KB)
JP6.2-TUSB8014-Action-flashing-failed-SerialConsole.log (81.5 KB)
JP6.2-TUSB8014-Reset-flashing-OK-Host.log (335.8 KB)
JP6.2-TUSB8014-Reset-flashing-OK-SerialConsole.log (164.8 KB)

I’m starting study and compare what different.

Thanks you a lot.

Hi @WayneWWW

DTS is official version.
In fact, I’m newbie of Nvidia ecosystem, started 2 months ago
(New employee also, joined company 3 months ago, therefore not to know all the details)
Porting new JetPack 6.2 into new carry board right now.

Based your replied, I must be study how update device tree.
Starting from forum.
Can you provide suggestion/hint to me if possible?

Note: According to our hardware team instructions, the FAE instructions are connected is correct (usb3-1 + usb2-1).

Thanks a lot.

Hi,

please read the document to update the device tree to match your hardware.

Default device tree is only for NV devkit to use. Not possible to directly be used on your board.

Hi @WayneWWW

Thanks your document, let me study.

Hi @WayneWWW

Status update

  • Other one USB using recovery only (usb2-0 only)
    image
  • Other two USB using for connect peripheral (Host, usb2-2 & usb3-0)
    image
  • Remain usb3-2 unused.
  • For your reference, attach file: de-compile DTS from Nvidia original DTS flashing success @ TUSB8041=RESET state (Pin GRSTz=L) and system running…
    command: $ sudo dtc -I dtb -O dts -o NvidiaOriginal.dts /boot/dtb/kernel_tegra234-p3768-0000+p3767-0003-nv-super.dtb
    NvidiaOriginal_dts.txt (316.2 KB)
  • We using Orin Nano 8GB, therefore employee send me Porting Universal Serial Bus @ Jetson Orin Nano
  • Test 1:
    Compare OK/Failed serial log as follows, look like caused by tegra-xudc

    Because our USB working only recovery and HOST mode, therefore we tried to disabled it as follows.
diff --git a/source/hardware/nvidia/t23x/nv-public/tegra234-p3768-0000.dtsi b/source/hardware/nvidia/t23x/nv-public/tegra234-p3768-0000.dtsi
index 5d0298b6c..9e2207018 100644
--- a/source/hardware/nvidia/t23x/nv-public/tegra234-p3768-0000.dtsi
+++ b/source/hardware/nvidia/t23x/nv-public/tegra234-p3768-0000.dtsi
@@ -115,7 +115,7 @@
                };
 
                usb@3550000 {
-                       status = "okay";
+                       status = "disabled";
 
                        phys = <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-0}>,
                               <&{/bus@0/padctl@3520000/pads/usb3/lanes/usb3-1}>;

And make sure disabled successfully by De-compile DTS @ host as follows

                usb@3550000 {
                        compatible = "nvidia,tegra234-xudc";
                        reg = <0x00 0x3550000 0x00 0x8000 0x00 0x3558000 0x00 0x8000>;
                        ... 
                        dma-coherent;
                        status = "disabled";
                        phys = <0xfb 0xfc>;
                        ... 

Result: Flashing failed still.

  • Test 2: Changed property nvidia,usb2-companion to accord above USB ports as follows
    Working file 1
+++ b/source/hardware/nvidia/t23x/nv-public/nv-platform/tegra234-p3768-0000+p3767-xxxx-nv-common.dtsi
@@ -203,9 +203,24 @@
                                                };
                                        };
                                };
+
+                               /* USB 3.0 Type-A (Female) */
+                                usb3-0 {
+                                        nvidia,usb2-companion = <2>;
+                                };
+
+
+                               /* USB 3.0 HUB TUSB8041ARGC */
+                                usb3-1 {
+                                        nvidia,usb2-companion = <1>;
+                                };
                        };
                };
 
                i2c@c240000 {
                        status = "okay"

Working file 2

+++ b/source/hardware/nvidia/t23x/nv-public/tegra234-p3768-0000+p3767-0000.dts
@@ -50,7 +50,23 @@
 
                padctl@3520000 {
                        status = "okay";
+                       ports {
+                               /* USB 3.0 Type-A (Female) */
+                                usb3-0 {
+                                        nvidia,usb2-companion = <2>;
+                                };
+
+                               /* USB 3.0 HUB TUSB8041ARGC */
+                                usb3-1 {
+                                        nvidia,usb2-companion = <1>;
+                               };
+                       };
                };
        };
 
        gpio-keys {

Result: Flashing failed still.

RE-EDIT: Sorry, “Save Edit” pressed before edit finish mistakenly, please read again.

Am I loss anything?
Thanks a lot.

Hi,

我直接用中文說明好了

我不知道你有沒有了解這個flash的機制. initrd flash在你截圖log的那一段使用的就是usb device mode. 對應的driver就是usb@3550000. 你現在把他關了那你的flash自然就會失敗…

Hi @WayneWWW

抱歉, 公司趕人下班, 只能簡單說明
關於 tegra-xudc, 其實在 Test1 之前, 我有試過下面把 USB3 拿掉測試, 燒錄結果失敗, 才有整個關掉測試的 Test1

            usb@3550000 {
                    status = "okay";

                    phys = <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-0}>;
                    phy-names = "usb2-0";
            };

下星期我在整個還原在測試上面的這個只關拿掉 USB3的狀況

上一個留言不小心還沒編輯結束就存檔, 後面有補兩個檔案, 請您參考
感謝幫忙

Hi @WayneWWW

謝謝您的技術支援, 修改 tegra-xudc + nvidia,usb2-companion 後可以正常 flashing 了

藉此機會可否抽空幫忙確認/解答以下延伸問題?

  • 原始 tegra-xudc (tegra234-p3768-0000.dtsi) 如下

                         phys = <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-0}>,
                                <&{/bus@0/padctl@3520000/pads/usb3/lanes/usb3-1}>;
                         phy-names = "usb2-0", "usb3-0";
    

    但只有 usb2-0 用於 flash, 其它都是 HOST, 所以在上面正常 flashing 的修改內有測試改為

                         phys = <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-0}>;
                         phy-names = "usb2-0;
    

    目前看起來似乎沒問題, 還是請您確認

  • 上面原始 tegra-xudc 的 usb3 部份 phys 為 usb3-1, 但是 phy-names 為 usb3-0
    請問是筆誤還是正常的?
    如果是正常的, 請問如後續須使用該如何設定?

以下為另一個硬體不同的 project, 目前只有 JetPack 5.1.3 (但已無法詢問原開發者問題, 並且為沒有版本管理的可 flash 的壓縮檔), 但也須升級到 JetPack 6.2

  • 原始 nvidia,tegra234-xusb (tegra234-p3768-0000.dtsi) 如下

                usb@3610000 {
                        phys = <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-0}>,
                               <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-1}>,
                               <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-2}>,
                               <&{/bus@0/padctl@3520000/pads/usb3/lanes/usb3-0}>,
                               <&{/bus@0/padctl@3520000/pads/usb3/lanes/usb3-1}>;
                        phy-names = "usb2-0", "usb2-1", "usb2-2", "usb3-0",
                                    "usb3-1";
    

    沒有 usb3-2, 不過硬體 usb3-2 有連接使用, 所以正確作法應該加入其設定如下?

                               <&{/bus@0/padctl@3520000/pads/usb3/lanes/usb3-2}>;
                        phy-names = "usb2-0", "usb2-1", "usb2-2", "usb3-0",
                                    "usb3-1", "usb3-2";
    
  • 有一個 USB3 port, 其中 USB3 部份直接連接 SOM, 但是 USB2 部份透過一個 USB2 的 HUB 間接連接 SOM, 於 JetPack 5.1.3 運作正常, 這種情形
    a.設定 nvidia,usb2-companion 為 SOM 的 USB2 連接 USB2 HUB 的 port ?
    b.其他必要設定?

以上, 感謝

這個是沒問題的

上面原始 tegra-xudc 的 usb3 部份 phys 為 usb3-1, 但是 phy-names 為 usb3-0
請問是筆誤還是正常的?
如果是正常的, 請問如後續須使用該如何設定?

這其實是正常的. 由於upstream Linux kernel固定使用這種命名方法(一定要是usb3-0開始), 所以我們才改成用這樣命名. 請你直接把 phy-names當成是一個固定的名字. 跟你的硬體配對無關. (不論你接硬體接usb3-0/usb3-1/usb3-2, 這裡的phy-name都一定是usb3-0).

下面這兩個問題聽起來是有點爭議的. 能否請你多解釋一點?

沒有 usb3-2, 不過硬體 usb3-2 有連接使用, 所以正確作法應該加入其設定如下?

不太懂什麼叫沒有usb3-2但他有接. 這樣是接去做什麼?

有一個 USB3 port, 其中 USB3 部份直接連接 SOM, 但是 USB2 部份透過一個 USB2 的 HUB 間接連接 SOM, 於 JetPack 5.1.3 運作正常, 這種情形
a.設定 nvidia,usb2-companion 為 SOM 的 USB2 連接 USB2 HUB 的 port ?
b.其他必要設定?

如果你說的是usb2是從某個hub擴接出來然後又兜出一個usb3 port. 那我們沒有辦法支援這種硬體設計. 這個一定要改. 能動也只是運氣好. 久了會有功能上的問題.
你不知道怎麼寫device tree也是正常的, 因為我們根本沒支援這種設計. 以前也有人問過類似的狀況.

Hi @WayneWWW

謝謝答覆

不太懂什麼叫沒有usb3-2但他有接. 這樣是接去做什麼?

  • 沒有 usb3-2 是指 usb@3610000 的 phys 與 phy-names 都沒有 usb3-2 內容
  • 但他有接 是指 另一個硬體不同的 project 的 usb3-2 接到 M2 socket 用於 5G modem,

如果你說的是usb2是從某個hub擴接出來然後又兜出一個usb3 port …

是的, 我也覺得很納悶當初為何這樣設計, 只聽說當初代理商有幫忙修改才能動, 但是這個異常連接的 project 仍須升級到 JetPack 6.2 才有現在這個問題, 原來一開始就無法支援這樣的硬體設計, 現狀只能詢問代理商還記不記得如何修改
所以現在新 project 就用正確的設計 (USB2 HUB 改用 USB3 HUB, 下游連接 5G modem)

謝謝

我的理解是這樣接還是使用usb的功能. 所以你的phys/phy-names還是得寫

收到, 感謝解答