From e297b7256344a2365da7f5675eac3340a58f5955 Mon Sep 17 00:00:00 2001 From: Louis Yung-Chieh Lo Date: Fri, 1 Nov 2013 16:54:20 -0700 Subject: Refine GPIO list of Nyan. Refine the GPIO list according to the schematic. Comment out the XPSHOLD in power/tegra.c for compiling. Will fix later. BUG=None BRANCH=None TEST=emerge-nyan chromeos-ec && make runtests -j 32 && make BOARD=nyan tests -j 32 Change-Id: Id0d682fd5d48e8a8a07785e86c07f45f07d866ab Signed-off-by: Louis Yung-Chieh Lo Reviewed-on: https://chromium-review.googlesource.com/175534 --- board/nyan/board.c | 15 +++++++++------ board/nyan/board.h | 8 ++++++-- 2 files changed, 15 insertions(+), 8 deletions(-) (limited to 'board/nyan') diff --git a/board/nyan/board.c b/board/nyan/board.c index 0ea3c5020a..19cbfb08b1 100644 --- a/board/nyan/board.c +++ b/board/nyan/board.c @@ -28,8 +28,6 @@ const struct gpio_info gpio_list[] = { /* Inputs with interrupt handlers are first for efficiency */ {"KB_PWR_ON_L", GPIO_B, (1<<5), GPIO_INT_BOTH, power_interrupt}, - {"XPSHOLD", GPIO_A, (1<<3), GPIO_INT_BOTH, power_interrupt}, - {"CHARGER_INT", GPIO_C, (1<<6), GPIO_INT_RISING, NULL}, {"LID_OPEN", GPIO_C, (1<<13), GPIO_INT_BOTH, lid_interrupt}, {"SUSPEND_L", GPIO_C, (1<<7), GPIO_KB_INPUT, power_interrupt}, {"SPI1_NSS", GPIO_A, (1<<4), GPIO_INT_BOTH | GPIO_PULL_UP, @@ -62,7 +60,7 @@ const struct gpio_info gpio_list[] = { {"I2C1_SDA", GPIO_B, (1<<7), GPIO_ODR_HIGH, NULL}, {"I2C2_SCL", GPIO_B, (1<<10), GPIO_ODR_HIGH, NULL}, {"I2C2_SDA", GPIO_B, (1<<11), GPIO_ODR_HIGH, NULL}, - {"LED_POWER_L", GPIO_A, (1<<2), GPIO_OUT_HIGH, NULL}, + {"LED_POWER_L", GPIO_A, (1<<2), GPIO_OUT_HIGH, NULL}, {"PMIC_PWRON_L", GPIO_A, (1<<12), GPIO_OUT_HIGH, NULL}, {"PMIC_RESET", GPIO_A, (1<<15), GPIO_OUT_LOW, NULL}, {"KB_OUT00", GPIO_B, (1<<0), GPIO_KB_OUTPUT, NULL}, @@ -77,16 +75,21 @@ const struct gpio_info gpio_list[] = { {"KB_OUT09", GPIO_B, (1<<1), GPIO_KB_OUTPUT, NULL}, {"KB_OUT10", GPIO_C, (1<<5), GPIO_KB_OUTPUT, NULL}, {"KB_OUT11", GPIO_C, (1<<4), GPIO_KB_OUTPUT, NULL}, - {"KB_OUT12", GPIO_A, (1<<13), GPIO_KB_OUTPUT, NULL}, + {"KB_OUT12", GPIO_A, (1<<13), GPIO_KB_OUTPUT, NULL}, + {"PWR_LED0", GPIO_B, (1<<10), GPIO_OUT_LOW, NULL}, + {"PWR_LED1", GPIO_A, (1<<2), GPIO_OUT_LOW, NULL}, + {"BAT_LED0", GPIO_B, (1<<11), GPIO_OUT_LOW, NULL}, + {"BAT_LED1", GPIO_A, (1<<8), GPIO_OUT_LOW, NULL}, + {"CHARGING", GPIO_A, (1<<11), GPIO_OUT_LOW, NULL}, + {"EC_BL_OVERRIDE", GPIO_H, (1<<1), GPIO_ODR_LOW, NULL}, }; BUILD_ASSERT(ARRAY_SIZE(gpio_list) == GPIO_COUNT); /* Pins with alternate functions */ const struct gpio_alt_func gpio_alt_funcs[] = { - {GPIO_A, 0x0004, GPIO_ALT_TIM2, MODULE_POWER_LED}, {GPIO_A, 0x00f0, GPIO_ALT_SPI, MODULE_SPI}, {GPIO_A, 0x0600, GPIO_ALT_USART, MODULE_UART}, - {GPIO_B, 0x0cc0, GPIO_ALT_I2C, MODULE_I2C}, + {GPIO_B, 0x00c0, GPIO_ALT_I2C, MODULE_I2C}, }; const int gpio_alt_funcs_count = ARRAY_SIZE(gpio_alt_funcs); diff --git a/board/nyan/board.h b/board/nyan/board.h index d31eae6b48..8f90bd66ef 100644 --- a/board/nyan/board.h +++ b/board/nyan/board.h @@ -40,8 +40,6 @@ enum gpio_signal { /* Inputs with interrupt handlers are first for efficiency */ GPIO_KB_PWR_ON_L = 0, - GPIO_SOC1V8_XPSHOLD, - GPIO_CHARGER_INT, GPIO_LID_OPEN, GPIO_SUSPEND_L, GPIO_SPI1_NSS, @@ -82,6 +80,12 @@ enum gpio_signal { GPIO_KB_OUT10, GPIO_KB_OUT11, GPIO_KB_OUT12, + GPIO_PWR_LED0, + GPIO_PWR_LED1, + GPIO_BAT_LED0, + GPIO_BAT_LED1, + GPIO_CHARGING, + GPIO_EC_BL_OVERRIDE, /* Number of GPIOs; not an actual GPIO */ GPIO_COUNT }; -- cgit v1.2.1