Skip to content

Commit

Permalink
usb: xhci: tegra: Enable ELPG for runtime/system PM
Browse files Browse the repository at this point in the history
This commit implements the complete programming sequence for ELPG
entry and exit.

 1. At ELPG entry, invokes tegra_xusb_padctl_enable_phy_sleepwalk()
    and tegra_xusb_padctl_enable_phy_wake() to configure XUSB PADCTL
    sleepwalk and wake detection circuits to maintain USB lines level
    and respond to wake events (wake-on-connect, wake-on-disconnect,
    device-initiated-wake).

 2. At ELPG exit, invokes tegra_xusb_padctl_disable_phy_sleepwalk()
    and tegra_xusb_padctl_disable_phy_wake() to disarm sleepwalk and
    wake detection circuits.

At runtime suspend, XUSB host controller can enter ELPG to reduce
power consumption. When XUSB PADCTL wake detection circuit detects
a wake event, an interrupt will be raised. xhci-tegra driver then
will invoke pm_runtime_resume() for xhci-tegra.

Runtime resume could also be triggered by protocol drivers, this is
the host-initiated-wake event. At runtime resume, xhci-tegra driver
brings XUSB host controller out of ELPG to handle the wake events.

The same ELPG enter/exit procedure will be performed for system
suspend/resume path so USB devices can remain connected across SC7.

Signed-off-by: JC Kuo <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
  • Loading branch information
jckuo authored and thierryreding committed Jun 11, 2021
1 parent 41a7426 commit 971ee24
Showing 1 changed file with 370 additions and 37 deletions.
Loading

0 comments on commit 971ee24

Please sign in to comment.