summaryrefslogtreecommitdiff
path: root/Documentation/usb/chipidea.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/usb/chipidea.txt')
-rw-r--r--Documentation/usb/chipidea.txt57
1 files changed, 24 insertions, 33 deletions
diff --git a/Documentation/usb/chipidea.txt b/Documentation/usb/chipidea.txt
index 5b3878cbf070..d0321e027661 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,29 +85,12 @@ compliant(with otg descriptor comply with USB OTG and EH 2.0 as a peripheral):
- ether
- serial
-1.5 Runtime enable and disable full HNP
----------------------------------------
-One more input file is created:
-/sys/bus/platform/devices/ci_hdrc.0/inputs/hnp_enable
-
-Defaultly USB OTG full HNP(do role switch by SW protocol, no need exchange OTG
-plug) is not enabled, user can enable or disable it after disconnect from other
-end device by:
- echo 1 or 0 > /sys/bus/platform/devices/ci_hdrc.0/inputs/hnp_enable
-If this input is 0, only OTG role switch by ID pin detection can be supported.
-
-1.6 Enable and test USB OTG ADP
-----------------------
-Enable:
-1) Enable OTG FSM as 1.1
-2) Add "adp-support" properity in dts for your hardware
-
-Test sequence:
-1) Connect 2 OTG devices, enable HNP by enable hnp_enable at 2 boards
- echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/hnp_enable
-2) After A-device ends session(remove B-device and wait 10s, or a_bus_drop)
-3) Remove B-device, B-device will show "OTG device detached".
-4) Insert B-device, A-device will enumerate B-device.
+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
-----------------------------------