diff options
author | Denis Brockus <dbrockus@google.com> | 2021-05-13 16:01:13 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-05-19 19:57:44 +0000 |
commit | def759427d9bc1781e7b23a536694fd0ab8bb01f (patch) | |
tree | bb48994d08866dadd22f9ac8c6112a867a2c819c /zephyr/projects/asurada/hayato | |
parent | ba6eac081e5b4982346dc63059b4513786b379f7 (diff) | |
download | chrome-ec-def759427d9bc1781e7b23a536694fd0ab8bb01f.tar.gz |
zephyr: asurada: Enable power button and sequencing
BUG=b:180980668
BRANCH=none
TEST=get powerbtn command in shell
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I1af4673b7eff84149e3aabad7ff09445a1f96e1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2895306
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'zephyr/projects/asurada/hayato')
-rw-r--r-- | zephyr/projects/asurada/hayato/CMakeLists.txt | 3 | ||||
-rw-r--r-- | zephyr/projects/asurada/hayato/include/gpio_map.h | 21 | ||||
-rw-r--r-- | zephyr/projects/asurada/hayato/prj.conf | 12 |
3 files changed, 34 insertions, 2 deletions
diff --git a/zephyr/projects/asurada/hayato/CMakeLists.txt b/zephyr/projects/asurada/hayato/CMakeLists.txt index 1685dd6812..56eaed01ce 100644 --- a/zephyr/projects/asurada/hayato/CMakeLists.txt +++ b/zephyr/projects/asurada/hayato/CMakeLists.txt @@ -9,4 +9,7 @@ set(BOARD_ROOT "${CMAKE_CURRENT_LIST_DIR}/..") find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(hayato) +set(PLATFORM_EC_BASEBOARD "${PLATFORM_EC}/baseboard/asurada" CACHE PATH + "Path to the platform/ec baseboard directory") + zephyr_include_directories(include) diff --git a/zephyr/projects/asurada/hayato/include/gpio_map.h b/zephyr/projects/asurada/hayato/include/gpio_map.h index 1c9752ca6e..180134049a 100644 --- a/zephyr/projects/asurada/hayato/include/gpio_map.h +++ b/zephyr/projects/asurada/hayato/include/gpio_map.h @@ -27,7 +27,24 @@ * #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) +#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, power_button_interrupt) + + + +#define GPIO_EN_PP5000 GPIO_EN_PP5000_A + +/* + * TODO(b:188674805) create a driver to pull this information from DeviceTree + */ +enum power_signal { + PMIC_PWR_GOOD, + AP_IN_S3_L, + AP_WDT_ASSERTED, + POWER_SIGNAL_COUNT, +}; #endif /* __ZEPHYR_GPIO_MAP_H */ diff --git a/zephyr/projects/asurada/hayato/prj.conf b/zephyr/projects/asurada/hayato/prj.conf index 3d7c1959ca..5188b5692a 100644 --- a/zephyr/projects/asurada/hayato/prj.conf +++ b/zephyr/projects/asurada/hayato/prj.conf @@ -6,11 +6,13 @@ CONFIG_CROS_EC=y CONFIG_PLATFORM_EC=y CONFIG_SHIMMED_TASKS=y +CONFIG_KERNEL_SHELL=y CONFIG_PLATFORM_EC_BRINGUP=y # SoC configuration CONFIG_AP=y CONFIG_AP_ARM_MTK_MT8192=y +CONFIG_HAS_TASK_CHIPSET=y # ADC Driver CONFIG_ADC_ITE_IT8XXX2=y @@ -27,6 +29,16 @@ CONFIG_PLATFORM_EC_I2C=y # Lid Switch CONFIG_PLATFORM_EC_LID_SWITCH=y +# Power Button +CONFIG_PLATFORM_EC_POWER_BUTTON=y + +# Power Sequencing +CONFIG_PLATFORM_EC_POWERSEQ=y +CONFIG_PLATFORM_EC_POWERSEQ_HOST_SLEEP=y +CONFIG_PLATFORM_EC_POWERSEQ_IT8XXX2=y +CONFIG_PLATFORM_EC_EXTPOWER_GPIO=y +CONFIG_PLATFORM_EC_CHIPSET_RESET_HOOK=y + # Serial Host Interface (SHI) device. CONFIG_CROS_SHI_IT8XXX2=y |