DESK-MX8M-L-TN-0003: SuperSpeed USB Device and Host interfaces

From DAVE Developer's Wiki
Jump to: navigation, search
Info Box


200px-Emblem-important.svg.png

This technical note has been validated using the kit version in the History table.

History
Issue Date Notes
2026/11/18 DESK-MX8M-L 6.8.0


Introduction[edit | edit source]

This technical note describes the validation procedure used to demonstrate simultaneous operation of two independent USB 3.0 SuperSpeed links on an i.MX8M Plus platform.

The target is to verify compliance with the following requirement:

  • two independent, simultaneous SuperSpeed links
    • a Windows bulk Device interface (WinUSB)
    • a media-facing USB Host (MSC BOT and/or UASP)

Test Setup[edit | edit source]

Hardware[edit | edit source]

Component Description
SBC ORCA / i.MX8M Plus based platform
BSP DESK-MX8M-L-6.0.0 (NXP L6.6.52_2.2.01 based)
USB Device Link USB 3.0 Type-C connection to Windows PC
Host Storage Device Samsung T7 Shield SSD 1 TB
Windows Host Windows 11 PC
USB Analysis Tool USB Device Tree Viewer (UsbTreeView)

Test topology[edit | edit source]

                    Windows 11 PC
                           |
                           |
               USB-C Device (g_mass_storage)
                           |
                           |
                    +--------------+
                    |  i.MX8M Plus |
                    +--------------+
                           |
                           |
                USB Host (UASP, 5000M)
                           |
                           |
                  Samsung T7 Shield

Prerequisites[edit | edit source]

Before executing the validation procedure, verify that:

  • the USB Device interface is configured as a WinUSB-compatible vendor-specific gadget
  • the Host port is configured in Host mode
  • a known-good USB 3.x SuperSpeed cable is used for both links
  • the Samsung T7 enumerates correctly on the target
  • the kernel contains UAS support

Packages required for the tests[edit | edit source]

The following packages will be installed to use the fio utility and to mount an external exfat formatted USB 3 hard disk:

apt-get install fio
apt-get install fuse-exfat

using the Package management application example.

Verify UAS Support[edit | edit source]

root@desk-mx8mp:~# zcat /proc/config.gz | grep CONFIG_USB_UAS
CONFIG_USB_UAS=y
root@desk-mx8mp:~#

Test 1 - Verify USB role configuration[edit | edit source]

Verify the role assigned to each USB controller.

Command[edit | edit source]

root@desk-mx8mp:~# find /proc/device-tree/soc@0/usb*/usb* -name dr_mode -exec sh -c 'echo "=== {} ==="; cat {} ; echo' \;
=== /proc/device-tree/soc@0/usb@32f10100/usb@38100000/dr_mode ===
host
=== /proc/device-tree/soc@0/usb@32f10108/usb@38200000/dr_mode ===
otg
root@desk-mx8mp:~#

Test 2 - Verify USB Host SuperSpeed enumeration[edit | edit source]

Verify that the external SSD is connected at 5 Gbit/s.

Command[edit | edit source]

root@desk-mx8mp:~# lsusb -t
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/5p, 480M
        |__ Port 005: Dev 003, If 0, Class=Billboard, Driver=[none], 480M
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 5000M
/:  Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M
/:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 001: Dev 002, If 0, Class=Mass Storage, Driver=uas, 5000M
root@desk-mx8mp:~#

UASP[edit | edit source]

/:  Bus 02.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 001: Dev 004, If 0, Class=Mass Storage, Driver=uas, 5000M

Test 3 - Verify BOT/UASP operation[edit | edit source]

Verify the Mass Storage transport protocol in use.

Command[edit | edit source]

root@desk-mx8mp:~# dmesg | grep -Ei "usb" | grep -Ei "uas"
[    2.078317] usbcore: registered new interface driver uas
root@desk-mx8mp:~#

Test 4 - Verify WinUSB SuperSpeed enumeration[edit | edit source]

Verify that Windows negotiates a SuperSpeed device connection.

Procedure[edit | edit source]

  1. Connect the USB Device interface to the Windows PC
  2. Open UsbTreeView
  3. Select the Linux File-Stor Gadget USB device


USB Device Tree Viewer - Mass Storage gadget

Test 5 - Host Interface throughput measurement[edit | edit source]

