diff options
author | Furquan Shaikh <furquan@chromium.org> | 2016-10-18 14:25:25 -0700 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2016-10-26 08:33:37 +0200 |
commit | 3bfe3404df32ca226c624be0435c640bf1ebeae7 (patch) | |
tree | 0eef45f9ad972dec851f902d84470cb0b54c3cbf /src/soc/intel/skylake/acpi.c | |
parent | ffb3a2d22506a86e205a757029f60abccfef0486 (diff) |
intel/skylake: Add support to enable wake-on-usb attach/detach
Three things are required to enable wake-on-usb:
1. 5V to USB ports should be enabled in S3.
2. ASL file needs to have appropriate wake bit set.
3. XHCI controller should have the wake on attach/detach bit set for the
corresponding port in PORTSCN register.
Only part missing was #3.
This CL adds support to allow mainboard to define a bitmap in
devicetree corresponding to the ports that it wants to enable
wake-on-usb feature. Based on the bitmap, wake on attach/detach bits in
PORTSCN would be set by xhci.asl for the appropriate ports.
BUG=chrome-os-partner:58734
BRANCH=None
TEST=Verified that with port 5 enabled, chell wakes up from S3 on usb
attach/detach.
Change-Id: I40a22a450e52f74a0ab93ebb8170555d834ebdaf
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/17056
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/skylake/acpi.c')
-rw-r--r-- | src/soc/intel/skylake/acpi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/soc/intel/skylake/acpi.c b/src/soc/intel/skylake/acpi.c index 28a0a6e7b6..d83c74b5a2 100644 --- a/src/soc/intel/skylake/acpi.c +++ b/src/soc/intel/skylake/acpi.c @@ -198,6 +198,10 @@ static void acpi_create_gnvs(global_nvs_t *gnvs) /* Fill in the Wifi Region id */ gnvs->cid1 = wifi_regulatory_domain(); + + /* Set USB2/USB3 wake enable bitmaps. */ + gnvs->u2we = config->usb2_wake_enable_bitmap; + gnvs->u3we = config->usb3_wake_enable_bitmap; } unsigned long acpi_fill_mcfg(unsigned long current) |