summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Chen <philipchen@google.com>2017-07-14 18:15:16 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-07-17 21:27:15 -0700
commit94bba42b650f1fac9ec8cdc69df2c82e5bf01f54 (patch)
tree2aa63d1c506031e5daf1f7b55f473fad298c673c
parentcc6662135d38f1544d655cf1d4d0f1f3e3d059b7 (diff)
downloadchrome-ec-stabilize-9756.B.tar.gz
power/rk3399: Fix the new power sequencing to support new boardstabilize-9756.B
BUG=b:62640322, b:62269890 BRANCH=none TEST=build scarlet with POWER_SEQUENCING_VERSION == 2 && CHIP == stm32 Change-Id: I314b21a909324a7d4666569525d9daddd300abdb Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/572338 Commit-Ready: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r--power/rk3399.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/power/rk3399.c b/power/rk3399.c
index 93b1cfd378..7c45ebfc9f 100644
--- a/power/rk3399.c
+++ b/power/rk3399.c
@@ -11,6 +11,7 @@
* Version 0: Initial/default revision.
* Version 1: Control signals PP900_PLL_EN and PP900_PMU_EN
* are merged with PP900_USB_EN.
+ * Version 2: Simplified power tree, fewer control signals.
*/
#include "charge_state.h"
@@ -35,7 +36,6 @@
/* Input state flags */
#if CONFIG_CHIPSET_POWER_SEQ_VERSION == 2
- #define IN_PGOOD_PP1800 POWER_SIGNAL_MASK(PP1800_PWR_GOOD)
#define IN_PGOOD_PP1250_S3 POWER_SIGNAL_MASK(PP1250_S3_PWR_GOOD)
#define IN_PGOOD_PP900_S0 POWER_SIGNAL_MASK(PP900_S0_PWR_GOOD)
#else
@@ -48,7 +48,7 @@
/* Rails requires for S3 and S0 */
#if CONFIG_CHIPSET_POWER_SEQ_VERSION == 2
- #define IN_PGOOD_S3 (IN_PGOOD_PP1800 | IN_PGOOD_PP1250_S3)
+ #define IN_PGOOD_S3 (IN_PGOOD_PP1250_S3)
#define IN_PGOOD_S0 (IN_PGOOD_S3 | IN_PGOOD_PP900_S0 | IN_PGOOD_AP)
#else
#define IN_PGOOD_S3 (IN_PGOOD_PP5000)
@@ -189,9 +189,10 @@ void chipset_force_shutdown(void)
#define SYS_RST_HOLD_US (1 * MSEC)
void chipset_reset(int cold_reset)
{
+#ifdef CONFIG_CMD_RTC
/* Print out the RTC to help correlate resets in logs. */
print_system_rtc(CC_CHIPSET);
-
+#endif
/* TODO: handle cold_reset */
CPRINTS("%s(%d)", __func__, cold_reset);
@@ -464,6 +465,7 @@ static void power_button_changed(void)
}
DECLARE_HOOK(HOOK_POWER_BUTTON_CHANGE, power_button_changed, HOOK_PRIO_DEFAULT);
+#ifdef CONFIG_LID_SWITCH
static void lid_changed(void)
{
/* Power-up from off on lid open */
@@ -471,3 +473,4 @@ static void lid_changed(void)
chipset_exit_hard_off();
}
DECLARE_HOOK(HOOK_LID_CHANGE, lid_changed, HOOK_PRIO_DEFAULT);
+#endif