summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/samus/board.c4
-rw-r--r--board/samus/board.h6
-rw-r--r--board/samus/power_sequence.c52
3 files changed, 42 insertions, 20 deletions
diff --git a/board/samus/board.c b/board/samus/board.c
index d0e6ea03a4..e7af4b6516 100644
--- a/board/samus/board.c
+++ b/board/samus/board.c
@@ -97,9 +97,9 @@ const struct gpio_info gpio_list[] = {
pd_mcu_interrupt},
/* Other inputs */
- {"BOARD_VERSION1", LM4_GPIO_Q, (1<<5), GPIO_INPUT, NULL},
+ {"BOARD_VERSION1", LM4_GPIO_Q, (1<<7), GPIO_INPUT, NULL},
{"BOARD_VERSION2", LM4_GPIO_Q, (1<<6), GPIO_INPUT, NULL},
- {"BOARD_VERSION3", LM4_GPIO_Q, (1<<7), GPIO_INPUT, NULL},
+ {"BOARD_VERSION3", LM4_GPIO_Q, (1<<5), GPIO_INPUT, NULL},
{"USB1_OC_L", LM4_GPIO_E, (1<<7), GPIO_INPUT, NULL},
{"USB1_STATUS_L", LM4_GPIO_E, (1<<6), GPIO_INPUT, NULL},
{"USB2_OC_L", LM4_GPIO_E, (1<<0), GPIO_INPUT, NULL},
diff --git a/board/samus/board.h b/board/samus/board.h
index b9ac5c6cbe..431da8ca7b 100644
--- a/board/samus/board.h
+++ b/board/samus/board.h
@@ -240,9 +240,9 @@ enum als_id {
/* Known board versions for system_get_board_version(). */
enum board_version {
- BOARD_VERSION_PROTO1 = 0,
- BOARD_VERSION_PROTO1B = 1,
- BOARD_VERSION_PROTO1_9 = 2,
+ BOARD_VERSION_PROTO_1_9 = 0,
+ BOARD_VERSION_PROTO_2_A = 1,
+ BOARD_VERSION_PROTO_2_B = 2,
};
/* Wireless signals */
diff --git a/board/samus/power_sequence.c b/board/samus/power_sequence.c
index 4fffe04907..d1161fb618 100644
--- a/board/samus/power_sequence.c
+++ b/board/samus/power_sequence.c
@@ -235,24 +235,46 @@ enum power_state power_handle_state(enum power_state state)
/* Assert DPWROK */
gpio_set_level(GPIO_PCH_DPWROK, 1);
- if (power_wait_signals(IN_PCH_SLP_SUS_DEASSERTED)) {
- CPRINTS("timeout waiting for SLP_SUS to deassert");
- chipset_force_g3();
- return POWER_G3;
- }
- /* Enable PP1050 rail. */
- gpio_set_level(GPIO_PP1050_EN, 1);
+ /*
+ * Proto2B boards added EC control of RSMRST which allows
+ * the sequencing to properly wait for SLP_SUS before
+ * enabling the 1.05V rail. Prior to this the sequencing
+ * had board specific timing requirements that needed the
+ * 1.05V rail to be brought up just after DPWROK assertion.
+ */
+ if (system_get_board_version() <= BOARD_VERSION_PROTO_2_A) {
+ CPRINTS("Proto2A board, using alternate sequencing");
- /* Wait for 1.05V to come up and CPU to notice */
- if (power_wait_signals(IN_PGOOD_PP1050)) {
- CPRINTS("timeout waiting for PP1050");
- chipset_force_g3();
- return POWER_G3;
- }
+ /* Enable PP1050 rail. */
+ gpio_set_level(GPIO_PP1050_EN, 1);
- /* Deassert RSMRST# */
- gpio_set_level(GPIO_PCH_RSMRST_L, 1);
+ /* Wait for 1.05V to come up and CPU to notice */
+ if (power_wait_signals(IN_PGOOD_PP1050 |
+ IN_PCH_SLP_SUS_DEASSERTED)) {
+ CPRINTS("timeout waiting for PP1050/SLP_SUS");
+ chipset_force_g3();
+ }
+ } else {
+ if (power_wait_signals(IN_PCH_SLP_SUS_DEASSERTED)) {
+ CPRINTS("timeout waiting for SLP_SUS deassert");
+ chipset_force_g3();
+ return POWER_G3;
+ }
+
+ /* Enable PP1050 rail. */
+ gpio_set_level(GPIO_PP1050_EN, 1);
+
+ /* Wait for 1.05V to come up and CPU to notice */
+ if (power_wait_signals(IN_PGOOD_PP1050)) {
+ CPRINTS("timeout waiting for PP1050");
+ chipset_force_g3();
+ return POWER_G3;
+ }
+
+ /* Deassert RSMRST# */
+ gpio_set_level(GPIO_PCH_RSMRST_L, 1);
+ }
/* Wait 5ms for SUSCLK to stabilize */
msleep(5);