summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2015-08-12 18:39:45 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-08-21 03:46:19 +0000
commit646760bb20fde94683d3be2fa4b046d47933d85f (patch)
treedcd83c4da3ac579a413d6d6e6a4277f8b0db3468
parentf0a1e5dfd1579c127c3bd3064978867efddfaf20 (diff)
downloadchrome-ec-646760bb20fde94683d3be2fa4b046d47933d85f.tar.gz
Skylake: Add low power Pseudo G3 support
BUG=none TEST=Used "shutdown -h now" Kernel console command to test on Kunimitsu. With only battery after 1 hour, device enters to Pseudo G3 and the V3p3A is off. With AC connected, device is in G3. BRANCH=none Change-Id: I955662eb69ac608e9b2d12bdcfbc1258ca83f3a5 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/292976 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r--board/kunimitsu/board.h4
-rw-r--r--include/config.h3
-rw-r--r--power/skylake.c22
3 files changed, 21 insertions, 8 deletions
diff --git a/board/kunimitsu/board.h b/board/kunimitsu/board.h
index 0aa33dd82f..013eb233d7 100644
--- a/board/kunimitsu/board.h
+++ b/board/kunimitsu/board.h
@@ -113,8 +113,8 @@
#undef CONFIG_CONSOLE_HISTORY
#undef CONFIG_PECI
-/* Enable sleep mode in G3 */
-#define CONFIG_G3_SLEEP
+/* Enable Pseudo G3 */
+#define CONFIG_LOW_POWER_PSEUDO_G3
#ifndef __ASSEMBLER__
diff --git a/include/config.h b/include/config.h
index b8d97d79c5..7172f54697 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1146,9 +1146,6 @@
*/
#undef CONFIG_LOW_POWER_S0
-/* Support G3 sleep mode */
-#undef CONFIG_G3_SLEEP
-
/* Support LPC interface */
#undef CONFIG_LPC
diff --git a/power/skylake.c b/power/skylake.c
index 343d230297..a766901e67 100644
--- a/power/skylake.c
+++ b/power/skylake.c
@@ -279,9 +279,6 @@ static enum power_state _power_handle_state(enum power_state state)
return POWER_S5;
case POWER_S5G3:
-#ifdef CONFIG_G3_SLEEP
- gpio_set_level(GPIO_G3_SLEEP_EN, 1);
-#endif
chipset_force_g3();
return POWER_G3;
@@ -340,3 +337,22 @@ enum power_state power_handle_state(enum power_state state)
return new_state;
}
+
+#ifdef CONFIG_LOW_POWER_PSEUDO_G3
+void enter_pseudo_g3(void)
+{
+ CPRINTS("Enter Psuedo G3");
+
+ /*
+ * Clean up the UART buffer and prevent any unwanted garbage characters
+ * before power off and also ensure above debug message is printed.
+ */
+ cflush();
+
+ gpio_set_level(GPIO_G3_SLEEP_EN, 1);
+
+ /* Power to EC should shut down now */
+ while (1)
+ ;
+}
+#endif