summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zephyr/projects/volteer/include/gpio_map.h9
-rw-r--r--zephyr/projects/volteer/prj.conf1
2 files changed, 7 insertions, 3 deletions
diff --git a/zephyr/projects/volteer/include/gpio_map.h b/zephyr/projects/volteer/include/gpio_map.h
index 6ed97a42e8..f6639ae03f 100644
--- a/zephyr/projects/volteer/include/gpio_map.h
+++ b/zephyr/projects/volteer/include/gpio_map.h
@@ -9,6 +9,7 @@
#include <devicetree.h>
#include <gpio_signal.h>
+#include "extpower.h"
#include "lid_switch.h"
#include "power_button.h"
@@ -20,6 +21,7 @@
* Note we only need to create aliases for GPIOs that are referenced in common
* platform/ec code.
*/
+#define GPIO_AC_PRESENT NAMED_GPIO(acok_od)
#define GPIO_CPU_PROCHOT NAMED_GPIO(ec_prochot_odl)
#define GPIO_EN_PP3300_A NAMED_GPIO(en_pp3300_a)
#define GPIO_EN_PP5000 NAMED_GPIO(en_pp5000_a)
@@ -55,9 +57,10 @@
* #define EC_CROS_GPIO_INTERRUPTS \
* GPIO_INT(NAMED_GPIO(h1_ec_pwr_btn_odl), GPIO_INT_EDGE_BOTH, button_print)
*/
-#define EC_CROS_GPIO_INTERRUPTS \
- GPIO_INT(GPIO_LID_OPEN, GPIO_INT_EDGE_BOTH, lid_interrupt) \
- GPIO_INT(GPIO_POWER_BUTTON_L, GPIO_INT_EDGE_BOTH, \
+#define EC_CROS_GPIO_INTERRUPTS \
+ GPIO_INT(GPIO_AC_PRESENT, GPIO_INT_EDGE_BOTH, extpower_interrupt) \
+ GPIO_INT(GPIO_LID_OPEN, GPIO_INT_EDGE_BOTH, lid_interrupt) \
+ GPIO_INT(GPIO_POWER_BUTTON_L, GPIO_INT_EDGE_BOTH, \
power_button_interrupt)
#endif /* __ZEPHYR_GPIO_MAP_H */
diff --git a/zephyr/projects/volteer/prj.conf b/zephyr/projects/volteer/prj.conf
index 64ba01055f..0dcebfcb10 100644
--- a/zephyr/projects/volteer/prj.conf
+++ b/zephyr/projects/volteer/prj.conf
@@ -8,6 +8,7 @@ CONFIG_AP_X86_INTEL_TGL=y
CONFIG_CROS_EC_RO=y
CONFIG_PLATFORM_EC=y
CONFIG_I2C=y
+CONFIG_PLATFORM_EC_EXTPOWER_GPIO=y
CONFIG_PLATFORM_EC_KEYBOARD=y
CONFIG_PLATFORM_EC_LID_SWITCH=y
CONFIG_PLATFORM_EC_POWER_BUTTON=y