From 3155af43eb32274b8dc1985d2001ee478d3b99ef Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 16 May 2013 15:09:16 -0700 Subject: [PATCH] haswell: bring down EC_EDP_VDD_EN with PP330_DX The display rail is generated from the PP3300_DX rail, but it is enabled by the EC_EDP_VDD_EN signal. Therefore, bring down the EC_EDP_VDD_EN signal before bringing down the PP330_DX rail. Additionally, always set the EC_EDP_VDD_EN signal based on the PCH_EDP_VDD_EN in the x86 power interrupt. The reasoning is so the signal doesn't indavertently remained set. BUG=chrome-os-partner:19398 BRANCH=None TEST=booted and resumed Change-Id: I43c2306f05d144b7dea243bafb5922118be1fe39 Signed-off-by: Aaron Durbin Reviewed-on: https://gerrit.chromium.org/gerrit/51524 Reviewed-by: Bill Richardson --- common/x86_power_haswell.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/x86_power_haswell.c b/common/x86_power_haswell.c index 692b455a39..ecc18624af 100644 --- a/common/x86_power_haswell.c +++ b/common/x86_power_haswell.c @@ -356,6 +356,7 @@ static void x86_power_init(void) gpio_set_level(GPIO_VCORE_EN, 0); gpio_set_level(GPIO_SUSP_VR_EN, 0); gpio_set_level(GPIO_PP1350_EN, 0); + gpio_set_level(GPIO_EC_EDP_VDD_EN, 0); gpio_set_level(GPIO_PP3300_DX_EN, 0); gpio_set_level(GPIO_PP3300_WLAN_EN, 0); gpio_set_level(GPIO_PP5000_EN, 0); @@ -391,9 +392,11 @@ void x86_power_interrupt(enum gpio_signal signal) /* Shadow signals and compare with our desired signal state. */ update_in_signals(); - /* Pass through eDP VDD enable from PCH */ + /* Pass through eDP VDD enable from PCH. Put this on own interrupt? */ if (gpio_get_level(GPIO_PCH_EDP_VDD_EN)) gpio_set_level(GPIO_EC_EDP_VDD_EN, 1); + else + gpio_set_level(GPIO_EC_EDP_VDD_EN, 0); /* Wake up the task */ task_wake(TASK_ID_CHIPSET); @@ -577,8 +580,10 @@ void chipset_task(void) chipset_force_shutdown(); gpio_set_level(GPIO_WLAN_OFF_L, 0); gpio_set_level(GPIO_PP3300_WLAN_EN, 0); + gpio_set_level(GPIO_EC_EDP_VDD_EN, 0); gpio_set_level(GPIO_PP3300_DX_EN, 0); state = X86_S3; + break; } /* @@ -631,6 +636,7 @@ void chipset_task(void) gpio_set_level(GPIO_CPU_PROCHOT, 0); /* Turn off power rails */ + gpio_set_level(GPIO_EC_EDP_VDD_EN, 0); gpio_set_level(GPIO_PP3300_DX_EN, 0); state = X86_S3;