summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver/charger/isl9241.c9
-rw-r--r--driver/charger/isl9241.h4
2 files changed, 13 insertions, 0 deletions
diff --git a/driver/charger/isl9241.c b/driver/charger/isl9241.c
index d21e438edb..ffd2ff6e17 100644
--- a/driver/charger/isl9241.c
+++ b/driver/charger/isl9241.c
@@ -363,6 +363,15 @@ static void isl9241_init(int chgnum)
MASK_SET))
goto init_fail;
+ /*
+ * Set control4 register to
+ * [13]: Slew rate control enable (sets VSYS ramp to 8mV/us)
+ */
+ if (isl9241_update(chgnum, ISL9241_REG_CONTROL4,
+ ISL9241_CONTROL4_SLEW_RATE_CTRL,
+ MASK_SET))
+ goto init_fail;
+
#ifndef CONFIG_CHARGE_RAMP_HW
if (isl9241_update(chgnum, ISL9241_REG_CONTROL0,
ISL9241_CONTROL0_INPUT_VTG_REGULATION,
diff --git a/driver/charger/isl9241.h b/driver/charger/isl9241.h
index 3e5c9ad749..337c624758 100644
--- a/driver/charger/isl9241.h
+++ b/driver/charger/isl9241.h
@@ -39,6 +39,7 @@
/* 2: Input Voltage Regulation (0 = Enable (default), 1 = Disable) */
#define ISL9241_CONTROL0_INPUT_VTG_REGULATION BIT(2)
+
#define ISL9241_REG_INFORMATION1 0x3A
#define ISL9241_REG_ADAPTER_CUR_LIMIT2 0x3B
@@ -96,6 +97,9 @@
#define ISL9241_INFORMATION2_ACOK_PIN BIT(14)
#define ISL9241_REG_CONTROL4 0x4E
+/* 13: Enable VSYS slew rate control (0 - disable, 1 - enable) */
+#define ISL9241_CONTROL4_SLEW_RATE_CTRL BIT(13)
+
#define ISL9241_REG_CONTROL5 0x4F
#define ISL9241_REG_NTC_ADC_RESULTS 0x80
#define ISL9241_REG_VBAT_ADC_RESULTS 0x81