summaryrefslogtreecommitdiff
path: root/board/coral/board.h
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2017-08-22 13:56:06 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-09-08 15:05:12 -0700
commit6010e6c98ec35f87ae74d38c9c6cfdceff4a9a95 (patch)
treea36713d119d0511c48f7e0267124d6e67ffa4aa2 /board/coral/board.h
parent7b96b2784d21dc47897ec1e6e22aa74afdaa4fa6 (diff)
downloadchrome-ec-6010e6c98ec35f87ae74d38c9c6cfdceff4a9a95.tar.gz
coral: Add support for multiple batteries
- This CL adds the infrastructre needed to support different battery types for the Coral project. - This includes adding a battery_check_disconnect common function that's used folloiwng battery cutoff events to ensure that the battery is able to provide power before reporting it as present. When the battery is not present, there is a 1 second delay used before allowing the battery to report as present. This specific change is motivated by an issue discovered on Eve which resulted in H1 power rail issues and could lock up the H1. https://chromium-review.googlesource.com/c/592717 https://chromium-review.googlesource.com/c/585837 - This includes a battery_cutt_off_battery common function that can be used by all battery types using the register and regiseter data required for each battery's ship mode. BUG=b:64772598,b:64728711,b:64821365 BRANCH=None TEST=manual testing on Coral proto with Sanyo battery and tested on Nasher with BYD and LGC-LGC.593 batteries. Verified that battery cutoff command via EC console works. Verified that can start up as expected following battery cutoff. Also tested battery cutoff initiated by removing the battery from the system while it's powered up. Also tested 'ectool batterycutoff at-shutdown' from the AP console and verifed that battery cutoff was successful following 'apshutdown' on the EC console. Change-Id: I9d884efa9d64fb94d46447feb028c5d9ae82a20f Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/627496 Commit-Ready: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'board/coral/board.h')
-rw-r--r--board/coral/board.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/board/coral/board.h b/board/coral/board.h
index 06f8ccb164..057b005c9e 100644
--- a/board/coral/board.h
+++ b/board/coral/board.h
@@ -41,6 +41,7 @@
/* Battery */
#define CONFIG_BATTERY_DEVICE_CHEMISTRY "LION"
#define CONFIG_BATTERY_CUT_OFF
+#define CONFIG_BATTERY_HW_PRESENT_CUSTOM
#define CONFIG_BATTERY_PRESENT_CUSTOM
#define CONFIG_BATTERY_SMART