summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2014-05-06 10:28:28 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-05-07 03:39:20 +0000
commit165c7375da9641c9ab278c47b1135019a79c84f8 (patch)
tree9b92d5949c300f34f86533f7ca6b1a307ed54187
parent6ed3fe80b2c3320bb49dbb23286316d1a3d5616c (diff)
downloadchrome-ec-165c7375da9641c9ab278c47b1135019a79c84f8.tar.gz
fruitpie: handle dead battery
ensure that the board will get power from VBUS by default, so it can start-up if it's own battery is fully drained. Also increase the console stack as the battery code footprint is growing over time. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=chrome-os-partner:28311 TEST=plug a Fruitpie without battery to a Zinger. Change-Id: I971040da9bedb7bf46363787a13220c39a78100d Reviewed-on: https://chromium-review.googlesource.com/198557 Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--board/fruitpie/board.c2
-rw-r--r--board/fruitpie/ec.tasklist2
-rw-r--r--board/fruitpie/usb_pd_config.h4
3 files changed, 4 insertions, 4 deletions
diff --git a/board/fruitpie/board.c b/board/fruitpie/board.c
index 6a3a326633..c715b86c0e 100644
--- a/board/fruitpie/board.c
+++ b/board/fruitpie/board.c
@@ -50,7 +50,7 @@ const struct gpio_info gpio_list[] = {
/* Power and muxes control */
{"PP5000_EN", GPIO_A, (1<<5), GPIO_OUT_HIGH, NULL},
{"CC_HOST", GPIO_A, (1<<6), GPIO_OUT_LOW, NULL},
- {"CHARGE_EN_L", GPIO_A, (1<<8), GPIO_OUT_HIGH, NULL},
+ {"CHARGE_EN_L", GPIO_A, (1<<8), GPIO_OUT_LOW, NULL},
{"USB_C_5V_EN", GPIO_A, (1<<10), GPIO_OUT_LOW, NULL},
{"VCONN1_EN", GPIO_B, (1<<15), GPIO_OUT_LOW, NULL},
{"VCONN2_EN", GPIO_C, (1<<14), GPIO_OUT_LOW, NULL},
diff --git a/board/fruitpie/ec.tasklist b/board/fruitpie/ec.tasklist
index e9c8c1cc1f..a8250d57c1 100644
--- a/board/fruitpie/ec.tasklist
+++ b/board/fruitpie/ec.tasklist
@@ -18,5 +18,5 @@
*/
#define CONFIG_TASK_LIST \
TASK_ALWAYS(HOOKS, hook_task, NULL, TASK_STACK_SIZE) \
- TASK_ALWAYS(CONSOLE, console_task, NULL, TASK_STACK_SIZE) \
+ TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) \
TASK_ALWAYS(PD, pd_task, NULL, TASK_STACK_SIZE)
diff --git a/board/fruitpie/usb_pd_config.h b/board/fruitpie/usb_pd_config.h
index 52f5448aa2..e3a0ab2302 100644
--- a/board/fruitpie/usb_pd_config.h
+++ b/board/fruitpie/usb_pd_config.h
@@ -82,8 +82,8 @@ static inline void pd_set_host_mode(int enable)
/* UFP-side : threshold for DFP connection detection */
#define PD_SNK_VA 200 /* mV */
-/* we are a dev board, wait for the user to tell us what we should do */
-#define PD_DEFAULT_STATE PD_STATE_DISABLED
+/* start as a sink in case we have no other power supply/battery */
+#define PD_DEFAULT_STATE PD_STATE_SNK_DISCONNECTED
/* delay necessary for the voltage transition on the power supply */
#define PD_POWER_SUPPLY_TRANSITION_DELAY 50000 /* us */