From d222d27cc510d8ba83f5522f4e428cafc9429f6a Mon Sep 17 00:00:00 2001 From: yoojin Date: Mon, 28 Jul 2014 10:39:38 +0900 Subject: Winky : Update charge voltage for NVDC to meet spec. Set the charge voltage(0x15) in non-charging state. When EC set charge voltage below 4096mA, charge voltage of charger was actually 9008mA(POR). POR can not ensure battery stability. BUG=chrome-os-partner:30194 TEST=emerge-winky chromeos-ec Check charger values was set normally by read i2c. To check the battery can be charging normally. Change-Id: Ib90bc91bad7f726b893056c9c705415f51001e00 Reviewed-on: https://chromium-review.googlesource.com/206449 Reviewed-by: YongBeum Ha Tested-by: YongBeum Ha Reviewed-by: Aaron Durbin Commit-Queue: YongBeum Ha --- board/winky/board.h | 1 + driver/charger/bq24715.c | 6 ++++++ include/config.h | 6 ++++++ 3 files changed, 13 insertions(+) mode change 100644 => 100755 driver/charger/bq24715.c diff --git a/board/winky/board.h b/board/winky/board.h index 9e9700bb24..f3461b3f5c 100755 --- a/board/winky/board.h +++ b/board/winky/board.h @@ -19,6 +19,7 @@ #define CONFIG_CHARGER_DISCHARGE_ON_AC /* TODO(crosbug.com/p/25416): Add correct input current limit for Winky */ #define CONFIG_CHARGER_INPUT_CURRENT 2112 /* 30 W adapter, 12 V, 2.2 A */ +#define CONFIG_CHARGE_NVDC_OFF_VOLTAGE 8592 /* NVDC Off voltage */ #define CONFIG_CHARGER_SENSE_RESISTOR 10 /* Charge sense resistor, mOhm */ #define CONFIG_CHARGER_SENSE_RESISTOR_AC 10 /* Input senso resistor, mOhm */ #define CONFIG_CHIPSET_BAYTRAIL diff --git a/driver/charger/bq24715.c b/driver/charger/bq24715.c old mode 100644 new mode 100755 index c1f8a9156c..581bf534a7 --- a/driver/charger/bq24715.c +++ b/driver/charger/bq24715.c @@ -163,6 +163,12 @@ int charger_get_voltage(int *voltage) int charger_set_voltage(int voltage) { cached_voltage = voltage; + +#ifdef CONFIG_CHARGE_NVDC_OFF_VOLTAGE + if(voltage == 0) + voltage = CONFIG_CHARGE_NVDC_OFF_VOLTAGE; +#endif + return sbc_write(SB_CHARGING_VOLTAGE, voltage); } diff --git a/include/config.h b/include/config.h index 7b13bd5a6e..7a9d8f7d04 100755 --- a/include/config.h +++ b/include/config.h @@ -210,6 +210,12 @@ */ #undef CONFIG_CHARGER_INPUT_CURRENT +/* + * NVDC needs to keep voltage level though charging stop. + * This value should depend on charger. +*/ +#undef CONFIG_CHARGE_NVDC_OFF_VOLTAGE + /* Value of the charge sense resistor, in mOhms */ #undef CONFIG_CHARGER_SENSE_RESISTOR -- cgit v1.2.1