summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajesh Kumar <rajesh3.kumar@intel.com>2021-11-12 11:02:25 -0800
committerCommit Bot <commit-bot@chromium.org>2021-11-23 21:25:47 +0000
commit103197eeadb9cb489831f06ea47e0eedf0a4801d (patch)
tree8e3933a18f7b5848f6be5692e852a2d2922bfa2d
parentee068bec745199a345cfb5561dceab179be26a49 (diff)
downloadchrome-ec-103197eeadb9cb489831f06ea47e0eedf0a4801d.tar.gz
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 <rajesh3.kumar@intel.com> Change-Id: Iac3f4fbb6a479fdcf7b0cff58b12e1111b59e872 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3278635 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Divya S Sasidharan <divya.s.sasidharan@intel.com> Reviewed-by: Tanu Malhotra <tanu.malhotra@intel.com> Commit-Queue: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/projects/brya/brya/gpio.dts5
-rw-r--r--zephyr/projects/brya/brya/include/gpio_map.h6
-rw-r--r--zephyr/projects/brya/brya/prj.conf1
3 files changed, 11 insertions, 1 deletions
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