Skip to content

USB: Implement runtime idling and remote wakeup for OMAP EHCI controller

Roger Quadros linux-arm-kernel linux-omap lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 13 repliesIn review

Changes in v1 from the cover letter

- addressed review comments on RFC patchset
- Special case handling of controllers that can generate wakeup IRQ when suspended is done in HCD core instead of ehci-hcd.
- Patches based on linus/master commit 496322bc91e35007ed754184dcd447a02b6dd685 with the following patches on top

[1] - OMAP pinctrl wakeup support
http://thread.gmane.org/gmane.linux.ports.arm.omap/99010/focus=99041
This does not apply cleanly though. Tony has agreed to post a revision anytime soon.

[2] - [PATCH v5 0/2] ARM: dts: Add USB host support for Beagle-xm
http://thread.gmane.org/gmane.linux.drivers.devicetree/39291

[3] - USB-EHCI-Fix-resume-signalling-on-remote-wakeup.patch
http://thread.gmane.org/gmane.linux.usb.general/89608

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6ARM: OMAP3: Enable Hardware Save and Restore for USB Hostarch/arm/mach-omap2/powerdomains3xxx_data.c+1 -70 replies
2/6ARM: dts: omap3beagle-xm: Add idle state pins for USB hostarch/arm/boot/dts/omap3-beagle-xm.dts+23 -60 replies
3/6mfd: omap-usb-host: move initialization to module_init()drivers/mfd/omap-usb-host.c drivers/mfd/omap-usb-tll.c+5 -380 replies
4/6mfd: omap-usb-host: Put pins in IDLE state on suspenddrivers/mfd/omap-usb-host.c+22 -02 replies
5/6USB: Support wakeup IRQ for suspended controllersdrivers/usb/core/hcd.c include/linux/usb/hcd.h+23 -14 replies
6/6USB: ehci-omap: Implement suspend/resumedrivers/usb/host/ehci-omap.c+62 -27 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] USB: Implement runtime idling and remote wakeup for OMAP EHCI controller

Hi,

This series implements suspend/resume for the OMAP EHCI host controller during runtime idle. This will cause its parent, the OMAP USB Host Module as well as the USB TLL Module to be put in suspend and hence allow the USB power domain to be put in a lower power state. Then we no longer prevent the rest of the OMAP SoC from entering lower power states like RETention or OFF mode when USB (or system) is suspended. This was one of the main reason why EHCI_OMAP is still not enabled in OMAP2 defconfig.

In order for remote wakeup or hub events (connect/disconnect) to be detected while in suspend, we need to rely on the IO daisy chaining mechanism on OMAP. This is nothing but configuring a pin to be wakeup capable and triggering an interrupt on any pin activity while the hardware module or the entire SoC is in sleep state. For this to work, we rely on the wakeup feature added to the omap-pinctrl-single driver in [1]. This takes care of routing IO pad wakeup interrupt to the right driver's interrupt handler (i.e. ehci_irq in our case).

The pin state information for DEFAULT and IDLE is specified for the omap3beagle-xm board in patch 2. So this is tested only on omap3beagle-xm board.

Patch 4 takes care of switching the pin states between DEFAULT and IDLE during idle/active mode using the pinctrl framework.

Patch 5 takes care of handling the wakeup IRQ when the USB controller is suspended and Hardware is not accessible.

Patch 6 implements runtime and system suspend/resume for the OMAP EHCI controller

Changelog:
v1:
- addressed review comments on RFC patchset
- Special case handling of controllers that can generate wakeup IRQ when suspended is done in HCD core instead of ehci-hcd.
- Patches based on linus/master commit 496322bc91e35007ed754184dcd447a02b6dd685 with the following patches on top

[1] - OMAP pinctrl wakeup support
http://thread.gmane.org/gmane.linux.ports.arm.omap/99010/focus=99041
This does not apply cleanly though. Tony has agreed to post a revision anytime soon.

[2] - [PATCH v5 0/2] ARM: dts: Add USB host support for Beagle-xm
http://thread.gmane.org/gmane.linux.drivers.devicetree/39291

[3] - USB-EHCI-Fix-resume-signalling-on-remote-wakeup.patch
http://thread.gmane.org/gmane.linux.usb.general/89608

cheers,
-roger

---
Roger Quadros (6):
ARM: OMAP3: Enable Hardware Save and Restore for USB Host
ARM: dts: omap3beagle-xm: Add idle state pins for USB host
mfd: omap-usb-host: move initialization to module_init()
mfd: omap-usb-host: Put pins in IDLE state on suspend
USB: Support wakeup IRQ for suspended controllers
USB: ehci-omap: Implement suspend/resume

 arch/arm/boot/dts/omap3-beagle-xm.dts       |   29 ++++++++++---
 arch/arm/mach-omap2/powerdomains3xxx_data.c |    8 +---
 drivers/mfd/omap-usb-host.c                 |   45 ++++++++++--------
 drivers/mfd/omap-usb-tll.c                  |   20 +--------
 drivers/usb/core/hcd.c                      |   21 ++++++++-
 drivers/usb/host/ehci-omap.c                |   64 ++++++++++++++++++++++++++-
 include/linux/usb/hcd.h                     |    3 +
 7 files changed, 136 insertions(+), 54 deletions(-)
Signature · 1 line
1.7.4.1