summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Lu <Devin.Lu@quantatw.com>2014-09-02 14:30:20 +0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-09-02 06:55:21 +0000
commit2e392d704e6790196cd50575d7cd5e14d1779c62 (patch)
treeba7e0497d3abc9e2d3eb517f9f5f53d429fe6fd1
parent42b6fe59fc72a3a209c2c717d4272e291f69060e (diff)
downloadchrome-ec-2e392d704e6790196cd50575d7cd5e14d1779c62.tar.gz
Candy: Add battery present function support
Add battery present pin. BUG=none BRANCH=rambi TEST=manual Check system can boot up quickly with ac only. Change-Id: I6daa4b35d904014134f88a511819e7c6602e2860 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/215901 Reviewed-by: Marc Jones <marc.jones@se-eng.com>
-rw-r--r--board/candy/board.c1
-rw-r--r--board/candy/board.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/board/candy/board.c b/board/candy/board.c
index ea570d42d4..6b5daaa556 100644
--- a/board/candy/board.c
+++ b/board/candy/board.c
@@ -80,6 +80,7 @@ const struct gpio_info gpio_list[] = {
{"PP1000_S0IX_PGOOD", LM4_GPIO_H, (1<<6), GPIO_INPUT, NULL},
{"USB1_OC_L", LM4_GPIO_E, (1<<7), GPIO_INPUT, NULL},
{"USB2_OC_L", LM4_GPIO_E, (1<<0), GPIO_INPUT, NULL},
+ {"BAT_PRESENT_L", LM4_GPIO_B, (1<<4), GPIO_INPUT, NULL},
/* Outputs; all unasserted by default except for reset signals */
{"CPU_PROCHOT", LM4_GPIO_B, (1<<5), GPIO_OUT_LOW, NULL},
diff --git a/board/candy/board.h b/board/candy/board.h
index cf2eabf5a8..a57355f74f 100644
--- a/board/candy/board.h
+++ b/board/candy/board.h
@@ -11,6 +11,7 @@
/* Optional features */
#define CONFIG_AP_HANG_DETECT
#define CONFIG_BACKLIGHT_LID
+#define CONFIG_BATTERY_PRESENT_GPIO GPIO_BAT_PRESENT_L
#define CONFIG_BATTERY_SMART
#define CONFIG_BOARD_VERSION
#define CONFIG_CHARGER
@@ -98,6 +99,7 @@ enum gpio_signal {
GPIO_PP1000_S0IX_PGOOD, /* Power good on 1.00V (S0iX supplies) */
GPIO_USB1_OC_L, /* USB port overcurrent warning */
GPIO_USB2_OC_L, /* USB port overcurrent warning */
+ GPIO_BAT_PRESENT_L, /* Battery present. Repurposed BAT_TEMP */
/* Outputs */
GPIO_CPU_PROCHOT, /* Force CPU to think it's overheated */