summaryrefslogtreecommitdiff
path: root/board/corori2
diff options
context:
space:
mode:
Diffstat (limited to 'board/corori2')
-rw-r--r--board/corori2/board.c13
-rw-r--r--board/corori2/board.h8
2 files changed, 13 insertions, 8 deletions
diff --git a/board/corori2/board.c b/board/corori2/board.c
index e3103f65ff..efebc3af2e 100644
--- a/board/corori2/board.c
+++ b/board/corori2/board.c
@@ -454,6 +454,19 @@ int board_set_active_charge_port(int port)
return EC_SUCCESS;
}
+void board_set_charge_limit(int port, int supplier, int charge_ma, int max_ma,
+ int charge_mv)
+{
+ int icl = MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT);
+
+ /*
+ * b/147463641: The charger IC seems to overdraw ~4%, therefore we
+ * reduce our target accordingly.
+ */
+ icl = icl * 96 / 100;
+ charge_set_input_current_limit(icl, charge_mv);
+}
+
__override void typec_set_source_current_limit(int port, enum tcpc_rp_value rp)
{
if (port < 0 || port > board_get_usb_pd_port_count())
diff --git a/board/corori2/board.h b/board/corori2/board.h
index c62cade1c3..3483d96f88 100644
--- a/board/corori2/board.h
+++ b/board/corori2/board.h
@@ -20,7 +20,6 @@
/* Save some flash space */
#define CONFIG_CHIP_INIT_ROM_REGION
#undef CONFIG_CONSOLE_CMDHELP
-#undef CONFIG_CONSOLE_HISTORY
#define CONFIG_DEBUG_ASSERT_BRIEF
#define CONFIG_USB_PD_DEBUG_LEVEL 0
@@ -31,8 +30,6 @@
#undef CONFIG_CMD_ACCELSPOOF
#undef CONFIG_CMD_BATTFAKE
#undef CONFIG_CMD_GETTIME
-#undef CONFIG_CMD_I2C_SCAN
-#undef CONFIG_CMD_I2C_XFER
#undef CONFIG_CMD_MEM
/* Battery */
@@ -50,11 +47,6 @@
#undef CONFIG_CHARGER_SINGLE_CHIP
#undef CONFIG_USB_PD_TCPC_LPM_EXIT_DEBOUNCE
#define CONFIG_USB_PD_TCPC_LPM_EXIT_DEBOUNCE (100 * MSEC)
-/*
- * b/147463641: The charger IC seems to overdraw ~4%, therefore we
- * reduce our target accordingly.
- */
-#define CONFIG_CHARGER_INPUT_CURRENT_DERATE_PCT 4
/*
* GPIO for C1 interrupts, for baseboard use