summaryrefslogtreecommitdiff
path: root/board/lucid
diff options
context:
space:
mode:
Diffstat (limited to 'board/lucid')
-rw-r--r--board/lucid/board.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/board/lucid/board.c b/board/lucid/board.c
index 7379dfcc25..4fadc6083c 100644
--- a/board/lucid/board.c
+++ b/board/lucid/board.c
@@ -16,13 +16,11 @@
#include "i2c.h"
#include "registers.h"
#include "task.h"
+#include "usb_charge.h"
#include "util.h"
#define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ## args)
-/* Default input current limit when VBUS is present */
-#define DEFAULT_CURR_LIMIT 500 /* mA */
-
void board_config_pre_init(void)
{
/* enable SYSCFG clock */
@@ -45,8 +43,8 @@ static void update_vbus_supplier(int vbus_level)
{
struct charge_port_info charge;
- charge.voltage = USB_BC12_CHARGE_VOLTAGE;
- charge.current = vbus_level ? DEFAULT_CURR_LIMIT : 0;
+ charge.voltage = USB_CHARGER_VOLTAGE_MV;
+ charge.current = vbus_level ? USB_CHARGER_MIN_CURR_MA : 0;
charge_manager_update_charge(CHARGE_SUPPLIER_VBUS, 0, &charge);
}
@@ -99,7 +97,7 @@ static void board_init(void)
* TODO: use built-in USB peripheral to detect BC1.2 suppliers an
* update charge manager.
*/
- charge_none.voltage = USB_BC12_CHARGE_VOLTAGE;
+ charge_none.voltage = USB_CHARGER_VOLTAGE_MV;
charge_none.current = 0;
for (i = 0; i < CONFIG_USB_PD_PORT_COUNT; i++) {
charge_manager_update_charge(CHARGE_SUPPLIER_PROPRIETARY,