summaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/include/soc/gpio.h
diff options
context:
space:
mode:
authorShaunak Saha <shaunak.saha@intel.com>2016-06-07 02:06:28 -0700
committerAaron Durbin <adurbin@chromium.org>2016-07-02 03:30:28 +0200
commit5b6c5a500ed416f033a22eed1d8174063ebaf143 (patch)
tree6dca69cee7e72887a48579c25f58141713dfc58a /src/soc/intel/apollolake/include/soc/gpio.h
parent0b806285a7819397a5fede24cfdcf7c09d0caa1c (diff)
downloadcoreboot-5b6c5a500ed416f033a22eed1d8174063ebaf143.tar.xz
soc/intel/apollolake: Add GPE routing code
This patch adds the basic framework for SCI to GPE routing code. BUG = chrome-os-partner:53438 TEST = Toogle pch_sci_l from ec console using gpioset command and see that the sci counter increases in /sys/firmware/acpi/interrupt and also 9 in /proc/interrupts. Change-Id: I3b3198276530bf6513d94e9bea02ab9751212adf Signed-off-by: Shaunak Saha <shaunak.saha@intel.com> Reviewed-on: https://review.coreboot.org/15324 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/soc/intel/apollolake/include/soc/gpio.h')
-rw-r--r--src/soc/intel/apollolake/include/soc/gpio.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/soc/intel/apollolake/include/soc/gpio.h b/src/soc/intel/apollolake/include/soc/gpio.h
index c9d32ccf56..763cdefa4e 100644
--- a/src/soc/intel/apollolake/include/soc/gpio.h
+++ b/src/soc/intel/apollolake/include/soc/gpio.h
@@ -99,5 +99,16 @@ struct pad_config {
void gpio_configure_pad(const struct pad_config *cfg);
void gpio_configure_pads(const struct pad_config *cfg, size_t num_pads);
+/*
+ * Set the GPIO groups for the GPE blocks. The values from PMC register GPE_CFG
+ * are passed which is then mapped to proper groups for MISCCFG. This basically
+ * sets the MISCCFG register bits:
+ * dw0 = gpe0_route[11:8]. This is ACPI GPE0b.
+ * dw1 = gpe0_route[15:12]. This is ACPI GPE0c.
+ * dw2 = gpe0_route[19:16]. This is ACPI GPE0d.
+ */
+void gpio_route_gpe(uint8_t gpe0b, uint8_t gpe0c, uint8_t gpe0d);
+
#endif /* __ACPI__ */
+
#endif /* _SOC_APOLLOLAKE_GPIO_H_ */