summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zephyr/program/skyrim/markarth/CMakeLists.txt1
-rw-r--r--zephyr/program/skyrim/markarth/project.conf4
-rw-r--r--zephyr/program/skyrim/markarth/project.overlay23
-rw-r--r--zephyr/program/skyrim/markarth/src/alt_charger.c31
4 files changed, 5 insertions, 54 deletions
diff --git a/zephyr/program/skyrim/markarth/CMakeLists.txt b/zephyr/program/skyrim/markarth/CMakeLists.txt
index 876ce00fcf..37907d80d4 100644
--- a/zephyr/program/skyrim/markarth/CMakeLists.txt
+++ b/zephyr/program/skyrim/markarth/CMakeLists.txt
@@ -7,7 +7,6 @@ zephyr_library_sources(
"src/usb_mux_config.c"
"src/ppc_config.c"
"src/form_factor.c"
- "src/alt_charger.c"
"src/keyboard.c"
)
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_FAN "src/fan.c")
diff --git a/zephyr/program/skyrim/markarth/project.conf b/zephyr/program/skyrim/markarth/project.conf
index 5f33bb3426..a3f67befd0 100644
--- a/zephyr/program/skyrim/markarth/project.conf
+++ b/zephyr/program/skyrim/markarth/project.conf
@@ -13,10 +13,6 @@ CONFIG_PLATFORM_EC_PD_MAX_POWER_MW=100000
CONFIG_PLATFORM_EC_PD_MAX_CURRENT_MA=5000
CONFIG_PLATFORM_EC_PD_MAX_VOLTAGE_MV=20000
-# Enable alternative charger chip
-CONFIG_PLATFORM_EC_CHARGER_RUNTIME_CONFIG=y
-CONFIG_PLATFORM_EC_CHARGER_ISL9238C=y
-
# Battery
CONFIG_PLATFORM_EC_BATTERY_PRESENT_GPIO=y
diff --git a/zephyr/program/skyrim/markarth/project.overlay b/zephyr/program/skyrim/markarth/project.overlay
index e1bcdcc1d8..b97ac1a10b 100644
--- a/zephyr/program/skyrim/markarth/project.overlay
+++ b/zephyr/program/skyrim/markarth/project.overlay
@@ -135,24 +135,6 @@
default;
};
};
-
- charger-option {
- enum-name = "FW_CHARGER";
- start = <11>;
- size = <2>;
-
- charger-option-isl9241 {
- compatible = "cros-ec,cbi-fw-config-value";
- enum-name = "FW_CHARGER_ISL9241";
- value = <0>;
- default;
- };
- charger-option-isl9538 {
- compatible = "cros-ec,cbi-fw-config-value";
- enum-name = "FW_CHARGER_ISL9538";
- value = <1>;
- };
- };
};
/* Rotation matrices for motion sensors. */
@@ -193,9 +175,14 @@
/delete-node/ pi3usb9201@5f;
};
+&i2c4_1 {
+ /delete-node/ isl9538@9;
+};
+
/* usbc overrides */
&usbc_port0 {
/delete-property/ bc12;
+ /delete-property/ chg_alt;
};
&usbc_port1 {
diff --git a/zephyr/program/skyrim/markarth/src/alt_charger.c b/zephyr/program/skyrim/markarth/src/alt_charger.c
deleted file mode 100644
index 27a0b76e95..0000000000
--- a/zephyr/program/skyrim/markarth/src/alt_charger.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright 2022 The ChromiumOS Authors
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "charger_chips.h"
-#include "common.h"
-#include "cros_board_info.h"
-#include "cros_cbi.h"
-#include "hooks.h"
-
-#include <zephyr/devicetree.h>
-#include <zephyr/logging/log.h>
-
-LOG_MODULE_DECLARE(markarth, CONFIG_SKYRIM_LOG_LEVEL);
-
-static void alt_charger_init(void)
-{
- int ret;
- uint32_t val;
-
- ret = cros_cbi_get_fw_config(FW_CHARGER, &val);
- if (ret != 0) {
- LOG_ERR("Error retrieving CBI FW_CONFIG field %d", FW_CHARGER);
- return;
- }
-
- if (val == FW_CHARGER_ISL9538)
- CHG_ENABLE_ALTERNATE(0);
-}
-DECLARE_HOOK(HOOK_INIT, alt_charger_init, HOOK_PRIO_POST_FIRST);