usb: dwc3: rockchip-inno: support to set testmodes via debugfs
This patch create host_testmode file in debugfs for
USB HOST. It's useful for us to use a scope to verify
signal integrity for USB2/USB3 HOST.
For example, set testmodes for rk3328 board USB:
1. set test packet for the USB2 port of USB3 interface:
echo test_packet > /sys/kernel/debug/usb.23/host_testmode
2. set compliance mode for the USB3 port of USB3 interface:
echo test_u3 > /sys/kernel/debug/usb.23/host_testmode
3. check the testmode status:
cat /sys/kernel/debug/usb.23/host_testmode
The log maybe like this:
U2: test_packet /* means that U2 in test mode */
U3: compliance mode /* means that U3 in test mode */
Change-Id: I6ddead14a7b78a011bbffcec6bf865df0632fe1b
Signed-off-by: William Wu <wulf@rock-chips.com>