Directly manipulate the controller regsiter to suspend the usb bus
for HNP is not the proper way, this should be done through the usbcore
by usb autosuspend. So to start HNP, autosuspend support should be
added for OTG devices interface driver if it's not enabled.
Signed-off-by: L
Set ci->hcd and ci->otg.host to be null in host_stop since the
hcd already freed.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/host.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index 3d24304..053bac9 100644
--- a/drive
Initialize vbus_value to be 0 since it's possible not to assign
any value before judgement.
Signed-off-by: Li Jun
---
drivers/usb/phy/phy-mxs-usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c
index c2
retval is assigned to be -EOVERFLOW but is overwritten later before
it's used, remove this unused value assignment.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/udc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index f3
Initialize vbus_value to be 0 since it's possible not to assign
any value before judgement.
Signed-off-by: Li Jun
diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c
index c2936dc..00bfea0 100644
--- a/drivers/usb/phy/phy-mxs-usb.c
+++ b/drivers/usb/phy/phy-mxs-
Add 2 flags for USB OTG HNP polling, hnp_polling_support is to indicate
if the gadget can support HNP polling, host_request_flag is used for
gadget to store host request information from application, which can be
used to respond to HNP polling from host.
Acked-by: Peter Chen
Signed-off-by: Li
this timing issue.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg_fsm.c | 12 ++--
drivers/usb/chipidea/otg_fsm.h | 2 ++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c
index 9a963a7..de8e22e 100644
--- a
Add A-idle to B-disconnect timer, B-device detects that bus is idle
for more than TB_AIDL_BDIS min and begins HNP by turning off pullup
on D+. This allows the bus to discharge to the SE0 state.
Signed-off-by: Li Jun
---
include/linux/usb/otg-fsm.h | 1 +
1 file changed, 1 insertion(+)
diff
Update HNP test procedure as HNP polling is supported.
Acked-by: Peter Chen
Signed-off-by: Li Jun
---
Documentation/usb/chipidea.txt | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/Documentation/usb/chipidea.txt b/Documentation/usb/chipidea.txt
index 05f735a
If gadget with HNP polling support receives GetStatus request of otg
status selector, it feedback to host with host request flag to indicate
if it wants to take host role.
Acked-by: Peter Chen
Signed-off-by: Li Jun
---
drivers/usb/gadget/composite.c | 25 +
1 file
-by: Li Jun
---
drivers/usb/common/usb-otg-fsm.c | 87
include/linux/usb/otg-fsm.h | 14 +++
2 files changed, 101 insertions(+)
diff --git a/drivers/usb/common/usb-otg-fsm.c b/drivers/usb/common/usb-otg-fsm.c
index 61d538a..504708f 100644
--- a
Enable HNP polling support for chipidea gadget and allocate memory
for host request flag when otg fsm init.
Acked-by: Peter Chen
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg_fsm.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb
Since gadget driver will handle this request, so controller driver bypass
it.
Acked-by: Peter Chen
Signed-off-by: Li Jun
---
drivers/usb/chipidea/udc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 3eafa2c
A host is required to use the GetStatus command, with wIndex set to the
OTG status selector(F000H) to request the Host request flag from the
peripheral.
Acked-by: Peter Chen
Signed-off-by: Li Jun
---
include/uapi/linux/usb/ch9.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi
a.txt in patch 8/8.
- Fix some typo.
- Add Peter's Ack in patch 1,2,4,5,6,7/8 of the series.
Li Jun (10):
usb: gadget: add hnp_polling_support and host_request_flag in
usb_gadget
usb: add OTG status selector definition for HNP polling
usb: common: otg-fsm: add HNP polling sup
Set host_request_flag if the current peripheral wants to take host role
via changing a_bus_req or b_bus_req by user application.
Acked-by: Peter Chen
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg_fsm.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a
a.txt in patch 8/8.
- Fix some typo.
- Add Peter's Ack in patch 1,2,4,5,6,7/8 of the series.
Li Jun (10):
usb: gadget: add hnp_polling_support and host_request_flag in
usb_gadget
usb: add OTG status selector definition for HNP polling
usb: common: otg-fsm: add HNP polling support
usb
Add 2 flags for USB OTG HNP polling, hnp_polling_support is to indicate
if the gadget can support HNP polling, host_request_flag is used for
gadget to store host request information from application, which can be
used to respond to HNP polling from host.
Acked-by: Peter Chen
Signed-off-by: Li
A host is required to use the GetStatus command, with wIndex set to the
OTG status selector(F000H) to request the Host request flag from the
peripheral.
Acked-by: Peter Chen
Signed-off-by: Li Jun
---
include/uapi/linux/usb/ch9.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi
-by: Li Jun
---
drivers/usb/common/usb-otg-fsm.c | 87
include/linux/usb/otg-fsm.h | 14 +++
2 files changed, 101 insertions(+)
diff --git a/drivers/usb/common/usb-otg-fsm.c b/drivers/usb/common/usb-otg-fsm.c
index 61d538a..504708f 100644
--- a
Since gadget driver will handle this request, so controller driver bypass
it.
Acked-by: Peter Chen
Signed-off-by: Li Jun
---
drivers/usb/chipidea/udc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 00250ab
Enable HNP polling support for chipidea gadget and allocate memory
for host request flag when otg fsm init.
Acked-by: Peter Chen
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg_fsm.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb
this timing issue.
Acked-by: Peter Chen
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg_fsm.c | 12 ++--
drivers/usb/chipidea/otg_fsm.h | 2 ++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c
index 9a963a7
Add A-idle to B-disconnect timer, B-device detects that bus is idle
for more than TB_AIDL_BDIS min and begins HNP by turning off pullup
on D+. This allows the bus to discharge to the SE0 state.
Acked-by: Peter Chen
Signed-off-by: Li Jun
---
include/linux/usb/otg-fsm.h | 1 +
1 file changed, 1
If gadget with HNP polling support receives GetStatus request of otg
status selector, it feedback to host with host request flag to indicate
if it wants to take host role.
Acked-by: Peter Chen
Signed-off-by: Li Jun
---
drivers/usb/gadget/composite.c | 25 +
1 file
Update HNP test procedure as HNP polling is supported.
Acked-by: Peter Chen
Signed-off-by: Li Jun
---
Documentation/usb/chipidea.txt | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/Documentation/usb/chipidea.txt b/Documentation/usb/chipidea.txt
index 05f735a
Set host_request_flag if the current peripheral wants to take host role
via changing a_bus_req or b_bus_req by user application.
Acked-by: Peter Chen
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg_fsm.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a
Add compatible string for imx7d-usbmisc.
Signed-off-by: Li Jun
---
Documentation/devicetree/bindings/usb/usbmisc-imx.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/usb/usbmisc-imx.txt
b/Documentation/devicetree/bindings/usb/usbmisc-imx.txt
index
As all usb power supply use low active for over current flag on imx6
imx7 boards, and the default register setting(0) is for high active,
this patch is to correct it.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/usbmisc_imx.c | 18 --
1 file changed, 16 insertions(+), 2
Add compatible string for imx7d-usbmisc.
Signed-off-by: Li Jun
---
Documentation/devicetree/bindings/usb/usbmisc-imx.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/usb/usbmisc-imx.txt
b/Documentation/devicetree/bindings/usb/usbmisc-imx.txt
index
With over-current-polarity property added, imx usb over current
polarity can be configed to be low or high active, since the default
setting value(0) is for active high, so keep this setting for those
legacy platforms without this property specified.
Signed-off-by: Li Jun
---
drivers/usb
Adding over-current-polarity to indicate the over current flag
is low active or high active.
Signed-off-by: Li Jun
---
Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
b
Set OTG2 over current flag to be active low, OTG1 OC is not used
by default.
Signed-off-by: Li Jun
---
arch/arm/boot/dts/imx7d-sdb.dts | 8
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/imx7d-sdb.dts b/arch/arm/boot/dts/imx7d-sdb.dts
index b267f79..44ed399 100644
Adding over-current-active-high to indicate the over current flag
is high active as typically we use active low for over current
polarity.
Signed-off-by: Li Jun
---
Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation
Add compatible string for imx7d-usbmisc.
Acked-by: Rob Herring
Signed-off-by: Li Jun
---
Documentation/devicetree/bindings/usb/usbmisc-imx.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/usb/usbmisc-imx.txt
b/Documentation/devicetree/bindings/usb
current is enabled.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/ci_hdrc_imx.c | 3 +++
drivers/usb/chipidea/ci_hdrc_imx.h | 1 +
drivers/usb/chipidea/usbmisc_imx.c | 22 +-
3 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c
b
When the controller is configured to be dual role and it's in host mode,
if bind udc and gadgt driver, those gadget operations will do gadget
disconnect and finally pull down DP line, which will break host function.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/udc.c | 7 +--
1
When the controller is configured to be dual role and it's in host mode,
if bind udc and gadgt driver, those gadget operations will do gadget
disconnect and finally pull down DP line, which will break host function.
Cc: # 4.1+
Signed-off-by: Li Jun
---
drivers/usb/chipidea/udc.c | 7 +
ed set
pull_dp_for_charger flag, tested with i.mx7d, support for i.mx6 will
be added later.
This patch set is based on Baolin's usb charger framework:
http://comments.gmane.org/gmane.linux.power-management.general/74394
Li Jun (5):
usb: chipidea: add usb charger detection support
usb: ch
Some imx usb charger dectection need software implement the whole process,
during which, pull up&down DP line via usb core is required.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/ci_hdrc_imx.c | 43 ++
drivers/usb/chipidea/ci_hdrc_imx.h | 3 +++
dri
Some usb module implementations has functionality of detect usb charger
type, it can be used by usb charger framework to report max current drawn
from charger in different situations.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/udc.c | 40
include
Set this property if your usb module has usb charger detect function
and you want to use it.
Signed-off-by: Li Jun
---
Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
b
Add imx7d usbmisc compatible string.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/usbmisc_imx.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/chipidea/usbmisc_imx.c
b/drivers/usb/chipidea/usbmisc_imx.c
index 3d70712..daa7c02 100644
--- a/drivers/usb/chipidea
Adds imx7d usb charger detection implementation, which needs pull up
DP line before do secondary detection and pull down DP afterwards.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/ci_hdrc_imx.c | 3 +-
drivers/usb/chipidea/usbmisc_imx.c | 157 +
2 files
Some imx usb charger dectection need software implement the whole process,
during which, pull up&down DP line via chipidea usb core is required.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/ci_hdrc_imx.c | 44 ++
drivers/usb/chipidea/ci_hdrc_imx.h
Adds imx7d usb charger detection implementation, which needs pull up
DP line before do secondary detection and pull down DP afterwards.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/ci_hdrc_imx.c | 3 +-
drivers/usb/chipidea/usbmisc_imx.c | 161 +
2 files
Some usb module implementations have functionality of detect usb charger
type, it can be used by usb charger framework to report max current drawn
from charger in different situations.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/udc.c | 40
include
Set this property if your usb module has usb charger detect function
and you want to use it.
Signed-off-by: Li Jun
---
Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
b
name to be more readable,
- Add comments for 2 added api and 1 flag in ci_hdrc_platform_data.
Li Jun (4):
usb: chipidea: add usb charger detection support
usb: chipidea: imx: add usb charger dectection for imx platforms
usb: chipidea: imx: add usb charger detection for imx7d
doc: usb: ci-hdr
Gadget state is set to be suspended when bus suspened, but not updated
after resume, this patch saves the gadget state before suspend and
restores it after resume.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/ci.h | 2 ++
drivers/usb/chipidea/udc.c | 21 +
2 files
Leave vbus on/off hanlded by OTG fsm if in OTG mode, init OTG port number.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/host.c | 13 +
drivers/usb/chipidea/host.h |9 +
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/chipidea/host.c b
This patch adds OTG fsm related initizations when do otg init,
add a seperate file for OTG fsm related utilities.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/Makefile |1 +
drivers/usb/chipidea/ci.h |1 +
drivers/usb/chipidea/otg.c |6 +++
drivers/usb/chipidea/otg_fsm.c
Add b_hnp_enable request handling and enable gadget->is_otg
Signed-off-by: Li Jun
---
drivers/usb/chipidea/udc.c | 11 ++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 73a39ef..ccdc277 100644
--
.
Reference to:
"On-The-Go and Embedded Host Supplement to the USB Revision 2.0 Specification
July 27, 2012
Revision 2.0 version 1.1a"
Li Jun (10):
usb: otg-fsm: update OTG HNP state transition conditions according to
OTG and EH 2.0 spec.
usb: chipidea: usb OTG fsm initlizat
a_idle if a_wait_vfall_tmout
Signed-off-by: Li Jun
---
drivers/usb/phy/phy-fsm-usb.c |9 +
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/phy/phy-fsm-usb.c b/drivers/usb/phy/phy-fsm-usb.c
index 7aa314e..c47e5a6 100644
--- a/drivers/usb/phy/phy-fsm-usb.c
+++ b/drivers/u
This patch add OTG HNP polling support for both A and B device.
After A/B in host state, host request polling message will be sent
from host to peripheral every 1.5s, if host found the host request
flag is set to be 1 by peripheral, a role switch will be started.
Signed-off-by: Li Jun
This patch add a debug file for OTG vairables show and registers dump.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/debug.c | 100 ++
1 files changed, 100 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea
USB OTG interrupt handling and fsm transition according to USB OTG
spec 2.0, update otg timer time out handlers.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/bits.h|3 +
drivers/usb/chipidea/core.c| 10 ++-
drivers/usb/chipidea/otg.c |6 +
drivers/usb/chipidea/otg_fsm.c
This patch adds OTG fsm timers initialization, which use controller's 1ms
interrupt as time out counter, also adds some local timers which are not
in otg_fsm_timer list.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg_fsm.c | 111 +++-
driver
Add OTG HNP and SRP operation functions implementation:
- charge vbus
- drive vbus
- connection signaling
- drive sof
- start data pulse
- add fsm timer
- delete fsm timer
- start host
- start gadget
Signed-off-by: Li Jun
---
drivers/usb/chipidea/bits.h| 11 ++
drivers/usb/chipidea
This patch adds sys input to control and show OTG fsm inputs by application,
user can do host and preipheral role switch by change these inputs.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg.c |1 +
drivers/usb/chipidea/otg_fsm.c | 204
USB OTG interrupt handling and fsm transition according to USB OTG
spec 2.0, update otg timer timeout handlers.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/bits.h|2 +
drivers/usb/chipidea/core.c| 10 ++-
drivers/usb/chipidea/otg.c |9 ++-
drivers/usb/chipidea/otg_fsm.c
Add b_hnp_enable request handling and enable gadget->is_otg
Signed-off-by: Li Jun
---
drivers/usb/chipidea/udc.c | 11 ++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 80de2f8..b08ab1d 100644
--
This patch add a debug file for OTG vairables show and registers dump.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/debug.c | 102 ++
1 files changed, 102 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea
can exist in one system
- Change some otg fsm functions to be static
- Re-split timer init patch to avoid a later patch changing a previous one
in the same series
- Change timer structure memory allocation to be devm_kzalloc
- Update some format alignment and spelling errors
Li Jun (9):
us
This patch adds OTG fsm timers initialization, which use controller's 1ms
interrupt as timeout counter, also adds some local timers which are not
in otg_fsm_timer list.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/bits.h|1 +
drivers/usb/chipidea/otg_fsm.c |
Leave vbus on/off hanlded by OTG fsm if in OTG mode, init OTG port number.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/host.c | 13 +
drivers/usb/chipidea/host.h |9 +
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/chipidea/host.c b
This patch adds OTG fsm related initizations when do otg init,
add a seperate file for OTG fsm related utilities.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/Makefile |1 +
drivers/usb/chipidea/ci.h |1 +
drivers/usb/chipidea/otg.c |7
drivers/usb/chipidea
Add OTG HNP and SRP operation functions implementation:
- charge vbus
- drive vbus
- connection signaling
- drive sof
- start data pulse
- add fsm timer
- delete fsm timer
- start host
- start gadget
Signed-off-by: Li Jun
---
drivers/usb/chipidea/bits.h| 11 ++
drivers/usb/chipidea/ci.h
a_idle if a_wait_vfall_tmout
Signed-off-by: Li Jun
---
drivers/usb/phy/phy-fsm-usb.c |9 +
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/phy/phy-fsm-usb.c b/drivers/usb/phy/phy-fsm-usb.c
index 7aa314e..c47e5a6 100644
--- a/drivers/usb/phy/phy-fsm-usb.c
+++ b/drivers/u
This patch adds sys input to control and show OTG fsm inputs by application,
user can do host and preipheral role switch by change these inputs.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg.c |1 +
drivers/usb/chipidea/otg_fsm.c | 192
This patch adds HNP polling operation function for OTG fsm.
Signed-off-by: Li Jun
---
drivers/usb/phy/phy-fsm-usb.c |2 ++
include/linux/usb/otg-fsm.h |9 +
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/phy/phy-fsm-usb.c b/drivers/usb/phy/phy-fsm
the HNP polling patch in V1([PATCH 08/10] usb: chipidea: add OTG HNP
polling support)
Li Jun (6):
usb: otg-fsm: add HNP polling operation function.
usb: otg-fsm: add host request flag for HNP polling.
usb: chipidea: udc: add OTG status request handling.
usb: chipidea: set host request flag
This patch adds host request flag in usb_gadget and clears it when leaves
host state in OTG fsm driver, which will be set in gadget driver if the
peripheral wishes to become host.
Signed-off-by: Li Jun
---
drivers/usb/phy/phy-fsm-usb.c |4
include/linux/usb/gadget.h|1
This patch sets host request flag in sys input when a A device
set a_bus_req or a B device set b_bus_req in peripheral role.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg_fsm.c | 12 +++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/chipidea
Peripheral answers OTG status selector request from host according to
host request flag of gadget, this flag may be set via kernel interface
by application.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/udc.c | 12 ++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a
This patch implements OTG host request polling and does role switch
when peripheral sets the host request flag.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/ci.h |1 +
drivers/usb/chipidea/otg_fsm.c | 81
drivers/usb/chipidea/otg_fsm.h
This patch adds a timer in otg_fsm structure, with this timer, host
can query the peripheral if it wishes to become host periodically.
Signed-off-by: Li Jun
---
include/linux/usb/otg-fsm.h |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/linux/usb/otg-fsm.h b
un "git am --skip".
> To restore the original branch and stop patching run "git am --abort".
>
> Peter
>
I rebased my patchset to be latest greg's usb-next just now,
no conflicts or error found.
> On Mon, Jan 20, 2014 at 09:56:16AM +0800, Li Jun wrote:
&g
On Sat, Feb 08, 2014 at 03:04:52PM +0800, Peter Chen wrote:
> On Mon, Jan 20, 2014 at 09:56:14AM +0800, Li Jun wrote:
> > Leave vbus on/off hanlded by OTG fsm if in OTG mode, init OTG port number.
> >
>
> It is better split this to two patches, one for vbus, another is for
&
On Sat, Feb 08, 2014 at 03:00:35PM +0800, Peter Chen wrote:
> On Mon, Jan 20, 2014 at 09:56:11AM +0800, Li Jun wrote:
> > This patchset adds USB OTG HNP and SRP support on chipidea usb driver,
> > existing OTG port role swtich function by ID pin status kept unchanged,
> > bas
in ci_hdrc,
to make multiple OTG instances can exist in one system
- Change some otg fsm functions to be static
- Re-split timer init patch to avoid a later patch changing a previous one
in the same series
- Change timer structure memory allocation to be devm_kzalloc
- Update some format alignment and
a_idle if a_wait_vfall_tmout
Signed-off-by: Li Jun
---
drivers/usb/phy/phy-fsm-usb.c |9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/phy/phy-fsm-usb.c b/drivers/usb/phy/phy-fsm-usb.c
index 7aa314e..c47e5a6 100644
--- a/drivers/usb/phy/phy-fsm-usb.c
+++ b/drivers/u
This patch move usb interrupt enable and status register read functions
from udc driver to core driver to use them in all ci drivers.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/ci.h |4
drivers/usb/chipidea/core.c | 20
drivers/usb/chipidea/udc.c | 20
Leave vbus on/off hanlded by OTG fsm if in OTG mode.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/host.c |6 +++---
drivers/usb/chipidea/host.h |9 +
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index
Add b_hnp_enable request handling and enable gadget->is_otg
Signed-off-by: Li Jun
---
drivers/usb/chipidea/udc.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index fe30dcc..602bbf3 100644
--- a/driv
Init otg_port number of otg capable host to be 1 at host start.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/host.c |7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index 4b609bc..5ec8ccd 100644
--- a
This patch adds OTG fsm related initialization when do otg init,
add a seperate file for OTG fsm related utilities.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/Makefile |1 +
drivers/usb/chipidea/ci.h |1 +
drivers/usb/chipidea/otg.c |7 +
drivers/usb/chipidea
Add OTG HNP and SRP operation functions implementation:
- charge vbus
- drive vbus
- connection signaling
- drive sof
- start data pulse
- add fsm timer
- delete fsm timer
- start host
- start gadget
Signed-off-by: Li Jun
---
drivers/usb/chipidea/bits.h| 11 ++
drivers/usb/chipidea/ci.h
This patch adds sysfs interface description for chipidea USB OTG role switch
in HNP.
Signed-off-by: Li Jun
---
.../ABI/testing/sysfs-platform-chipidea-usb-otg| 55
1 file changed, 55 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-platform-chipidea-usb-otg
USB OTG interrupt handling and fsm transition according to USB OTG
and EH 2.0, update otg timer timeout handlers.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/core.c| 10 ++-
drivers/usb/chipidea/otg.c |9 +-
drivers/usb/chipidea/otg_fsm.c | 191
This patch adds sys input to control and show OTG fsm inputs by application,
user can do host and preipheral role switch by change these inputs.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg.c |1 +
drivers/usb/chipidea/otg_fsm.c | 192
This patch adds OTG fsm timers initialization, which use controller's 1ms
interrupt as timeout counter, also adds some local timers which are not
in otg_fsm_timer list.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/bits.h|1 +
drivers/usb/chipidea/otg_fsm.c |
This patch adds a debug file for OTG vairables show.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/debug.c | 85 ++
1 file changed, 85 insertions(+)
diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c
index 96d899a..06be301 100644
This patch adds below registers dump for debug:
- USBINTR
- USBSTS
- USBMODE
- USBCMD
- PORTSC
- OTGSC
Signed-off-by: Li Jun
---
drivers/usb/chipidea/debug.c | 48 ++
1 file changed, 48 insertions(+)
diff --git a/drivers/usb/chipidea/debug.c b/drivers
On Mon, Feb 10, 2014 at 10:32:24AM +0800, Peter Chen wrote:
> On Mon, Jan 20, 2014 at 09:56:18AM +0800, Li Jun wrote:
> > USB OTG interrupt handling and fsm transition according to USB OTG
> > spec 2.0, update otg timer timeout handlers.
>
> USB OTG and EH 2.0
>
changed.
On Wed, Mar 05, 2014 at 04:28:14PM +0800, Peter Chen wrote:
> On Thu, Feb 27, 2014 at 07:38:25AM +0800, Li Jun wrote:
> > Add OTG HNP and SRP operation functions implementation:
> > - charge vbus
> > - drive vbus
> > - connection signaling
> > - drive sof
> >
This patch adds below registers dump for debug:
- USBINTR
- USBSTS
- USBMODE
- USBCMD
- PORTSC
- OTGSC
Signed-off-by: Li Jun
---
drivers/usb/chipidea/debug.c | 49 ++
1 file changed, 49 insertions(+)
diff --git a/drivers/usb/chipidea/debug.c b/drivers
This patch moves usb interrupt enable and status register read functions
from udc driver to core driver to use them in all ci drivers.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/ci.h |4
drivers/usb/chipidea/core.c | 20
drivers/usb/chipidea/udc.c | 20
From: Li Jun
Use a more general way to read and write otgsc register.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/core.c | 19 +
drivers/usb/chipidea/otg.c | 48 +++
drivers/usb/chipidea/otg.h | 19 +++--
drivers
1 - 100 of 791 matches
Mail list logo