summaryrefslogtreecommitdiff
path: root/board/it83xx_evb/gpio.inc
diff options
context:
space:
mode:
authorDino Li <dino.li@ite.com.tw>2016-05-03 13:35:51 +0800
committerchrome-bot <chrome-bot@chromium.org>2016-05-03 22:00:49 -0700
commit32bf8ecb773e0c6da80ef06b26375742fa287704 (patch)
tree60d95ebe40ac81399a0df7b49f52a005c93f58e4 /board/it83xx_evb/gpio.inc
parente83c06bf90f89ea8c160c9f88b166d0c2e0a982d (diff)
downloadchrome-ec-32bf8ecb773e0c6da80ef06b26375742fa287704.tar.gz
board: rename it8380dev to it83xx_evb
Unified board name for IT83-series. Signed-off-by: Dino Li <dino.li@ite.com.tw> BRANCH=none BUG=none TEST="make BOARD=it83xx_evb -j" and "make buildall -j" Change-Id: Ic96d0132fb31fcc8715d0dd810f8bd340035a640 Reviewed-on: https://chromium-review.googlesource.com/341843 Commit-Ready: Dino Li <dino.li@ite.com.tw> Tested-by: Dino Li <dino.li@ite.com.tw> Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'board/it83xx_evb/gpio.inc')
-rw-r--r--board/it83xx_evb/gpio.inc78
1 files changed, 78 insertions, 0 deletions
diff --git a/board/it83xx_evb/gpio.inc b/board/it83xx_evb/gpio.inc
new file mode 100644
index 0000000000..51c9167b92
--- /dev/null
+++ b/board/it83xx_evb/gpio.inc
@@ -0,0 +1,78 @@
+/* -*- mode:c -*-
+ *
+ * Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* Declare symbolic names for all the GPIOs that we care about.
+ * Note: Those with interrupt handlers must be declared first. */
+
+GPIO_INT(POWER_BUTTON_L, PIN(E, 4), GPIO_INT_BOTH | GPIO_PULL_UP, power_button_interrupt)
+GPIO_INT(PCH_PLTRST_L, PIN(E, 3), GPIO_INT_BOTH | GPIO_PULL_UP, lpcrst_interrupt)
+GPIO_INT(LID_OPEN, PIN(E, 2), GPIO_INT_BOTH | GPIO_PULL_DOWN, lid_interrupt)
+GPIO_INT(WP_L, PIN(E, 1), GPIO_INT_BOTH, switch_interrupt) /* Write protect input */
+#ifdef CONFIG_LOW_POWER_IDLE
+GPIO_INT(UART1_RX, PIN(B, 0), GPIO_INT_FALLING, uart_deepsleep_interrupt) /* UART1 RX input */
+#endif
+
+GPIO(CAPS_LED, PIN(H, 1), GPIO_OUT_LOW)
+GPIO(SCRO_LED, PIN(H, 2), GPIO_OUT_LOW)
+GPIO(PCH_SMI_L, PIN(D, 3), GPIO_OUT_HIGH)
+GPIO(PCH_SCI_L, PIN(D, 4), GPIO_OUT_HIGH)
+GPIO(GATE_A20_H, PIN(B, 5), GPIO_OUT_HIGH)
+GPIO(PCH_RCIN_L, PIN(B, 6), GPIO_OUT_HIGH)
+GPIO(LPC_CLKRUN_L, PIN(H, 0), GPIO_OUT_LOW)
+GPIO(PCH_WAKE_L, PIN(B, 7), GPIO_ODR_HIGH) /* Wake signal from EC to PCH */
+
+GPIO(I2C_A_SCL, PIN(B, 3), GPIO_INPUT)
+GPIO(I2C_A_SDA, PIN(B, 4), GPIO_INPUT)
+GPIO(I2C_B_SCL, PIN(C, 1), GPIO_INPUT)
+GPIO(I2C_B_SDA, PIN(C, 2), GPIO_INPUT)
+#ifdef CONFIG_IT83XX_SMCLK2_ON_GPC7
+GPIO(I2C_C_SCL, PIN(C, 7), GPIO_INPUT)
+#else
+GPIO(I2C_C_SCL, PIN(F, 6), GPIO_INPUT)
+#endif
+GPIO(I2C_C_SDA, PIN(F, 7), GPIO_INPUT)
+
+GPIO(I2C_E_SCL, PIN(E, 0), GPIO_INPUT)
+GPIO(I2C_E_SDA, PIN(E, 7), GPIO_INPUT)
+
+#ifdef CONFIG_UART_HOST
+GPIO(UART2_SIN1, PIN(H, 1), GPIO_INPUT)
+GPIO(UART2_SOUT1, PIN(H, 2), GPIO_INPUT)
+#else
+GPIO(I2C_D_SCL, PIN(H, 1), GPIO_INPUT)
+GPIO(I2C_D_SDA, PIN(H, 2), GPIO_INPUT)
+#endif
+
+/* KSO/KSI pins can be used as GPIO input. */
+GPIO(BOARD_VERSION1, PIN(KSO_H, 5), GPIO_INPUT)
+GPIO(BOARD_VERSION2, PIN(KSO_H, 6), GPIO_INPUT)
+GPIO(BOARD_VERSION3, PIN(KSO_H, 7), GPIO_INPUT)
+
+/* Unimplemented signals which we need to emulate for now */
+UNIMPLEMENTED(ENTERING_RW)
+
+ALTERNATE(PIN_MASK(B, 0x03), 1, MODULE_UART, GPIO_PULL_UP) /* UART1 */
+#ifdef CONFIG_UART_HOST
+ALTERNATE(PIN_MASK(H, 0x06), 1, MODULE_UART, 0) /* UART2 */
+#else
+ALTERNATE(PIN_MASK(H, 0x06), 1, MODULE_I2C, 0) /* I2C D SCL/SDA H1/H2 */
+#endif
+ALTERNATE(PIN_MASK(A, 0x40), 3, MODULE_SPI, 0) /* SSCK of SPI */
+ALTERNATE(PIN_MASK(C, 0x28), 3, MODULE_SPI, 0) /* SMOSI/SMISO of SPI */
+ALTERNATE(PIN_MASK(G, 0x01), 3, MODULE_SPI, 0) /* SSCE1# of SPI */
+ALTERNATE(PIN_MASK(G, 0x04), 3, MODULE_SPI, 0) /* SSCE0# of SPI */
+ALTERNATE(PIN_MASK(A, 0x80), 1, MODULE_PWM, 0) /* PWM7 for FAN1 */
+ALTERNATE(PIN_MASK(D, 0x40), 3, MODULE_PWM, 0) /* TACH0A for FAN1 */
+ALTERNATE(PIN_MASK(B, 0x18), 1, MODULE_I2C, 0) /* I2C A SCL/SDA */
+#ifdef CONFIG_IT83XX_SMCLK2_ON_GPC7
+ALTERNATE(PIN_MASK(C, 0x86), 1, MODULE_I2C, 0) /* I2C B SCL/SDA, C SCL */
+ALTERNATE(PIN_MASK(F, 0x80), 1, MODULE_I2C, 0) /* I2C C SDA */
+#else
+ALTERNATE(PIN_MASK(C, 0x06), 1, MODULE_I2C, 0) /* I2C B SCL/SDA */
+ALTERNATE(PIN_MASK(F, 0xC0), 1, MODULE_I2C, 0) /* I2C C SCL/SDA */
+#endif
+ALTERNATE(PIN_MASK(E, 0x81), 1, MODULE_I2C, 0) /* I2C E SCL/SDA E0/E7 */