diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2016-12-07 11:58:20 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-12-08 12:32:38 -0800 |
commit | f62bec57927578aac304c386b070629e0690eb29 (patch) | |
tree | 276bd9e4344083785d211903d6656c7ceec7dbb1 /driver | |
parent | a0bfd989d1045dd328543f2792df44209a090d33 (diff) | |
download | chrome-ec-f62bec57927578aac304c386b070629e0690eb29.tar.gz |
BD9995X: Disable input current limitation for all types of chargers
Charger Operation Control Setting 1 (CHGOP_SET1) has separate bits to
disable input current limitation for DCP, SDP, others. If it is not
disabled, input current is automatically selected, which results in
hard resets on weak chargers hence disable the input current
limitation for all types of chargers.
BUG=chrome-os-partner:60722
BRANCH=none
TEST=Tested on Reef. Input current is not automatically set to all
types of chargers.
Change-Id: Ideb16ac2a40b403c94c28e85f254043ead7415e0
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/417234
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/charger/bd9995x.c | 9 | ||||
-rw-r--r-- | driver/charger/bd9995x.h | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/driver/charger/bd9995x.c b/driver/charger/bd9995x.c index d87f9340ba..607d0b81f6 100644 --- a/driver/charger/bd9995x.c +++ b/driver/charger/bd9995x.c @@ -716,7 +716,10 @@ static void bd9995x_init(void) ch_raw_write16(BD9995X_CMD_VBUS_UCD_SET, reg, BD9995X_EXTENDED_COMMAND); - /* Disable charging trigger by BC1.2 on VCC & VBUS. */ + /* + * Disable charging trigger by BC1.2 on VCC & VBUS and + * automatic limitation of the input current. + */ if (ch_raw_read16(BD9995X_CMD_CHGOP_SET1, ®, BD9995X_EXTENDED_COMMAND)) return; @@ -724,7 +727,9 @@ static void bd9995x_init(void) BD9995X_CMD_CHGOP_SET1_SDP_CHG_TRIG | BD9995X_CMD_CHGOP_SET1_VBUS_BC_DISEN | BD9995X_CMD_CHGOP_SET1_VCC_BC_DISEN | - BD9995X_CMD_CHGOP_SET1_ILIM_AUTO_DISEN); + BD9995X_CMD_CHGOP_SET1_ILIM_AUTO_DISEN | + BD9995X_CMD_CHGOP_SET1_SDP_500_SEL | + BD9995X_CMD_CHGOP_SET1_DCP_2500_SEL); ch_raw_write16(BD9995X_CMD_CHGOP_SET1, reg, BD9995X_EXTENDED_COMMAND); diff --git a/driver/charger/bd9995x.h b/driver/charger/bd9995x.h index be8706b56c..00b6d1032c 100644 --- a/driver/charger/bd9995x.h +++ b/driver/charger/bd9995x.h @@ -104,6 +104,8 @@ enum bd9995x_charge_port { #define BD9995X_CMD_VIN_CTRL_SET_VCC_EN (1 << 5) #define BD9995X_CMD_CHGOP_SET1 0x0B +#define BD9995X_CMD_CHGOP_SET1_DCP_2500_SEL (1 << 15) +#define BD9995X_CMD_CHGOP_SET1_SDP_500_SEL (1 << 14) #define BD9995X_CMD_CHGOP_SET1_ILIM_AUTO_DISEN (1 << 13) #define BD9995X_CMD_CHGOP_SET1_VCC_BC_DISEN (1 << 11) #define BD9995X_CMD_CHGOP_SET1_VBUS_BC_DISEN (1 << 10) |