mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-11 18:35:28 +00:00
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>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
f0a1e5dfd1
commit
646760bb20
@@ -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__
|
||||
|
||||
|
||||
@@ -1146,9 +1146,6 @@
|
||||
*/
|
||||
#undef CONFIG_LOW_POWER_S0
|
||||
|
||||
/* Support G3 sleep mode */
|
||||
#undef CONFIG_G3_SLEEP
|
||||
|
||||
/* Support LPC interface */
|
||||
#undef CONFIG_LPC
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user