diff options
author | Peter Marheine <pmarheine@chromium.org> | 2019-11-20 13:03:58 +1100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-10 06:39:43 +0000 |
commit | 33cc661bd206d8f5a3d599c5cde503a3f89f6b2e (patch) | |
tree | 050fa67612c7f14a1ff70a8fa9899b96ff49afb9 /board | |
parent | 0ee58e53ecb9417b7c264be0d3c199e1919fafd6 (diff) | |
download | chrome-ec-33cc661bd206d8f5a3d599c5cde503a3f89f6b2e.tar.gz |
power/cometlake-discrete: implement power sequencingstabilize-12748.B-master
A first go at the power sequencing needed for Puff. This abuses the
Intel common power code a little bit because we don't actually have all
the inputs it assumes, but that seems preferable to replacing it
wholesale.
The one limitation right now is inability to detect transitions on the
rails that we only have analog monitoring on; either we need to design
a way to monitor those, or decide that detecting dropouts on those rails
is unimportant.
BUG=b:143188569
TEST=still builds
BRANCH=None
Change-Id: Ia960f5dd2ccfb1ca2c7d4107ba4e3737adc8f69f
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1925787
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/puff/board.h | 11 | ||||
-rw-r--r-- | board/puff/gpio.inc | 4 |
2 files changed, 9 insertions, 6 deletions
diff --git a/board/puff/board.h b/board/puff/board.h index 85337b55af..0c4dcd2b2b 100644 --- a/board/puff/board.h +++ b/board/puff/board.h @@ -66,7 +66,6 @@ #define CONFIG_CHIPSET_COMETLAKE_DISCRETE /* check */ #define CONFIG_CHIPSET_CAN_THROTTLE -#define CONFIG_CHIPSET_HAS_PRE_INIT_CALLBACK #define CONFIG_CHIPSET_RESET_HOOK #define CONFIG_CPU_PROCHOT_ACTIVE_LOW @@ -231,10 +230,12 @@ void led_critical(void); #define GPIO_PCH_SLP_S0_L GPIO_SLP_S0_L #define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L #define GPIO_PCH_SLP_S4_L GPIO_SLP_S4_L -/* No equivalent signals for these pins, need to refactor the power handling */ -#define GPIO_RSMRST_L_PGOOD GPIO_PG_VPRIM_CORE_A_OD -#define GPIO_PG_EC_ALL_SYS_PWRGD GPIO_PG_VPRIM_CORE_A_OD -#define GPIO_EN_A_RAILS GPIO_EN_ROA_RAILS #define GPIO_AC_PRESENT GPIO_BJ_ADP_PRESENT_L +/* + * There is no RSMRST input, so alias it to the output. This short-circuits + * common_intel_x86_handle_rsmrst. + */ +#define GPIO_RSMRST_L_PGOOD GPIO_PCH_RSMRST_L + #endif /* __CROS_EC_BOARD_H */ diff --git a/board/puff/gpio.inc b/board/puff/gpio.inc index d66cf09c2f..ddfa7a4e6b 100644 --- a/board/puff/gpio.inc +++ b/board/puff/gpio.inc @@ -18,6 +18,8 @@ GPIO_INT(PG_PP5000_A_OD, PIN(D, 7), GPIO_INT_BOTH, power_signal_interrupt) GPIO_INT(PG_PP1800_A_OD, PIN(3, 1), GPIO_INT_BOTH, power_signal_interrupt) GPIO_INT(PG_VPRIM_CORE_A_OD, PIN(2, 3), GPIO_INT_BOTH, power_signal_interrupt) GPIO_INT(PG_PP1050_A_OD, PIN(2, 2), GPIO_INT_BOTH, power_signal_interrupt) +/* EC output, but also interrupt so this can be polled as a power signal */ +GPIO_INT(EC_PCH_RSMRST_L, PIN(A, 6), GPIO_OUTPUT | GPIO_INT_F_RISING | GPIO_INT_F_FALLING, power_signal_interrupt) #ifndef CONFIG_HOSTCMD_ESPI_VW_SLP_S4 GPIO_INT(SLP_S4_L, PIN(D, 4), GPIO_INT_BOTH, power_signal_interrupt) #endif @@ -46,8 +48,8 @@ GPIO_INT(USB_A3_OC_ODL, PIN(0, 3), GPIO_ODR_HIGH, port_ocp_interrupt) GPIO_INT(USB_A4_OC_ODL, PIN(B, 0), GPIO_ODR_HIGH, port_ocp_interrupt) /* PCH/CPU signals */ +GPIO(EC_PCH_PWROK, PIN(0, 5), GPIO_OUT_LOW) GPIO(EC_PCH_SYS_PWROK, PIN(3, 7), GPIO_OUT_LOW) -GPIO(EC_PCH_RSMRST_L, PIN(A, 6), GPIO_OUT_LOW) GPIO(EC_PCH_PWR_BTN_ODL, PIN(C, 1), GPIO_ODR_HIGH) GPIO(EC_PCH_RTCRST, PIN(7, 6), GPIO_ODR_HIGH) GPIO(EC_PCH_WAKE_ODL, PIN(7, 4), GPIO_ODR_HIGH) |