From 730c618cbc0cfb03fde4aeaf2cb25ba836126c8f Mon Sep 17 00:00:00 2001 From: Li Jun Date: Fri, 3 Jul 2015 15:31:32 +0800 Subject: MLK-11123-32 Documentation: usb: chipidea: update for otg tests After introduce otg features in dts, and remove hnp_enable, we should update otg test document for how to enable HNP, SRP and ADP. Signed-off-by: Li Jun (cherry picked from commit 1fa2a00f64d4c1e56b71cf08e680f7bc9feff207) --- Documentation/usb/chipidea.txt | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) (limited to 'Documentation/usb') diff --git a/Documentation/usb/chipidea.txt b/Documentation/usb/chipidea.txt index 4e428212c60d..c7c16e79ba67 100644 --- a/Documentation/usb/chipidea.txt +++ b/Documentation/usb/chipidea.txt @@ -3,16 +3,14 @@ To show how to demo OTG HNP and SRP functions via sys input files with 2 Freescale i.MX6Q sabre SD boards. -1.1 How to enable OTG FSM in menuconfig +1.1 How to enable OTG HNP and SRP --------------------------------------- -Select CONFIG_USB_OTG_FSM, rebuild kernel Image and modules. -If you want to check some internal variables for otg fsm, -select CONFIG_USB_CHIPIDEA_DEBUG, there are 2 files which -can show otg fsm variables and some controller registers value: -cat /sys/kernel/debug/ci_hdrc.0/otg -cat /sys/kernel/debug/ci_hdrc.0/registers +Pass otg-rev to be 0x0200, remove srp-disable and hnp-disable in dts like below: +dr_mode = "otg"; +otg-rev = <0x0200>; +adp-disable; -1.2 Test operations +1.2 HNP and SRP test operations ------------------- 1) Power up 2 Freescale i.MX6Q sabre SD boards with gadget class driver loaded (e.g. g_mass_storage). @@ -64,12 +62,22 @@ cat /sys/kernel/debug/ci_hdrc.0/registers A-device should resume usb bus and enumrate B-device. -1.3 Reference document +1.3 Enable and test USB OTG ADP +---------------------- +Enable ADP in dts: +1) Based on 1.2, remove adp-disable in dts. + +Test sequence: +1) After A-device ends session(remove B-device and wait 10s, or a_bus_drop) +2) Remove B-device, B-device will show "OTG device detached". +3) Insert B-device, A-device will enumerate B-device. + +1.4 Reference document ---------------------- "On-The-Go and Embedded Host Supplement to the USB Revision 2.0 Specification July 27, 2012 Revision 2.0 version 1.1a" -1.4 OTG compliance test +1.5 OTG compliance test ---------------------- Only below 3 popular gadget drivers are declared to be USB OTG and EH 2.0 compliant(with otg descriptor comply with USB OTG and EH 2.0 as a peripheral): @@ -77,6 +85,13 @@ compliant(with otg descriptor comply with USB OTG and EH 2.0 as a peripheral): - ether - serial +1.6 Debug +If you want to check some internal variables for otg fsm, +Select CONFIG_USB_CHIPIDEA_DEBUG, there are 2 files which +can show otg fsm variables and some controller registers value: +cat /sys/kernel/debug/ci_hdrc.0/otg +cat /sys/kernel/debug/ci_hdrc.0/registers + 2. How to enable USB as system wakeup source ----------------------------------- Below is the example for how to enable USB as system wakeup source -- cgit v1.2.3