diff options
author | Wai-Hong Tam <waihong@google.com> | 2018-08-09 11:59:39 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-08-29 11:15:28 -0700 |
commit | 63fd7e18588023b2940167b686611e609354b78a (patch) | |
tree | 27ec7213ddf178b08575785b38bc734da298d9e2 /board | |
parent | 440002836488f769995945f47c5860f9ce683a56 (diff) | |
download | chrome-ec-63fd7e18588023b2940167b686611e609354b78a.tar.gz |
cheza: Add more power signals for informative purpose
No power sequence logic is chanaged. Add PS_HOLD, PMIC_FAULT_L, and
POWER_GOOD (the real one, not AP_RST_L) as power signals. If their
states change, the EC console will show it and the timestamp.
BRANCH=none
BUG=b:78455067
TEST=Ran "gpioset SWITCHCAP_ON_L 0" and showed the signals changed:
7 signal changes:
750.164712 +0.000000 AP_RST_L => 0
750.164810 +0.000098 PMIC_FAULT_L => 0
750.165312 +0.000502 PS_HOLD => 0
750.166565 +0.001253 POWER_GOOD => 0
750.206345 +0.039780 PMIC_FAULT_L => 1
751.190869 +0.984524 PMIC_FAULT_L => 0
751.233388 +0.042519 PMIC_FAULT_L => 1
Change-Id: I1237f4fff20e2256f504d3c9d11ed26da5224ecd
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1169951
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/cheza/board.c | 9 | ||||
-rw-r--r-- | board/cheza/board.h | 5 | ||||
-rw-r--r-- | board/cheza/gpio.inc | 9 |
3 files changed, 16 insertions, 7 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 */ |