summaryrefslogtreecommitdiff
path: root/board/samus/board.h
diff options
context:
space:
mode:
authorAnton Staaf <robotboy@chromium.org>2014-06-24 07:52:49 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-06-26 02:43:01 +0000
commit9ccfd4553e708a5df4be3aa18b97c75da3f6c1b9 (patch)
treebd10678c7ee25901de97260967b8bee4a849baa5 /board/samus/board.h
parent88c0ffd692b4e6d5fadc75bb15255e0684d6a1c9 (diff)
downloadchrome-ec-9ccfd4553e708a5df4be3aa18b97c75da3f6c1b9.tar.gz
gpio: Replace duplication in gpio declarations with X-macro file
Previously each board.h and board.c contained an enum and an array for gpio definitons that had to be manually kept in sync, with no compiler assistance other than that their lengths matched. This change adds a single gpio.inc file that declares all gpio's that a board uses and is used as an X-macro include file to generate both the gpio_signal enum and the gpio_list array. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=none TEST=make buildall -j Change-Id: If9c9feca968619a59ff9f20701359bcb9374e4da Reviewed-on: https://chromium-review.googlesource.com/205354 Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org>
Diffstat (limited to 'board/samus/board.h')
-rw-r--r--board/samus/board.h85
1 files changed, 1 insertions, 84 deletions
diff --git a/board/samus/board.h b/board/samus/board.h
index 7f41904f6a..2755eb3ff1 100644
--- a/board/samus/board.h
+++ b/board/samus/board.h
@@ -81,90 +81,7 @@
/* USB ports managed by the EC */
#define USB_PORT_COUNT 2
-/* GPIO signal definitions. */
-enum gpio_signal {
- /* Inputs with interrupt handlers are first for efficiency */
- GPIO_POWER_BUTTON_L = 0, /* Power button */
- GPIO_LID_OPEN, /* Lid switch */
- GPIO_AC_PRESENT, /* AC power present */
- GPIO_PCH_SLP_S0_L, /* SLP_S0# signal from PCH */
- GPIO_PCH_SLP_S3_L, /* SLP_S3# signal from PCH */
- GPIO_PCH_SLP_S5_L, /* SLP_S5# signal from PCH */
- GPIO_PCH_SLP_SUS_L, /* SLP_SUS# signal from PCH */
- GPIO_PCH_SUSWARN_L, /* SUSWARN# signal from PCH */
- GPIO_PP1050_PGOOD, /* Power good on 1.05V */
- GPIO_PP1200_PGOOD, /* Power good on 1.2V (DRAM) */
- GPIO_PP1800_PGOOD, /* Power good on 1.8V (DRAM) */
- GPIO_VCORE_PGOOD, /* Power good on core VR */
- GPIO_RECOVERY_L, /* Recovery signal from servo */
- GPIO_WP_L, /* Write protect input */
- GPIO_PCH_BL_EN, /* PCH backlight input */
- GPIO_JTAG_TCK, /* JTAG clock input */
- GPIO_UART0_RX, /* UART0 RX input */
- GPIO_ACCEL_INT, /* Combined accelerometer input */
- GPIO_CAPSENSE_INT_L, /* Capsense interrupt input */
- GPIO_PD_MCU_INT_L, /* Interrupt signal from PD MCU */
-
- /* Other inputs */
- GPIO_BOARD_VERSION1, /* Board version stuffing resistor 1 */
- GPIO_BOARD_VERSION2, /* Board version stuffing resistor 2 */
- GPIO_BOARD_VERSION3, /* Board version stuffing resistor 3 */
- GPIO_USB1_OC_L, /* USB port overcurrent warning */
- GPIO_USB1_STATUS_L, /* USB charger port 1 status output */
- GPIO_USB2_OC_L, /* USB port overcurrent warning */
- GPIO_USB2_STATUS_L, /* USB charger port 2 status output */
-
- /* Outputs */
- GPIO_CPU_PROCHOT, /* Force CPU to think it's overheated */
- GPIO_PP1200_EN, /* Enable 1.20V supply */
- GPIO_PP3300_DSW_EN, /* Enable 3.3V DSW rail */
- GPIO_PP3300_DSW_GATED_EN, /* Enable 3.3V Gated DSW and core VDD */
- GPIO_PP3300_LTE_EN, /* Enable LTE radio */
- GPIO_PP3300_WLAN_EN, /* Enable WiFi power */
- GPIO_PP3300_ACCEL_EN, /* Enable Accelerometer power */
- GPIO_PP1050_EN, /* Enable 1.05V regulator */
- GPIO_PP5000_USB_EN, /* Enable USB power */
- GPIO_PP5000_EN, /* Enable 5V supply */
- GPIO_PP1800_EN, /* Enable 1.8V supply */
- GPIO_SYS_PWROK, /* EC thinks everything is up and ready */
- GPIO_WLAN_OFF_L, /* Disable WiFi radio */
-
- GPIO_USB_MCU_RST_L, /* USB PD MCU reset */
- GPIO_ENABLE_BACKLIGHT, /* Enable backlight power */
- GPIO_ENABLE_TOUCHPAD, /* Enable touchpad power */
- GPIO_ENTERING_RW, /* Indicate when EC is entering RW code */
- GPIO_LIGHTBAR_RESET_L, /* Reset lightbar controllers */
- GPIO_PCH_DPWROK, /* Indicate when VccDSW is good */
- GPIO_PCH_RSMRST_L, /* Reset PCH resume power plane logic */
-
- GPIO_PCH_HDA_SDO, /* HDA_SDO signal to PCH; when high, ME
- * ignores security descriptor */
- GPIO_PCH_WAKE_L, /* Wake signal from EC to PCH */
- GPIO_PCH_NMI_L, /* Non-maskable interrupt pin to PCH */
- GPIO_PCH_PWRBTN_L, /* Power button output to PCH */
- GPIO_PCH_PWROK, /* PWROK / APWROK signals to PCH */
- GPIO_PCH_RCIN_L, /* RCIN# line to PCH (for 8042 emulation) */
- GPIO_PCH_SYS_RST_L, /* Reset PCH resume power plane logic */
- GPIO_PCH_SMI_L, /* System management interrupt to PCH */
- GPIO_TOUCHSCREEN_RESET_L, /* Reset touch screen */
- GPIO_PCH_ACOK, /* AC present signal buffered to PCH */
-#ifndef HEY_USE_BUILTIN_CLKRUN
- GPIO_LPC_CLKRUN_L, /* Dunno. Probably important, though. */
-#endif
- GPIO_USB1_CTL1, /* USB charger port 1 CTL1 output */
- GPIO_USB1_CTL2, /* USB charger port 1 CTL2 output */
- GPIO_USB1_CTL3, /* USB charger port 1 CTL3 output */
- GPIO_USB1_ENABLE, /* USB charger port 1 enable */
- GPIO_USB1_ILIM_SEL, /* USB charger port 1 ILIM_SEL output */
- GPIO_USB2_CTL1, /* USB charger port 2 CTL1 output */
- GPIO_USB2_CTL2, /* USB charger port 2 CTL2 output */
- GPIO_USB2_CTL3, /* USB charger port 2 CTL3 output */
- GPIO_USB2_ENABLE, /* USB charger port 2 enable */
- GPIO_USB2_ILIM_SEL, /* USB charger port 2 ILIM_SEL output */
-
- /* Number of GPIOs; not an actual GPIO */
- GPIO_COUNT
-};
+#include "gpio_signal.h"
/* x86 signal definitions */
enum x86_signal {