summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/cheza/board.c9
-rw-r--r--board/cheza/board.h5
-rw-r--r--board/cheza/gpio.inc9
-rw-r--r--power/sdm845.c2
4 files changed, 17 insertions, 8 deletions
diff --git a/board/cheza/board.c b/board/cheza/board.c
index 12e4855f22..55b48e2859 100644
--- a/board/cheza/board.c
+++ b/board/cheza/board.c
@@ -175,7 +175,14 @@ BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);
* good state. Address the issue of AP-initiated warm reset.
*/
const struct power_signal_info power_signal_list[] = {
- {GPIO_AP_RST_L, POWER_SIGNAL_ACTIVE_HIGH, "POWER_GOOD"},
+ [SDM845_AP_RST_L] = {
+ GPIO_AP_RST_L, POWER_SIGNAL_ACTIVE_HIGH, "AP_RST_L"},
+ [SDM845_PS_HOLD] = {
+ GPIO_PS_HOLD, POWER_SIGNAL_ACTIVE_HIGH, "PS_HOLD"},
+ [SDM845_PMIC_FAULT_L] = {
+ GPIO_PMIC_FAULT_L, POWER_SIGNAL_ACTIVE_HIGH, "PMIC_FAULT_L"},
+ [SDM845_POWER_GOOD] = {
+ GPIO_POWER_GOOD, POWER_SIGNAL_ACTIVE_HIGH, "POWER_GOOD"},
};
BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
diff --git a/board/cheza/board.h b/board/cheza/board.h
index cb3c9c331b..ab722c2aec 100644
--- a/board/cheza/board.h
+++ b/board/cheza/board.h
@@ -151,7 +151,10 @@
#include "registers.h"
enum power_signal {
- SDM845_POWER_GOOD = 0,
+ SDM845_AP_RST_L = 0,
+ SDM845_PS_HOLD,
+ SDM845_PMIC_FAULT_L,
+ SDM845_POWER_GOOD,
/* Number of power signals */
POWER_SIGNAL_COUNT
};
diff --git a/board/cheza/gpio.inc b/board/cheza/gpio.inc
index cf7d0c901d..707b51a850 100644
--- a/board/cheza/gpio.inc
+++ b/board/cheza/gpio.inc
@@ -27,8 +27,11 @@ GPIO_INT(VOLUME_UP_L, PIN(1, 1), GPIO_INT_BOTH | GPIO_PULL_UP, button_inte
GPIO_INT(WP_L, PIN(A, 1), GPIO_INT_BOTH, switch_interrupt) /* EC_WP_ODL */
GPIO_INT(LID_OPEN, PIN(D, 2), GPIO_INT_BOTH, lid_interrupt) /* LID_OPEN_EC */
GPIO_INT(AP_RST_REQ, PIN(C, 2), GPIO_INT_RISING | GPIO_PULL_DOWN | GPIO_SEL_1P8V, chipset_reset_request_interrupt) /* Reset request from AP */
-/* AP_RST_L is used for PMIC and AP negotiation. Don't change its state. */
+/* AP_RST_L and PS_HOLD are used for PMIC and AP negotiation. Don't change their states. */
GPIO_INT(AP_RST_L, PIN(C, 1), GPIO_INT_BOTH | GPIO_SEL_1P8V, chipset_power_signal_interrupt)
+GPIO_INT(PS_HOLD, PIN(D, 4), GPIO_INT_BOTH | GPIO_SEL_1P8V, power_signal_interrupt) /* Indicate when AP triggers reset/shutdown */
+GPIO_INT(PMIC_FAULT_L, PIN(7, 6), GPIO_INT_BOTH | GPIO_SEL_1P8V, power_signal_interrupt) /* Any PMIC fault? */
+GPIO_INT(POWER_GOOD, PIN(5, 4), GPIO_INT_BOTH | GPIO_SEL_1P8V, power_signal_interrupt) /* SRC_PP1800_S4A from PMIC */
GPIO_INT(SHI_CS_L, PIN(5, 3), GPIO_INT_FALLING | GPIO_PULL_DOWN | GPIO_SEL_1P8V, shi_cs_event) /* AP_EC_SPI_CS_L */
GPIO(EC_SELF_RST, PIN(E, 0), GPIO_OUT_LOW) /* Self-reset EC */
@@ -41,12 +44,8 @@ GPIO(PROCHOT_L, PIN(3, 4), GPIO_INPUT)
/* PMIC/AP 1.8V */
GPIO(PM845_RESIN_L, PIN(3, 2), GPIO_ODR_HIGH | GPIO_SEL_1P8V) /* PMIC reset trigger */
GPIO(WARM_RESET_L, PIN(F, 4), GPIO_ODR_HIGH | GPIO_SEL_1P8V) /* AP warm reset */
-/* PS_HOLD is used for PMIC and AP negotiation. Don't change its state. */
-GPIO(PS_HOLD, PIN(D, 4), GPIO_INPUT | GPIO_SEL_1P8V) /* Indicate when AP triggers reset/shutdown */
-GPIO(PMIC_FAULT_L, PIN(7, 6), GPIO_INPUT | GPIO_SEL_1P8V) /* Any PMIC fault? */
GPIO(PMIC_KPD_PWR_ODL, PIN(D, 6), GPIO_ODR_HIGH | GPIO_SEL_1P8V) /* PMIC power button */
GPIO(EC_INT_L, PIN(A, 2), GPIO_ODR_HIGH | GPIO_SEL_1P8V) /* Interrupt line between AP and EC */
-GPIO(POWER_GOOD, PIN(5, 4), GPIO_INPUT | GPIO_SEL_1P8V) /* SRC_PP1800_S4A from PMIC */
GPIO(AP_SUSPEND_L, PIN(5, 7), GPIO_INPUT | GPIO_SEL_1P8V) /* Suspend signal from AP */
/* Power enables */
diff --git a/power/sdm845.c b/power/sdm845.c
index 881761035e..878bd24737 100644
--- a/power/sdm845.c
+++ b/power/sdm845.c
@@ -37,7 +37,7 @@
#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args)
/* Masks for power signals */
-#define IN_POWER_GOOD POWER_SIGNAL_MASK(SDM845_POWER_GOOD)
+#define IN_POWER_GOOD POWER_SIGNAL_MASK(SDM845_AP_RST_L)
/* Long power key press to force shutdown */
#define DELAY_FORCE_SHUTDOWN (8 * SECOND)