Measure the effective throughput of the Host USB 3.0 link.

Sequential Write Test[edit | edit source]

root@desk-mx8mp:~# fio --name=hostwrite --filename=/mnt/fio_test.bin --rw=write --bs=1M --iodepth=64 --size=64G --direct=1[ 3481.119317] audit: type=1006 audit(1794997402.249:23): pid=741 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=3 res=1
[ 3481.131747] audit: type=1300 audit(1794997402.249:23): arch=c00000b7 syscall=64 success=yes exit=1 a0=7 a1=ffffdf987d40 a2=1 a3=1 items=0 ppid=1 pid=741 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="sshd" exe="/usr/sbin/sshd" key=(null)
[ 3481.156224] audit: type=1327 audit(1794997402.249:23): proctitle=737368643A20726F6F74205B707269765D
[ 3481.119317] audit: type=1006 audit(1794997402.249:23): pid=741 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=3 res=1
[ 3481.131747] audit: type=1300 audit(1794997402.249:23): arch=c00000b7 syscall=64 success=yes exit=1 a0=7 a1=ffffdf987d40 a2=1 a3=1 items=0 ppid=1 pid=741 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="sshd" exe="/usr/sbin/sshd" key=(null)
[ 3481.156224] audit: type=1327 audit(1794997402.249:23): proctitle=737368643A20726F6F74205B707269765D

hostwrite: (g=0): rw=write, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=psync, iodepth=64
fio-3.30
Starting 1 process
hostwrite: Laying out IO file (1 file / 65536MiB)
Jobs: 1 (f=1): [f(1)][100.0%][w=27.0MiB/s][w=27 IOPS][eta 00m:00s]
hostwrite: (groupid=0, jobs=1): err= 0: pid=761: Wed Nov 18 10:50:44 2026
  write: IOPS=40, BW=40.2MiB/s (42.2MB/s)(64.0GiB/1628616msec); 0 zone resets
    clat (msec): min=3, max=1265, avg=24.67, stdev=47.49
     lat (msec): min=3, max=1265, avg=24.83, stdev=47.49
    clat percentiles (msec):
     |  1.00th=[    4],  5.00th=[    4], 10.00th=[    4], 20.00th=[    5],
     | 30.00th=[    6], 40.00th=[   20], 50.00th=[   25], 60.00th=[   27],
     | 70.00th=[   32], 80.00th=[   33], 90.00th=[   43], 95.00th=[   47],
     | 99.00th=[   52], 99.50th=[  430], 99.90th=[  760], 99.95th=[  818],
     | 99.99th=[  944]
   bw (  KiB/s): min= 2043, max=262144, per=100.00%, avg=42506.80, stdev=36207.18, samples=3157
   iops        : min=    1, max=  256, avg=41.34, stdev=35.37, samples=3157
  lat (msec)   : 4=16.51%, 10=17.31%, 20=6.97%, 50=57.74%, 100=0.90%
  lat (msec)   : 250=0.01%, 500=0.16%, 750=0.31%, 1000=0.11%, 2000=0.01%
  cpu          : usr=0.76%, sys=1.05%, ctx=548009, majf=0, minf=25
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwts: total=0,65536,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=64

Run status group 0 (all jobs):
  WRITE: bw=40.2MiB/s (42.2MB/s), 40.2MiB/s-40.2MiB/s (42.2MB/s-42.2MB/s), io=64.0GiB (68.7GB), run=1628616-1628616msec

Disk stats (read/write):
  sda: ios=393/129475, merge=0/16431233, ticks=214052/95246351, in_queue=95460403, util=95.55%
root@desk-mx8mp:~#

Sequential Read Test[edit | edit source]

