diff options
author | Vaibhav Shankar <vaibhav.shankar@intel.com> | 2016-08-23 17:56:17 -0700 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2016-09-14 22:17:47 +0200 |
commit | ef8deaffcbfb68c5b15cdc9c91607fce5734ec8b (patch) | |
tree | f595da26856df4dc4214837f339dae53ec481d20 /src/soc/intel/apollolake/acpi/gpio.asl | |
parent | 9e81540b85c6d06c7c3c63447b92f09590f032d1 (diff) | |
download | coreboot-ef8deaffcbfb68c5b15cdc9c91607fce5734ec8b.tar.xz |
soc/intel/apollolake: Add PM methods to power gate PCIe
This implements GNVS variable to store the address of PERST_0,
_ON/_OFF methods to power gate PCIe during S0ix entry, and
PERST_0 assertion/de-assertion methods.
BUG=chrome-os-partner:55877
TEST=Suspend and resume using 'echo freeze > /sys/power/state'.
System should resume with PCIE and wifi functional.
Change-Id: I9f63ca0b8a6565b6d21deaa6d3dfa34678714c19
Signed-off-by: Vaibhav Shankar <vaibhav.shankar@intel.com>
Reviewed-on: https://review.coreboot.org/16351
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/soc/intel/apollolake/acpi/gpio.asl')
-rw-r--r-- | src/soc/intel/apollolake/acpi/gpio.asl | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/soc/intel/apollolake/acpi/gpio.asl b/src/soc/intel/apollolake/acpi/gpio.asl index 03b8edd880..5660dfa830 100644 --- a/src/soc/intel/apollolake/acpi/gpio.asl +++ b/src/soc/intel/apollolake/acpi/gpio.asl @@ -15,6 +15,7 @@ * GNU General Public License for more details. */ #include <soc/gpio_defs.h> +#include "gpiolib.asl" scope (\_SB) { @@ -141,6 +142,38 @@ scope (\_SB) { Return(0xf) } } + + Scope(\_SB.PCI0) { + /* PERST Assertion + * Note: PERST is Active High + */ + Method (PRAS, 0x1, Serialized) + { + /* + * Assert PERST + * local1 - to toggle Tx pin of Dw0 + * local2 - Address of PERST + */ + Store (Arg0, Local2) + Store (\_SB.GPC0 (Local2), Local1) + Or (Local1, PAD_CFG0_TX_STATE, Local1) + \_SB.SPC0 (Local2, Local1) + } + + /* PERST DE-Assertion */ + Method (PRDA, 0x1, Serialized) + { + /* + * De-assert PERST + * local1 - to toggle Tx pin of Dw0 + * local2 - Address of PERST + */ + Store (Arg0, Local2) + Store (\_SB.GPC0 (Local2), Local1) + And (Local1, Not (PAD_CFG0_TX_STATE), Local1) + \_SB.SPC0 (Local2, Local1) + } + } } Scope(\_GPE) |