summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/kirby/board.h2
-rw-r--r--common/chipset_gaia.c10
-rw-r--r--include/config.h4
3 files changed, 11 insertions, 5 deletions
diff --git a/board/kirby/board.h b/board/kirby/board.h
index d246622504..e44ecbdb47 100644
--- a/board/kirby/board.h
+++ b/board/kirby/board.h
@@ -12,6 +12,8 @@
#define CONFIG_CHARGER
#define CONFIG_CHARGER_BQ24192
#define CONFIG_CHIPSET_GAIA
+#undef CONFIG_CHIPSET_HAS_PP1350
+#undef CONFIG_CHIPSET_HAS_PP5000
#define CONFIG_HOST_COMMAND_STATUS
#define CONFIG_I2C
#define CONFIG_KEYBOARD_PROTOCOL_MKBP
diff --git a/common/chipset_gaia.c b/common/chipset_gaia.c
index 1dcebd87e4..d487b68cc2 100644
--- a/common/chipset_gaia.c
+++ b/common/chipset_gaia.c
@@ -364,7 +364,7 @@ void chipset_reset(int is_cold)
* contents. This is useful for looking at kernel log message contents
* from previous boot in cases where the AP/OS is hard hung.
*/
-#ifndef BOARD_kirby
+#ifdef CONFIG_CHIPSET_HAS_PP5000
gpio_set_level(GPIO_EN_PP5000, 0);
#endif
gpio_set_level(GPIO_EN_PP3300, 0);
@@ -377,7 +377,7 @@ void chipset_force_shutdown(void)
{
/* Turn off all rails */
gpio_set_level(GPIO_EN_PP3300, 0);
-#ifndef BOARD_kirby
+#ifdef CONFIG_CHIPSET_HAS_PP1350
/*
* Turn off PP1350 unless we're immediately waking back up. This
* works with the hack in chipset_reset() to preserve the contents of
@@ -387,7 +387,7 @@ void chipset_force_shutdown(void)
gpio_set_level(GPIO_EN_PP1350, 0);
#endif
set_pmic_pwrok(0);
-#ifndef BOARD_kirby
+#ifdef CONFIG_CHIPSET_HAS_PP5000
gpio_set_level(GPIO_EN_PP5000, 0);
#endif
@@ -456,7 +456,7 @@ static int check_for_power_on_event(void)
*/
static int power_on(void)
{
-#ifndef BOARD_kirby
+#ifdef CONFIG_CHIPSET_HAS_PP5000
/* Enable 5v power rail */
gpio_set_level(GPIO_EN_PP5000, 1);
/* Wait for it to stabilize */
@@ -571,7 +571,7 @@ static void power_off(void)
lid_opened = 0;
enable_sleep(SLEEP_MASK_AP_RUN);
powerled_set_state(POWERLED_STATE_OFF);
-#ifndef BOARD_kirby
+#ifdef CONFIG_PMU_TPS65090
pmu_shutdown();
#endif
CPRINTF("[%T power shutdown complete]\n");
diff --git a/include/config.h b/include/config.h
index 9a6808cf10..3025bdccb7 100644
--- a/include/config.h
+++ b/include/config.h
@@ -157,6 +157,10 @@
*/
#undef CONFIG_CHIPSET_X86
+/* Compile support for power rail control */
+#define CONFIG_CHIPSET_HAS_PP1350
+#define CONFIG_CHIPSET_HAS_PP5000
+
/*****************************************************************************/
/*
* Optional console commands