diff options
-rw-r--r-- | board/strago/board.c | 6 | ||||
-rw-r--r-- | board/strago/board.h | 14 | ||||
-rw-r--r-- | board/strago/ec.tasklist | 9 |
3 files changed, 25 insertions, 4 deletions
diff --git a/board/strago/board.c b/board/strago/board.c index 586eac8552..06628fcae6 100644 --- a/board/strago/board.c +++ b/board/strago/board.c @@ -4,6 +4,7 @@ */ /* Strago board-specific configuration */ +#include "charger.h" #include "driver/temp_sensor/tmp432.h" #include "extpower.h" #include "gpio.h" @@ -64,3 +65,8 @@ struct ec_thermal_config thermal_params[] = { {{0, 0, 0}, 0, 0}, /* TMP432_Sensor_2 */ }; BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); + +int board_discharge_on_ac(int enable) +{ + return charger_discharge_on_ac(enable); +} diff --git a/board/strago/board.h b/board/strago/board.h index 4a46c8745c..b8d4b8a132 100644 --- a/board/strago/board.h +++ b/board/strago/board.h @@ -34,6 +34,16 @@ #define CONFIG_TEMP_SENSOR #define CONFIG_TEMP_SENSOR_TMP432 +#define CONFIG_CHARGER +#define CONFIG_BATTERY_SMART +#define CONFIG_CHARGER_V2 +#define CONFIG_CHARGER_BQ24770 +#define CONFIG_CHARGER_ILIM_PIN_DISABLED +#define CONFIG_CHARGER_SENSE_RESISTOR 10 +#define CONFIG_CHARGER_SENSE_RESISTOR_AC 10 +#define CONFIG_CHARGER_INPUT_CURRENT 2240 +#define CONFIG_CHARGER_DISCHARGE_ON_AC + #define CONFIG_I2C /* I2C ports */ @@ -77,6 +87,10 @@ enum temp_sensor_id { TEMP_SENSOR_COUNT }; + +/* Discharge battery when on AC power for factory test. */ +int board_discharge_on_ac(int enable); + #endif /* !__ASSEMBLER__ */ #endif /* __BOARD_H */ diff --git a/board/strago/ec.tasklist b/board/strago/ec.tasklist index bee345cf29..354d7e45fc 100644 --- a/board/strago/ec.tasklist +++ b/board/strago/ec.tasklist @@ -18,9 +18,10 @@ */ #define CONFIG_TASK_LIST \ TASK_ALWAYS(HOOKS, hook_task, NULL, TASK_STACK_SIZE) \ + TASK_ALWAYS(CHARGER, charger_task, NULL, TASK_STACK_SIZE) \ + TASK_NOTEST(CHIPSET, chipset_task, NULL, TASK_STACK_SIZE) \ + TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \ + TASK_ALWAYS(CONSOLE, console_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(POWERBTN, power_button_task, NULL, TASK_STACK_SIZE) \ - TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \ - TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) \ - TASK_NOTEST(CHIPSET, chipset_task, NULL, TASK_STACK_SIZE) \ - TASK_ALWAYS(CONSOLE, console_task, NULL, TASK_STACK_SIZE) + TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) |