summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Wang <matt_wang@compal.corp-partner.google.com>2022-10-04 11:11:02 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-10-06 17:55:45 +0000
commit80e75fae6212a211d13d18a86a8257c93242771e (patch)
tree37523ed01e09bd59bf47949b0060c1d009823860
parentc2204be77f2ce98d57e3529fb3f9013474f27331 (diff)
downloadchrome-ec-80e75fae6212a211d13d18a86a8257c93242771e.tar.gz
winterhold: change the charger from ISL9241 to ISL9238
Modify the charger from ISL9241 to ISL9238 BUG=b:249707388 BRANCH=none TEST=zmake build winterfold skyrim frostflow morthal success TEST=Can get the ISL9238 charger by console cmd "charger" on Whiterun TEST=Charging/ discharging normal on Whiterun. LOW_COVERAGE_REASON=Skyrim board tests not created yet: b/247151116 Signed-off-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Change-Id: Ie23d69b44654502a061be473c20303292197dcb0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3932380 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Commit-Queue: Diana Z <dzigterman@chromium.org> Code-Coverage: Diana Z <dzigterman@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jonathon Murphy <jpmurphy@google.com> Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com>
-rw-r--r--zephyr/projects/skyrim/prj_winterhold.conf4
-rw-r--r--zephyr/projects/skyrim/src/usbc_config.c2
-rw-r--r--zephyr/projects/skyrim/winterhold.dts4
3 files changed, 8 insertions, 2 deletions
diff --git a/zephyr/projects/skyrim/prj_winterhold.conf b/zephyr/projects/skyrim/prj_winterhold.conf
index 3e6c967c6d..6057770cf8 100644
--- a/zephyr/projects/skyrim/prj_winterhold.conf
+++ b/zephyr/projects/skyrim/prj_winterhold.conf
@@ -16,3 +16,7 @@ CONFIG_PLATFORM_EC_LED_DT=y
CONFIG_PLATFORM_EC_TEMP_SENSOR_PCT2075=y
CONFIG_PLATFORM_EC_USBC_RETIMER_ANX7483=y
+
+# Enable charger chip
+CONFIG_PLATFORM_EC_CHARGER_ISL9238=y
+CONFIG_PLATFORM_EC_CHARGER_ISL9241=n \ No newline at end of file
diff --git a/zephyr/projects/skyrim/src/usbc_config.c b/zephyr/projects/skyrim/src/usbc_config.c
index a6e7910541..dec9f928b5 100644
--- a/zephyr/projects/skyrim/src/usbc_config.c
+++ b/zephyr/projects/skyrim/src/usbc_config.c
@@ -229,6 +229,7 @@ void usb_pd_soc_interrupt(enum gpio_signal signal)
CPRINTSUSB("SOC PD Interrupt");
}
+#ifdef CONFIG_CHARGER_ISL9241
/* Round up 3250 max current to multiple of 128mA for ISL9241 AC prochot. */
#define SKYRIM_AC_PROCHOT_CURRENT_MA 3328
static void set_ac_prochot(void)
@@ -236,6 +237,7 @@ static void set_ac_prochot(void)
isl9241_set_ac_prochot(CHARGER_SOLO, SKYRIM_AC_PROCHOT_CURRENT_MA);
}
DECLARE_HOOK(HOOK_INIT, set_ac_prochot, HOOK_PRIO_DEFAULT);
+#endif /* CONFIG_CHARGER_ISL9241 */
void tcpc_alert_event(enum gpio_signal signal)
{
diff --git a/zephyr/projects/skyrim/winterhold.dts b/zephyr/projects/skyrim/winterhold.dts
index ae3c9b799a..6113923ed8 100644
--- a/zephyr/projects/skyrim/winterhold.dts
+++ b/zephyr/projects/skyrim/winterhold.dts
@@ -102,8 +102,8 @@
};
&i2c4_1 {
- charger: isl9241@9 {
- compatible = "intersil,isl9241";
+ charger: isl9238@9 {
+ compatible = "intersil,isl923x";
status = "okay";
reg = <0x9>;
};