i.MX8M USB 3.0 Compliance Mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX8M USB 3.0 Compliance Mode

Jump to solution
2,253 Views
MichaelEvertz
Contributor I

Hi everyone,

we want to do USB 3.0 compliance tests for our i.MX8M Product and we are especially interested in the Eye-Diagram-Tests.

On our device we have one USB-A-Port and one USB-C-Port which shall only operate in device mode. Both ports are connected to the SoC (no USB-Hub).

On the USB-C Port we use the PTN5150 for CC logic which is strapped to operate in UFP mode and the PTN36043. We do not have any circuitry to generate VBUS for this port.

For normal operation both ports work as expected.

For the first test run we were told by the external test-engineer that we did not have to do anything on the device side for the compliance test and therefore we did not investigate any further. It turned out that this was wrong as our device was not entering compliance mode neither on the USB-A-Host-Port nor on the USB-C-Device-Port.

Before we start a second test run we want to be sure that we have all the tools and information to get the device into compliance mode.

According to AN12409 we can enable compliance mode for host mode by writing register PORTSC_30. I tried that on our device (without the test-fixture but a USB-Drive connected) but cannot read back that the Port is in compliance mode:

root@imx8m:~# cat /sys/kernel/debug/38200000.usb/mode
host
root@imx8m:~# /unit_tests/memtool -32 0x38200430=0xa010340
Writing 32-bit value 0xA010340 to address 0x38200430
root@imx8m:~# /unit_tests/memtool -32 0x38200430 1
E
Reading 0x1 count starting at address 0x38200430

0x38100430: 0A001203

Is this the expected behavior without the test-fixture or am I doing something wrong?

Another question is about the USB-C-Port in device mode. AN12409 does not have any instructions to enable compliance mode in device mode just to start a gadget configuration via the configfs.sh script. We did not use this script but have our own gadget configuration (Ethernet ECM) preconfigured. What do we need to do in order to enable the compliance mode? Would it be an option to configure the port for host mode (set PTN5150 to DFP mode via I2C-Access) and try the host mode configuration?

Any help is appreciated.

Best regards,
Michael

0 Kudos
1 Solution
2,237 Views
MichaelEvertz
Contributor I

Just for information if anyone is interested:

In our second test run USB-C port test did work without any modification on the software side, there must have been something wrong with the test setup in the first run.

For the USB-A port enabling compliance mode via register 0x38200430 worked and the device entered compliance mode once the test-fixture was connected. With the test-fixture connected we could also read back that compliance mode was active by reading the register again.

For both tests the "Compliance" mode was also indicated in /sys/kernel/debug/38x00000.usb/link_state when active.

Best regards,

Michael

View solution in original post

1 Reply
2,238 Views
MichaelEvertz
Contributor I

Just for information if anyone is interested:

In our second test run USB-C port test did work without any modification on the software side, there must have been something wrong with the test setup in the first run.

For the USB-A port enabling compliance mode via register 0x38200430 worked and the device entered compliance mode once the test-fixture was connected. With the test-fixture connected we could also read back that compliance mode was active by reading the register again.

For both tests the "Compliance" mode was also indicated in /sys/kernel/debug/38x00000.usb/link_state when active.

Best regards,

Michael