FSL-UT-USB-034-Remote-Wakeup-Regression-Test
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[cols=">s,6a",frame="topbot",options="header"]
|====================================================================
|Name | Description

| Summary |
Remote Wakeup Regression Test

| Automated |
Yes

| Kernel Config Option |

| Software Dependency |
N/A

| Non-default Hardware Configuration |
N/A

| Test Procedure |
1. Prepare a USB host which featured with remote wakeup alternatively, You can
use another i.mx board as USB device.

2. Boot up both boards, and connect two boards with USB cable.

3. At device side, do below commands:
modprobe g_zero autoresume=3  max_autoresume=8 autoresume_interval_ms=1
we can use the above three parameters to control device send resume signal time.
Autoresume is the minimum number of seconds before sending resume signal,
and the time before sending resume signal will automatically increase according
to interval value, the endms is the max number of seconds before sending
resume signal.

4. At host side, first do below command:
echo enabled > /sys/bus/platform/devices/20c9000.usbphy/power/wakeup
echo enabled > /sys/bus/platform/devices/2184000.usb/power/wakeup
echo enabled > /sys/bus/platform/devices/ci_hdrc.0/power/wakeup
echo enabled > /sys/bus/usb/devices/usb2/power/wakeup
echo enabled > /sys/bus/usb/devices/2-1/power/wakeup
And you need build a test script to repeat standby the system like below:
while [ 1 ] ;do echo mem  > /sys/power/state;sleep 5 ;done
Then run the test script.

5. Then USB device will enter the suspended state ,and autoresume
milliseconds later,the device will send resume signal to wake up host.
6. The expected behavior is: the host device be waked up, and there is not
re-enumeration happens.
7. The host will enter suspended state again,and test case will repeat step
5 and step 6.
8. Do the same test with HUB connected.

| Expected Result |
See setp 5-7.

|====================================================================

<<<