root@desk-mx8mp:~# fio --name=hostwrite --filename=/mnt/fio_test.bin --rw=read --bs=1M --iodepth=64 --size=64G --direct=1
hostwrite: (g=0): rw=read, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=psync, iodepth=64
fio-3.30
Starting 1 process
Jobs: 1 (f=1): [R(1)][100.0%][r=256MiB/s][r=255 IOPS][eta 00m:00s]
hostwrite: (groupid=0, jobs=1): err= 0: pid=811: Wed Nov 18 11:01:45 2026
  read: IOPS=245, BW=246MiB/s (258MB/s)(64.0GiB/266570msec)
    clat (usec): min=1452, max=156854, avg=4050.69, stdev=16633.95
     lat (usec): min=1453, max=156856, avg=4052.16, stdev=16633.94
    clat percentiles (usec):
     |  1.00th=[  1532],  5.00th=[  1565], 10.00th=[  1582], 20.00th=[  1614],
     | 30.00th=[  1647], 40.00th=[  1680], 50.00th=[  1729], 60.00th=[  1860],
     | 70.00th=[  1991], 80.00th=[  2114], 90.00th=[  2606], 95.00th=[  3032],
     | 99.00th=[135267], 99.50th=[137364], 99.90th=[139461], 99.95th=[139461],
     | 99.99th=[145753]
   bw (  KiB/s): min=51200, max=280576, per=100.00%, avg=252043.56, stdev=20792.39, samples=532
   iops        : min=   50, max=  274, avg=245.98, stdev=20.30, samples=532
  lat (msec)   : 2=71.14%, 4=26.11%, 10=1.04%, 20=0.08%, 50=0.06%
  lat (msec)   : 100=0.01%, 250=1.56%
  cpu          : usr=0.62%, sys=5.02%, ctx=527457, majf=0, minf=96
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwts: total=65536,0,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=64

Run status group 0 (all jobs):
   READ: bw=246MiB/s (258MB/s), 246MiB/s-246MiB/s (258MB/s-258MB/s), io=64.0GiB (68.7GB), run=266570-266570msec

Disk stats (read/write):
  sda: ios=144572/0, merge=128/0, ticks=6946555/0, in_queue=6946554, util=47.60%
root@desk-mx8mp:~#

Throughput results[edit | edit source]

258 MB/s = 2.06 Gbit/s

Measured throughput is significantly above USB 2.0 limits (480 Mbit/s).

Test 6 - Device Interface throughput measurement[edit | edit source]

Measure the effective throughput of the Device USB 3.0 link.

Linux side[edit | edit source]

Hard disk emulation via g_mass_storage UJSB gadget driver

root@desk-mx8mp:~# cat /sys/class/udc/38200000.usb/state
configured
root@desk-mx8mp:~# cat /proc/device-tree/soc@0/usb@32f10108/usb@38200000/dr_mode
otg
root@desk-mx8mp:~# ls -la mass_storage_2GB
-rw-r--r-- 1 root root 2147483648 Nov 18 14:07 mass_storage_2GB
root@desk-mx8mp:~# modprobe g_mass_storage removable=y file=/root/mass_storage_2GB
[   53.651187] Mass Storage Function, version: 2009/09/11
[   53.656362] LUN: removable file: (no medium)
[   53.660730] LUN: removable file: /root/mass_storage_2GB
[   53.665976] Number of LUNs=1
[   53.669273] g_mass_storage gadget.0: Mass Storage Gadget, version: 2009/09/11
[   53.676437] g_mass_storage gadget.0: userspace failed to provide iSerialNumber
[   53.683768] g_mass_storage gadget.0: g_mass_storage ready
root@desk-mx8mp:~#

Windows 11 side[edit | edit source]

CrystalDiskMark throughput results

Test 7 - Simultaneous Device and Host operation[edit | edit source]

Verify operation of both SuperSpeed links simultaneously.

Host Side on Linux[edit | edit source]

Run continuous read traffic from SSD:

root@desk-mx8mp:~# fio --name=hostwrite --filename=/mnt/fio_test.bin --rw=read --bs=1M --iodepth=64 --size=64G --direct=1
hostwrite: (g=0): rw=read, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=psync, iodepth=64
fio-3.30
Starting 1 process
Jobs: 1 (f=1): [R(1)][1.7%][r=256MiB/s][r=256 IOPS][eta 04m:44s]

Device side on Windows[edit | edit source]

USB Device Tree Viewer- Linux gadget at SuperSpeed

Run continuous WinUSB bulk transfers from the Windows application.


Both sides stressed in parallel[edit | edit source]

CrystalDiskMark running on Windows while fio is running on Linux

Results[edit | edit source]

  • WinUSB Device interface enumerates as SuperSpeed on Windows
  • USB Host SSD enumerates at 5000M
  • MSC BOT operation is demonstrated
  • UASP operation is demonstrated
  • Measured throughput is consistent with USB 3.0 SuperSpeed operation
  • Logs and screenshots provide evidence that both links are active at 5 Gbit/s