summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2013-11-14 16:28:37 -0600
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-11-15 01:39:42 +0000
commit83ec930b36b1e36a534e818659c78abfbed8a87d (patch)
tree9a52eb89cd82d53619663a7939e92a932ec94e78
parent4b59746600936bfec377e19a01e5ccb90e6e1c48 (diff)
downloadchrome-ec-83ec930b36b1e36a534e818659c78abfbed8a87d.tar.gz
lm4: allow the lpc module to use GPIO for SCI
The LPC module has a dedicated control for SCI#. However, certain situations require a dedicated GPIO for asserting the SCI# signal. Introduce CONFIG_SCI_GPIO to meet this requirement. BUG=chrome-os-partner:24003 BRANCH=None TEST=Built and booted rambi with dependency change. 'lidclose' and 'lidopen' cause ACPI interrupts. Change-Id: I34c5f0ba5ff60151972921f251c71d3769a9ef8b Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/176804 Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--chip/lm4/lpc.c6
-rw-r--r--include/config.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/chip/lm4/lpc.c b/chip/lm4/lpc.c
index 7bfcc35dd0..610517571c 100644
--- a/chip/lm4/lpc.c
+++ b/chip/lm4/lpc.c
@@ -141,7 +141,13 @@ static void lpc_generate_smi(void)
*/
static void lpc_generate_sci(void)
{
+#ifdef CONFIG_SCI_GPIO
+ gpio_set_level(CONFIG_SCI_GPIO, 0);
+ udelay(65);
+ gpio_set_level(CONFIG_SCI_GPIO, 1);
+#else
LM4_LPC_LPCCTL |= LM4_LPC_SCI_START;
+#endif
if (host_events & event_mask[LPC_HOST_EVENT_SCI])
CPRINTF("[%T sci 0x%08x]\n",
diff --git a/include/config.h b/include/config.h
index 002d509def..3167e00d8c 100644
--- a/include/config.h
+++ b/include/config.h
@@ -588,6 +588,9 @@
*/
#undef CONFIG_SAVE_VBOOT_HASH
+/* Allow the board to use a GPIO for the SCI# signal. */
+#undef CONFIG_SCI_GPIO
+
/* Support SPI interfaces */
#undef CONFIG_SPI