USB 2.0 High Speed Device SQ testing on Jetson TK1

When in recovery mode Tegra is enumerating as a device. Using the latest version of “HS Electrical Test Tool” I can send command for Device Descriptor, and I’m getting reply “Operation Successful” and displays the descriptor.
However, when I send command “Test Packet” the reply is “Operation Failed”. I need to execute this command successfully, so Tegra can start sending the test packets required for USB 2.0 HS Downstream Signal Quality (SQ).

How to make Tegra start sending test packet? If you have a tool that does it, could you please send me the link to download it?
Do I need a special FW/SW that enables sending test packages?

Thanks,
Don

It needs to set USB2_CONTROLLER_x_USB2D_PORTSC1_0 [19:16] = 0100b to generate test packet (Register name and setting (x = port where USB1=nothing, USB2=1 and USB3=2)), you can refer to page1169 of TRM. But i don’t think this can work in recovery mode, why do you want to test SQ in recovery mode?

Thank you for your reply!

I wanted to test in recovery mode because only at that time Tegra is acting as Device. Since I cannot send any commands to Tegra while in recovery mode, now I want to test it in Host Mode.
Following your suggestion, here is what I did:
The controller I want to test is USB1, the register I’m reading from and writing to is USB2_CONTROLLER_USB2D_PORTSC1_0 (TRM page 1045).
Reading from it: sudo devmem2 0x01000174 w returns value 0x0
Writing to it to start sending test packet: sudo devmem2 0x01000174 w 0x40000 returns that the new value is 0x40000, but I do not see on my scope test packet showing up. Then when I repeat the reading command, returns again value 0x0.
I repeated the same with starting address 0x0100000, reading and writing from address 0x7d000174 – I was not sure if I have to use Offset Start (0x7d00000) or Address Start (0x7d00000) [TRM page 24]. The result was the same – cannot start sending test packet.
From the USB2.0 spec, page 435 I understood that port shell be suspended and then command to start test packet send. I’m assuming that for suspending mode I have to modify register USB1_IF_USB_SUSP_CTRL_0, bit 25 [TMR page 1073], then send the command to start sending test packet.
Could you please comment on if I’m on the right track of making Tegra start sending test packet? If you know the commands would you be able to share them with me?

Hi dinkomy,

Please get the Tegra K1 USB 2.0 Compliance Test Tools from Embedded Download Center as reference.

Tools link: http://developer.nvidia.com/embedded/dlc/tegra-k1-USB-2-Compliance-Test-Tools

Thanks

Note that if you just want device mode, the port is OTG, and “/sys” access allows setting to device mode for use with the Linux USB gadget interface…so there is a second way to get to device mode.