summaryrefslogtreecommitdiff
path: root/include/chipset.h
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2020-08-06 15:56:45 -0700
committerCommit Bot <commit-bot@chromium.org>2020-08-08 01:48:32 +0000
commit1a182fd225d9a39c535058d8ce1d48a5ad1c96bc (patch)
treeece4be5f75c0490828881c28f403539553816097 /include/chipset.h
parent67944274aa8b0639e3e23eacd8cf277908874d5f (diff)
downloadchrome-ec-1a182fd225d9a39c535058d8ce1d48a5ad1c96bc.tar.gz
sc7180: Monitor AP_RST_L from PMIC to notify HOOK_CHIPSET_RESET
The HOOK_CHIPSET_RESET should be notified when the AP resets. In x86 platforms, EC monitors the LPC LRESET pin. This LRESET pin is asserted when the chipset resets. However, ARM platforms don't use LPC. We need another way to monitor AP reset. This CL modifies the SC7180 power sequence, to monitor the AP_RST_L signal from PMIC. PMIC uses the AP_RST_L to notify AP reset. A complete warm reset sequence will toggle the AP_RST_L signal 3 times. EC monitors the AP_RST_L signal and wait it transition 3 times to notify the HOOK_CHIPSET_RESET. In case, the AP_RST_L is not toggled 3 times, still notifies the hook but prints a warning message. BRANCH=None BUG=b:163078082 TEST=Checked the HOOK_CHIPSET_RESET is notified after AP warm reset. Change-Id: I4e7b0f0d266e01526deaf54afcdfd2ac1037b8f6 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2343753 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Diffstat (limited to 'include/chipset.h')
-rw-r--r--include/chipset.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/chipset.h b/include/chipset.h
index 8664f6ecf3..e2c1421ec6 100644
--- a/include/chipset.h
+++ b/include/chipset.h
@@ -207,6 +207,7 @@ static inline void chipset_handle_espi_reset_assert(void) { }
static inline void chipset_handle_reboot(void) { }
static inline void chipset_reset_request_interrupt(enum gpio_signal signal) { }
static inline void chipset_warm_reset_interrupt(enum gpio_signal signal) { }
+static inline void chipset_ap_rst_interrupt(enum gpio_signal signal) { }
static inline void chipset_power_good_interrupt(enum gpio_signal signal) { }
static inline void chipset_watchdog_interrupt(enum gpio_signal signal) { }
@@ -234,6 +235,14 @@ void chipset_handle_reboot(void);
void chipset_reset_request_interrupt(enum gpio_signal signal);
/**
+ * GPIO interrupt handler of AP_RST_L signal from PMIC.
+ * PMIC uses this signal to notify AP reset.
+ *
+ * It is used in Qualcomm chipset power sequence.
+ */
+void chipset_ap_rst_interrupt(enum gpio_signal signal);
+
+/**
* GPIO interrupt handler of warm reset signal from servo or H1.
*
* It is used in Qualcomm chipset power sequence.