summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/ryu/battery.c38
-rw-r--r--board/ryu/board.h3
-rw-r--r--board/ryu/build.mk2
3 files changed, 3 insertions, 40 deletions
diff --git a/board/ryu/battery.c b/board/ryu/battery.c
deleted file mode 100644
index dc65128719..0000000000
--- a/board/ryu/battery.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright 2014 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- *
- * Battery pack vendor provided charging profile
- */
-
-#include "battery.h"
-#include "common.h"
-#include "i2c.h"
-
-/* Battery temperature ranges in degrees C */
-static const struct battery_info info = {
- /* Design voltage */
- .voltage_max = 4350,
- .voltage_normal = 3800,
- .voltage_min = 2800,
- /* Pre-charge current: I <= 0.01C */
- .precharge_current = 64, /* mA */
- /* Operational temperature range */
- .start_charging_min_c = 0,
- .start_charging_max_c = 45,
- .charging_min_c = 0,
- .charging_max_c = 50,
- .discharging_min_c = -20,
- .discharging_max_c = 60,
-};
-
-const struct battery_info *battery_get_info(void)
-{
- return &info;
-}
-
-int board_cut_off_battery(void)
-{
- /* Write SET_SHUTDOWN(0x13) to CTRL(0x00) */
- return i2c_write16(I2C_PORT_BATTERY, 0xaa, 0x0, 0x13);
-}
diff --git a/board/ryu/board.h b/board/ryu/board.h
index 0d54abdb99..66b991a09a 100644
--- a/board/ryu/board.h
+++ b/board/ryu/board.h
@@ -45,7 +45,7 @@
#define CONFIG_UART_RX_DMA_CH STM32_DMAC_USART2_RX
/* Charging/Power configuration */
-#undef CONFIG_BATTERY_RYU /* TODO implement */
+#define CONFIG_BATTERY_RYU
#define CONFIG_BATTERY_BQ27541
#define CONFIG_BATTERY_CUT_OFF
#define CONFIG_BATTERY_REQUESTS_NIL_WHEN_DEAD
@@ -54,6 +54,7 @@
#define CONFIG_CHARGER_V2
#define CONFIG_CHARGER_BQ24773
#define CONFIG_CHARGER_ILIM_PIN_DISABLED
+#define CONFIG_CHARGER_PROFILE_OVERRIDE
#define CONFIG_CHARGER_SENSE_RESISTOR 5
#define CONFIG_CHARGER_SENSE_RESISTOR_AC 10
#define CONFIG_CHARGER_INPUT_CURRENT 512
diff --git a/board/ryu/build.mk b/board/ryu/build.mk
index d498972118..4671ea0c7c 100644
--- a/board/ryu/build.mk
+++ b/board/ryu/build.mk
@@ -9,5 +9,5 @@ CHIP:=stm32
CHIP_FAMILY:=stm32f3
CHIP_VARIANT:=stm32f373
-board-y=board.o battery.o
+board-y=board.o
board-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o