diff options
author | Li Jun <B47624@freescale.com> | 2014-09-10 17:49:33 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@nxp.com> | 2016-01-14 10:59:08 -0600 |
commit | 7d05fa49c2651decdc3eb3606a4a0efa2b6a180a (patch) | |
tree | 6a5f00e890c176ecbfbebb6bd2a624e7a1b0efea /drivers/usb/chipidea/otg_fsm.c | |
parent | 71b7292c608ca8436d2ea33a491524440ba2b3ae (diff) |
MLK-11340-42 usb: chipidea: usb vbus glitch check logic change
This patch changes the vbus glitch check to cover usb otg certification
case, so the possible cases of vbus rise:
- USB vbus can reach AVV(4.4v), valid vbus.
- USB vbus keeps above BSV(0.8v) but lower than AVV(4.4v) for
more than 300ms, we think it's valid vbus event, this can meet
usb otg certificataion case(B device can do connection in 1s when
vbus is 4.0v).
- USB vbus cannot be kept above BSV(0.8v) for more than 300ms,
it's a vbus glitch.
In case of vbus drop: if the vbus on flag is not set, it's a vbus glitch,
otherwise it's a valid vbus drop event.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit de5ab444839b6d1492d697256ea2b8a1dcaffc62)
(cherry picked from commit 83788415169cfa1555dd348a9ff03deb66b08bad)
Diffstat (limited to 'drivers/usb/chipidea/otg_fsm.c')
-rw-r--r-- | drivers/usb/chipidea/otg_fsm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c index e3886cde4cb5..73096407575e 100644 --- a/drivers/usb/chipidea/otg_fsm.c +++ b/drivers/usb/chipidea/otg_fsm.c @@ -800,13 +800,15 @@ irqreturn_t ci_otg_fsm_irq(struct ci_hdrc *ci) } } else if (otg_int_src & OTGSC_BSVIS) { hw_write_otgsc(ci, OTGSC_BSVIS, OTGSC_BSVIS); - ci->vbus_glitch_check_event = true; if (!(otgsc & OTGSC_BSV) && fsm->b_sess_vld) { + ci->b_sess_valid_event = true; fsm->b_sess_vld = 0; if (fsm->id) ci_otg_add_timer(ci, B_SSEND_SRP); if (fsm->b_bus_req) fsm->b_bus_req = 0; + } else { + ci->vbus_glitch_check_event = true; } } else if (otg_int_src & OTGSC_AVVIS) { hw_write_otgsc(ci, OTGSC_AVVIS, OTGSC_AVVIS); |