summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-09-04 21:11:56 +0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-09-05 10:11:48 +0000
commitb0d559a918c8c83dcdb2d57c468b3c50268b2b5f (patch)
tree7cbaa8cabc5368b940ad996207df885283e87b8b /board
parentc4da0e4461a92a4193e8909aeb23b6f42090d0e8 (diff)
downloadchrome-ec-b0d559a918c8c83dcdb2d57c468b3c50268b2b5f.tar.gz
Enable charging on Kirby
Now that we have battery and charger drivers, let's enable charging. BUG=chrome-os-partner:22055 TEST=Test charging/discharging on Kirby TEST=Unplug battery and see 'error' state TEST=Plug battery and doesn't see error anymore BRANCH=None Change-Id: Idff513b38c9f5bb90700877750f3d2e2154d4b23 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/168007
Diffstat (limited to 'board')
-rw-r--r--board/kirby/board.c13
-rw-r--r--board/kirby/board.h6
-rw-r--r--board/kirby/ec.tasklist2
3 files changed, 6 insertions, 15 deletions
diff --git a/board/kirby/board.c b/board/kirby/board.c
index 87b3586877..579d371c40 100644
--- a/board/kirby/board.c
+++ b/board/kirby/board.c
@@ -2,10 +2,9 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-/* Pit board-specific configuration */
+/* Kirby board-specific configuration */
#include "adc.h"
-#include "battery_pack.h"
#include "common.h"
#include "extpower.h"
#include "gaia_power.h"
@@ -106,16 +105,6 @@ const struct gpio_alt_func gpio_alt_funcs[] = {
};
const int gpio_alt_funcs_count = ARRAY_SIZE(gpio_alt_funcs);
-/* Battery temperature ranges in degrees C */
-const struct battery_temperature_ranges bat_temp_ranges = {
- .start_charging_min_c = 0,
- .start_charging_max_c = 45,
- .charging_min_c = 0,
- .charging_max_c = 60,
- .discharging_min_c = 0,
- .discharging_max_c = 100,
-};
-
/* PWM channels */
const struct pwm_t pwm_channels[] = {
[PWM_CH_CHG_Y] = {STM32_TIM(3), STM32_TIM_CH(1), PWM_CONFIG_ACTIVE_LOW,
diff --git a/board/kirby/board.h b/board/kirby/board.h
index 24d14d6459..ba0d6a41c8 100644
--- a/board/kirby/board.h
+++ b/board/kirby/board.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* Pit board configuration */
+/* Kirby board configuration */
#ifndef __BOARD_H
#define __BOARD_H
@@ -12,6 +12,8 @@
#define CONFIG_BATTERY_BQ27541
#define CONFIG_CHARGER
#define CONFIG_CHARGER_BQ24192
+#define CONFIG_CHARGER_EN_GPIO
+#define CONFIG_CHARGER_EN_ACTIVE_LOW
#define CONFIG_ADC
#define CONFIG_ADC_CLOCK
#define CONFIG_CHIPSET_GAIA
@@ -109,7 +111,7 @@ enum gpio_signal {
/* Other inputs */
GPIO_WP_L,
/* Outputs */
- GPIO_CHARGER_EN,
+ GPIO_CHARGER_EN_L,
GPIO_EC_INT,
GPIO_EC_INT2,
GPIO_ID_MUX,
diff --git a/board/kirby/ec.tasklist b/board/kirby/ec.tasklist
index 9b044dca8c..7f1f1de257 100644
--- a/board/kirby/ec.tasklist
+++ b/board/kirby/ec.tasklist
@@ -17,7 +17,7 @@
#define CONFIG_TASK_LIST \
TASK_ALWAYS(HOOKS, hook_task, NULL, TASK_STACK_SIZE) \
TASK_NOTEST(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \
- /* TASK_ALWAYS(CHARGER, charger_task, NULL, TASK_STACK_SIZE) */ \
+ TASK_ALWAYS(CHARGER, charger_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) \