aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Jun <b47624@freescale.com>2014-03-19 03:55:50 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 12:02:37 -0400
commit69dc55ea263ed13ef0c1a139cb250f0085f0aca0 (patch)
treeca37e9063bd0cc68c8751fba79517ddfaf1b7e88
parent8d1d156f0e5238faaf1f75a12b060e54e1766eae (diff)
ENGR00307558-11 Documentation: usb: add chipidea.txt for how to demo usb OTG HNP and SRP
This patch adds a file chipidea.txt for how to demo chipidea usb OTG HNP and SRP functions via sysfs input files, any other possible information should be documented for chipidea usb driver in future can be added into this file. Signed-off-by: Li Jun <b47624@freescale.com>
-rw-r--r--Documentation/usb/chipidea.txt71
1 files changed, 71 insertions, 0 deletions
diff --git a/Documentation/usb/chipidea.txt b/Documentation/usb/chipidea.txt
new file mode 100644
index 000000000000..4c0e2eaa5b29
--- /dev/null
+++ b/Documentation/usb/chipidea.txt
@@ -0,0 +1,71 @@
11. How to test OTG FSM(HNP and SRP)
2-----------------------------------
3To show how to demo OTG HNP and SRP functions via sys input files
4with 2 Freescale i.MX6Q sabre SD boards.
5
61.1 How to enable OTG FSM in menuconfig
7---------------------------------------
8Select CONFIG_USB_OTG_FSM.
9If you want to check some internal variables for otg fsm,
10select CONFIG_USB_CHIPIDEA_DEBUG, there are 2 files which
11can show otg fsm variables and some controller registers value:
12cat /sys/kernel/debug/ci_hdrc.0/otg
13cat /sys/kernel/debug/ci_hdrc.0/registers
14
151.2 Test operations
16-------------------
171) Power up 2 Freescale i.MX6Q sabre SD boards with gadget class driver loaded
18 (e.g. g_mass_storage).
19
202) Connect 2 boards with usb cable with one end is micro A plug, the other end
21 is micro B plug.
22
23 The A-device(with micro A plug inserted) should enumrate B-device.
24
253) Role switch
26 On B-device:
27 echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
28
29 if HNP polling is not supported, also need:
30 On A-device:
31 echo 0 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req
32
33 B-device should take host role and enumrate A-device.
34
354) A-device switch back to host.
36 On B-device:
37 echo 0 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
38
39 A-device should switch back to host and enumrate B-device.
40
415) Remove B-device(unplug micro B plug) and insert again in 10 seconds,
42 A-device should enumrate B-device again.
43
446) Remove B-device(unplug micro B plug) and insert again after 10 seconds,
45 A-device should NOT enumrate B-device.
46
47 if A-device wants to use bus:
48 On A-device:
49 echo 0 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop
50 echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req
51
52 if B-device wants to use bus:
53 On B-device:
54 echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
55
567) A-device power down the bus.
57 On A-device:
58 echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop
59
60 A-device should disconnect with B-device and power down the bus.
61
628) B-device does data pulse for SRP.
63 On B-device:
64 echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
65
66 A-device should resume usb bus and enumrate B-device.
67
681.3 Reference document
69----------------------
70"On-The-Go and Embedded Host Supplement to the USB Revision 2.0 Specification
71July 27, 2012 Revision 2.0 version 1.1a"