summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2022-08-24 15:56:07 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-08-25 08:49:45 +0000
commit604b237e3d3aa361dad876f8c52141b390548376 (patch)
treeee25dc487d55f792b81d63eeb6a7b15ef64a19f1 /driver
parent2d9d2a058395ca76787bf41a66a7a5125929cb40 (diff)
downloadchrome-ec-604b237e3d3aa361dad876f8c52141b390548376.tar.gz
charger/rt9490: workaround code cleanup
Rearrange the workaround code and common init code: Workaround goes to zephyr/project/corsola, and limit its access to Krabby and Tentacruel only. BUG=none TEST=manually check charger works fine on tentacruel BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ieb7526f9e8aa36ac8457a6388f427a63ce4a105e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3853777 Reviewed-by: Eric Yilun Lin <yllin@google.com> Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r--driver/charger/rt9490.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/driver/charger/rt9490.c b/driver/charger/rt9490.c
index a7f5fd28e3..204949abde 100644
--- a/driver/charger/rt9490.c
+++ b/driver/charger/rt9490.c
@@ -311,11 +311,6 @@ static int rt9490_init_setting(int chgnum)
/* Disable AUTO_AICR / AUTO_MIVR */
RETURN_ERROR(rt9490_clr_bit(chgnum, RT9490_REG_ADD_CTRL0,
RT9490_AUTO_AICR | RT9490_AUTO_MIVR));
- /* Disable charge timer */
- RETURN_ERROR(rt9490_clr_bit(chgnum, RT9490_REG_SAFETY_TMR_CTRL,
- RT9490_EN_TRICHG_TMR |
- RT9490_EN_PRECHG_TMR |
- RT9490_EN_FASTCHG_TMR));
RETURN_ERROR(rt9490_set_mivr(chgnum, default_init_setting.mivr));
RETURN_ERROR(rt9490_set_ieoc(chgnum, default_init_setting.eoc_current));
RETURN_ERROR(rt9490_set_iprec(chgnum, batt_info->precharge_current));
@@ -339,6 +334,10 @@ static int rt9490_init_setting(int chgnum)
RT9490_CHG_IRQ_MASK4_ALL));
RETURN_ERROR(rt9490_set_bit(chgnum, RT9490_REG_CHG_IRQ_MASK5,
RT9490_CHG_IRQ_MASK5_ALL));
+ /* Reduce SW freq from 1.5MHz to 1MHz
+ * for 10% higher current rating b/215294785
+ */
+ RETURN_ERROR(rt9490_enable_pwm_1mhz(CHARGER_SOLO, true));
return EC_SUCCESS;
}