From 103197eeadb9cb489831f06ea47e0eedf0a4801d Mon Sep 17 00:00:00 2001 From: Rajesh Kumar Date: Fri, 12 Nov 2021 11:02:25 -0800 Subject: zephyr: brya: Enable configuration for throttle ap Enable required configs for throttle ap. BUG=b:200975143 BRANCH=none TEST=zmake configure -B ~/tmp/brya brya -b TEST=EC boot up logs and 'apthrottle' command Signed-off-by: Rajesh Kumar Change-Id: Iac3f4fbb6a479fdcf7b0cff58b12e1111b59e872 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3278635 Reviewed-by: Keith Short Reviewed-by: Divya S Sasidharan Reviewed-by: Tanu Malhotra Commit-Queue: Keith Short --- zephyr/projects/brya/brya/gpio.dts | 5 +++++ zephyr/projects/brya/brya/include/gpio_map.h | 6 +++++- zephyr/projects/brya/brya/prj.conf | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/zephyr/projects/brya/brya/gpio.dts b/zephyr/projects/brya/brya/gpio.dts index 9ec2af0a12..daaa2db547 100644 --- a/zephyr/projects/brya/brya/gpio.dts +++ b/zephyr/projects/brya/brya/gpio.dts @@ -142,6 +142,11 @@ enum-name = "GPIO_ENABLE_BACKLIGHT"; label = "EC_EDP_BL_EN"; }; + ec_prochot_in_l { + gpios = <&gpiof 0 GPIO_INPUT>; + enum-name = "GPIO_EC_PROCHOT_IN_L"; + label = "EC_PROCHOT_IN_L"; + }; }; hibernate-wake-pins { diff --git a/zephyr/projects/brya/brya/include/gpio_map.h b/zephyr/projects/brya/brya/include/gpio_map.h index 978b0a921c..ab0224d0d4 100644 --- a/zephyr/projects/brya/brya/include/gpio_map.h +++ b/zephyr/projects/brya/brya/include/gpio_map.h @@ -31,8 +31,11 @@ #ifdef CONFIG_PLATFORM_EC_POWERSEQ #define POWER_SIGNAL_INT(gpio, edge) \ GPIO_INT(gpio, edge, power_signal_interrupt) +#define AP_PROCHOT_INT(gpio, edge) \ + GPIO_INT(gpio, edge, throttle_ap_prochot_input_interrupt) #else #define POWER_SIGNAL_INT(gpio, edge) +#define AP_PROCHOT_INT(gpio, edge) #endif @@ -47,5 +50,6 @@ POWER_SIGNAL_INT(GPIO_SLP_SUS_L, GPIO_INT_EDGE_BOTH) \ POWER_SIGNAL_INT(GPIO_PG_EC_DSW_PWROK, GPIO_INT_EDGE_BOTH) \ POWER_SIGNAL_INT(GPIO_PG_EC_RSMRST_ODL, GPIO_INT_EDGE_BOTH) \ - POWER_SIGNAL_INT(GPIO_PG_EC_ALL_SYS_PWRGD, GPIO_INT_EDGE_BOTH) + POWER_SIGNAL_INT(GPIO_PG_EC_ALL_SYS_PWRGD, GPIO_INT_EDGE_BOTH) \ + AP_PROCHOT_INT(GPIO_EC_PROCHOT_IN_L, GPIO_INT_EDGE_BOTH) #endif /* __ZEPHYR_GPIO_MAP_H */ diff --git a/zephyr/projects/brya/brya/prj.conf b/zephyr/projects/brya/brya/prj.conf index 13ef01133f..ddab2aee28 100644 --- a/zephyr/projects/brya/brya/prj.conf +++ b/zephyr/projects/brya/brya/prj.conf @@ -62,3 +62,4 @@ CONFIG_PLATFORM_EC_POWERSEQ_S0IX=y CONFIG_PLATFORM_EC_POWER_SLEEP_FAILURE_DETECTION=y # Treat 2nd reset from H1 as Power-On CONFIG_PLATFORM_EC_BOARD_RESET_AFTER_POWER_ON=y +CONFIG_PLATFORM_EC_THROTTLE_AP=y -- cgit v1.2.1