usb: dwc3: Use pwr_evt_irq to wakeup if dp/dm directly connected to GIC
Currently support to enable/disable dplus hsphy irq and dminus hsphy
irq in case of resume/suspend is present only for pdc interrupts.
This support should be present even for non pdc interrupts if the
platform uses snps usb hs phy. Absence of this support leads to
dp/dm hsphy irq not being fired and usb stuck in lpm in host mode
eventhough there is a disconnect or remote wakeup issued from
hs/fs device connected to it. Hence add support to enable/disable
dp hsphy irq and dm hsphy irq for platforms that use snps hs phy.
On platforms which use snps phy and mpm interrupts, dp/dm lines are
directly connected to gic when cpu is active, mpm is involved only
when cpu is not active. Now in cpu active case, in host mode if usb
goes to lpm with hs/fs/ls device connected and unplug/remote wakeup
is issued, dp falling edge is monitored in software to detect that.
But GIC is not capable of detecting a falling edge. Hence this
change adds support to program power event irq to wakeup the system
in this case. Note that GIC takes care of dp rising edge wakeup
events like usb connect over otg when usb is in lpm and in host
mode. Only in case where dp falling edge is monitored i.e in case
of hs/fs/ls device connect and usb enteres lpm, then power event
irq is used to detect wakeup event as GIC cannot detect falling
edge.
Change-Id: I085b86c7df52daeedfb35cb71657c5163c2d5aaa
Signed-off-by:
Rohith Kollalsi <rkollals@codeaurora.org>
Loading
Please register or sign in to comment