diff options
Diffstat (limited to 'board')
-rw-r--r-- | board/volteer/board.c | 2 | ||||
-rw-r--r-- | board/volteer/board.h | 8 | ||||
-rw-r--r-- | board/volteer/ec.tasklist | 3 | ||||
-rw-r--r-- | board/volteer/gpio.inc | 5 |
4 files changed, 16 insertions, 2 deletions
diff --git a/board/volteer/board.c b/board/volteer/board.c index 295ecd696b..54c7e52594 100644 --- a/board/volteer/board.c +++ b/board/volteer/board.c @@ -6,9 +6,11 @@ /* Volteer board-specific configuration */ #include "common.h" +#include "extpower.h" #include "gpio.h" #include "hooks.h" #include "lid_switch.h" +#include "power_button.h" #include "switch.h" #include "system.h" #include "task.h" diff --git a/board/volteer/board.h b/board/volteer/board.h index f8d899c8b4..45511fe989 100644 --- a/board/volteer/board.h +++ b/board/volteer/board.h @@ -14,9 +14,10 @@ /* Optional features */ #define CONFIG_SYSTEM_UNLOCKED /* Allow dangerous commands while in dev. */ +#define CONFIG_POWER_BUTTON + /* Config options automatically enabled by NPCX, re-enable once support added */ #undef CONFIG_ADC -#undef CONFIG_SWITCH #undef CONFIG_UART_TX_BUF_SIZE #define CONFIG_UART_TX_BUF_SIZE 4096 @@ -41,8 +42,13 @@ * then redefined here to so it's more clear which signal is being used for * which purpose. */ +#define GPIO_AC_PRESENT GPIO_ACOK_OD #define GPIO_ENTERING_RW GPIO_EC_ENTERING_RW #define GPIO_LID_OPEN GPIO_EC_LID_OPEN +#define GPIO_PCH_WAKE_L GPIO_EC_PCH_WAKE_ODL +#define GPIO_PCH_PWRBTN_L GPIO_EC_PCH_PWR_BTN_ODL +#define GPIO_POWER_BUTTON_L GPIO_H1_EC_PWR_BTN_ODL +#define GPIO_SYS_RESET_L GPIO_EC_RST_ODL #define GPIO_WP_L GPIO_EC_WP_L diff --git a/board/volteer/ec.tasklist b/board/volteer/ec.tasklist index 6e1791520d..f8b67701bf 100644 --- a/board/volteer/ec.tasklist +++ b/board/volteer/ec.tasklist @@ -10,4 +10,5 @@ #define CONFIG_TASK_LIST \ TASK_ALWAYS(HOOKS, hook_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(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 7b9ee14a04..e54b679a84 100644 --- a/board/volteer/gpio.inc +++ b/board/volteer/gpio.inc @@ -11,6 +11,8 @@ /* Wake Source interrupts */ GPIO_INT(EC_LID_OPEN, PIN(D, 2), GPIO_INT_BOTH | GPIO_HIB_WAKE_HIGH, lid_interrupt) GPIO_INT(EC_WP_L, PIN(A, 1), GPIO_INT_BOTH, switch_interrupt) +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 */ @@ -23,7 +25,10 @@ GPIO_INT(EC_WP_L, PIN(A, 1), GPIO_INT_BOTH, switch_interrupt) /* Volume button interrupts */ /* AP Signals */ +GPIO(EC_RST_ODL, PIN(0, 2), GPIO_ODR_HIGH) GPIO(EC_ENTERING_RW, PIN(E, 3), GPIO_OUT_LOW) +GPIO(EC_PCH_WAKE_ODL, PIN(7, 4), GPIO_ODR_HIGH) +GPIO(EC_PCH_PWR_BTN_ODL, PIN(C, 1), GPIO_ODR_HIGH) /* USB and USBC Signals */ |