From f409af3d4ac946a93819fd323d348ae3bdc4141f Mon Sep 17 00:00:00 2001 From: Abe Levkoy Date: Tue, 8 Oct 2019 13:18:53 -0600 Subject: volteer: Configure power sequencing signals Configure power sequencing interrupts and power-enable lines. Leave SLP_S4_L, which will be virtual, unimplemented for now. BUG=b:139553375 TEST=make buildall BRANCH=none Change-Id: Idf11290c84deb9ea2a71f5498a4a0db5363d2a3b Signed-off-by: Abe Levkoy Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1865481 Reviewed-by: Daisuke Nojiri --- board/volteer/board.c | 1 + board/volteer/board.h | 7 +++++++ board/volteer/ec.tasklist | 1 + board/volteer/gpio.inc | 17 +++++++++++++++++ 4 files changed, 26 insertions(+) diff --git a/board/volteer/board.c b/board/volteer/board.c index 54c7e52594..2e95163a94 100644 --- a/board/volteer/board.c +++ b/board/volteer/board.c @@ -10,6 +10,7 @@ #include "gpio.h" #include "hooks.h" #include "lid_switch.h" +#include "power.h" #include "power_button.h" #include "switch.h" #include "system.h" diff --git a/board/volteer/board.h b/board/volteer/board.h index 782c77036a..00cbd12451 100644 --- a/board/volteer/board.h +++ b/board/volteer/board.h @@ -50,14 +50,21 @@ */ #define GPIO_AC_PRESENT GPIO_ACOK_OD #define GPIO_EC_INT_L EC_PCH_INT_ODL +#define GPIO_EN_PP5000 GPIO_EN_PP5000_A #define GPIO_ENTERING_RW GPIO_EC_ENTERING_RW #define GPIO_LID_OPEN GPIO_EC_LID_OPEN #define GPIO_KBD_KSO2 GPIO_EC_KSO_02_INV #define GPIO_PCH_WAKE_L GPIO_EC_PCH_WAKE_ODL #define GPIO_PCH_PWRBTN_L GPIO_EC_PCH_PWR_BTN_ODL +#define GPIO_PCH_RSMRST_L GPIO_EC_PCH_RSMRST_ODL #define GPIO_PCH_RTCRST GPIO_EC_PCH_RTCRST #define GPIO_PCH_SYS_PWROK GPIO_EC_PCH_SYS_PWROK +#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 +#define GPIO_PG_EC_DSW_PWROK GPIO_DSW_PWROK #define GPIO_POWER_BUTTON_L GPIO_H1_EC_PWR_BTN_ODL +#define GPIO_RSMRST_L_PGOOD GPIO_PG_EC_RSMRST_ODL #define GPIO_CPU_PROCHOT GPIO_EC_PROCHOT_ODL #define GPIO_SYS_RESET_L GPIO_SYS_RST_ODL #define GPIO_WP_L GPIO_EC_WP_L diff --git a/board/volteer/ec.tasklist b/board/volteer/ec.tasklist index aa43567270..ca22534cf4 100644 --- a/board/volteer/ec.tasklist +++ b/board/volteer/ec.tasklist @@ -10,6 +10,7 @@ #define CONFIG_TASK_LIST \ TASK_ALWAYS(HOOKS, hook_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \ + TASK_NOTEST(CHIPSET, chipset_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_ALWAYS(HOSTCMD, host_command_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_ALWAYS(CONSOLE, console_task, NULL, VENTI_TASK_STACK_SIZE) \ TASK_ALWAYS(POWERBTN, power_button_task, NULL, LARGER_TASK_STACK_SIZE) \ diff --git a/board/volteer/gpio.inc b/board/volteer/gpio.inc index 74b484a8fb..2be8fd7bf3 100644 --- a/board/volteer/gpio.inc +++ b/board/volteer/gpio.inc @@ -15,6 +15,17 @@ GPIO_INT(H1_EC_PWR_BTN_ODL, PIN(0, 1), GPIO_INT_BOTH, power_button_interrupt) GPIO_INT(ACOK_OD, PIN(0, 0), GPIO_INT_BOTH | GPIO_HIB_WAKE_HIGH, extpower_interrupt) /* Power sequencing interrupts */ +GPIO_INT(SLP_S0_L, PIN(D, 5), GPIO_INT_BOTH, power_signal_interrupt) +#ifndef CONFIG_HOSTCMD_ESPI_VW_SLP_SIGNALS +GPIO_INT(SLP_S3_L, PIN(A, 5), GPIO_INT_BOTH, power_signal_interrupt) +#endif +GPIO_INT(SLP_SUS_L, PIN(D, 7), GPIO_INT_BOTH, power_signal_interrupt) +/* TODO(b/139553375): Consider using intel_x86_rsmrst_signal_interrupt. */ +GPIO_INT(PG_EC_RSMRST_ODL, PIN(E, 2), GPIO_INT_BOTH, power_signal_interrupt) +GPIO_INT(DSW_PWROK, PIN(C, 7), GPIO_INT_BOTH, power_signal_interrupt) +/* TODO(b/139553375): This signal is virtual; need to change code to support + * virtual S4 with physical S3. */ +UNIMPLEMENTED(SLP_S4_L) /* Sensor Interrupts */ @@ -24,6 +35,12 @@ GPIO_INT(ACOK_OD, PIN(0, 0), GPIO_INT_BOTH | GPIO_HIB_WAKE_HIGH, ex /* Volume button interrupts */ +/* Power Sequencing Signals */ +GPIO(EN_PP3300_A, PIN(A, 3), GPIO_OUT_LOW) +GPIO(EN_PP5000_A, PIN(A, 4), GPIO_OUT_LOW) +/* The EC does not buffer this signal on Volteer. */ +UNIMPLEMENTED(PCH_DSW_PWROK) + /* Other wake sources */ /* * GPIO_INT_BOTH is required for PSL wake from hibernate, but we don't need an -- cgit v1.2.1