summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorLeo Zhou <zhoubo@huaqin.corp-partner.google.com>2019-04-09 15:32:24 +0800
committerchrome-bot <chrome-bot@chromium.org>2019-05-02 21:02:49 -0700
commit1d8aa53e02e66e878be02532e8a83ca78b7ceb9a (patch)
treea37a8e2743ef4b40e1470c02a35ad98d5358d9d4 /board
parentfd7a93dadd7428e771fc4533e6fb3fccb23c3a1b (diff)
downloadchrome-ec-1d8aa53e02e66e878be02532e8a83ca78b7ceb9a.tar.gz
flapjack: Customize EOC according to battery specification
The EOC should be set according to the battery specifications of different projects. BUG=b:128891165 BRANCH=none TEST=Do a full charge test Change-Id: I073a246e7694f277929f3159bb4d8692ac772b58 Reviewed-on: https://chromium-review.googlesource.com/1559096 Commit-Ready: YH Lin <yueherngl@chromium.org> Tested-by: YH Lin <yueherngl@chromium.org> Reviewed-by: YH Lin <yueherngl@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/flapjack/board.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/board/flapjack/board.c b/board/flapjack/board.c
index f1981e9a11..4cc27bc190 100644
--- a/board/flapjack/board.c
+++ b/board/flapjack/board.c
@@ -69,6 +69,15 @@ uint16_t board_version;
uint8_t oem;
uint32_t sku = LCM_ID_TO_SKU_ID(PANEL_UNINITIALIZED);
+static const struct rt946x_init_setting battery_init_setting = {
+ .eoc_current = 150,
+ .mivr = 4000,
+ .ircmp_vclamp = 32,
+ .ircmp_res = 25,
+ .boost_voltage = 5050,
+ .boost_current = 1500,
+};
+
int board_read_id(enum adc_channel ch, const struct mv_to_id *table, int size)
{
int mv = adc_read_channel(ch);
@@ -85,6 +94,11 @@ int board_read_id(enum adc_channel ch, const struct mv_to_id *table, int size)
return ADC_READ_ERROR;
}
+const struct rt946x_init_setting *board_rt946x_init_setting(void)
+{
+ return &battery_init_setting;
+}
+
static void board_setup_panel(void)
{
uint8_t channel;