I said USB 2.1 because the bcdUSB value for the device is set to 0x0210 when plugged into the Linux machine.
I ran the tests you suggested. The output is below. Note that there are two devices being emulated; our HID keyboard, and Nvidia’s l4t mass storage emulation device.
Plugged in via USB 2:
-
dmesg --follow
when plugging in :
[ 2512.059637] usb 1-4: new high-speed USB device number 15 using xhci_hcd
[ 2512.210422] usb 1-4: New USB device found, idVendor=1d6b, idProduct=0104, bcdDevice= 1.00
[ 2512.210432] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2512.210436] usb 1-4: Product: [PRODUCT]
[ 2512.210440] usb 1-4: Manufacturer: [MANUFACTURER]
[ 2512.210442] usb 1-4: SerialNumber: [SERIAL_NUMBER]
[ 2512.220062] input: [DEVICE] as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:1D6B:0104.0016/input/input38
[ 2512.280037] hid-generic 0003:1D6B:0104.0016: input,hidraw3: USB HID v1.01 Keyboard on usb-0000:00:14.0-4/input0
[ 2512.280624] usb-storage 1-4:1.1: USB Mass Storage device detected
[ 2512.280910] scsi host6: usb-storage 1-4:1.1
[ 2513.297450] scsi 6:0:0:0: Direct-Access Linux File-Stor Gadget 0409 PQ: 0 ANSI: 2
[ 2513.297815] sd 6:0:0:0: Attached scsi generic sg2 type 0
[ 2513.298878] sd 6:0:0:0: Power-on or device reset occurred
[ 2513.299696] sd 6:0:0:0: [sdb] 32768 512-byte logical blocks: (16.8 MB/16.0 MiB)
[ 2513.417631] sd 6:0:0:0: [sdb] Write Protect is off
[ 2513.417639] sd 6:0:0:0: [sdb] Mode Sense: 0f 00 00 00
[ 2513.533483] sd 6:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 2513.766725] sdb:
[ 2514.009014] sd 6:0:0:0: [sdb] Attached SCSI removable disk
Bus 001 Device 015: ID 1d6b:0104 Linux Foundation Multifunction Composite Gadget
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0104 Multifunction Composite Gadget
bcdDevice 1.00
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0040
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 4
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 1 Keyboard
iInterface 5
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.01
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 63
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 4
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 4
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 7
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
-
lsusb -t
, Plugged into port 4
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
|__ Port 4: Dev 16, If 1, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 4: Dev 16, If 0, Class=Human Interface Device, Driver=usbhid, 480M
|__ Port 11: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 11: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 13: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
Plugged in via USB 3:
-
dmesg --follow
when plugging in :
[ 4263.487575] usb 1-7: new high-speed USB device number 17 using xhci_hcd
[ 4263.637847] usb 1-7: New USB device found, idVendor=1d6b, idProduct=0104, bcdDevice= 1.00
[ 4263.637857] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4263.637861] usb 1-7: Product: [PRODUCT]
[ 4263.637864] usb 1-7: Manufacturer: [MANUFACTURER]
[ 4263.637867] usb 1-7: SerialNumber: [SERIAL_NUMBER]
[ 4263.647837] input: [DEVICE] as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/0003:1D6B:0104.0018/input/input40
[ 4263.707956] hid-generic 0003:1D6B:0104.0018: input,hidraw3: USB HID v1.01 Keyboard on usb-0000:00:14.0-7/input0
[ 4263.708804] usb-storage 1-7:1.1: USB Mass Storage device detected
[ 4263.709091] scsi host6: usb-storage 1-7:1.1
[ 4264.721575] scsi 6:0:0:0: Direct-Access Linux File-Stor Gadget 0409 PQ: 0 ANSI: 2
[ 4264.721931] sd 6:0:0:0: Attached scsi generic sg2 type 0
[ 4264.723467] sd 6:0:0:0: Power-on or device reset occurred
[ 4264.724282] sd 6:0:0:0: [sdb] 32768 512-byte logical blocks: (16.8 MB/16.0 MiB)
[ 4264.839903] sd 6:0:0:0: [sdb] Write Protect is off
[ 4264.839910] sd 6:0:0:0: [sdb] Mode Sense: 0f 00 00 00
[ 4264.955355] sd 6:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 4265.188475] sdb:
[ 4265.427354] sd 6:0:0:0: [sdb] Attached SCSI removable disk
Bus 001 Device 017: ID 1d6b:0104 Linux Foundation Multifunction Composite Gadget
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0104 Multifunction Composite Gadget
bcdDevice 1.00
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0040
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 4
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 1 Keyboard
iInterface 5
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.01
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 63
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 4
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 4
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 7
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
-
lsusb -t
, Plugged into port 7
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
|__ Port 7: Dev 17, If 0, Class=Human Interface Device, Driver=usbhid, 480M
|__ Port 7: Dev 17, If 1, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 11: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 11: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 13: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
These logs appear to be basically identical, which might make sense given that Linux appears to be using USB 2 regardless of which port is used.