summaryrefslogtreecommitdiff
path: root/board/blipper
diff options
context:
space:
mode:
authorMike Lee <mike5@huaqin.corp-partner.google.com>2021-06-30 16:34:49 +0800
committerCommit Bot <commit-bot@chromium.org>2021-06-30 19:39:47 +0000
commit6c7b7fdd7ab2144968ec6db7a9122dae875211ad (patch)
tree75d813be73bf9acd711db5c70b6081967983cdb6 /board/blipper
parent2e40fb4eb9faccc6c4002e8821dc876ea3979f55 (diff)
downloadchrome-ec-6c7b7fdd7ab2144968ec6db7a9122dae875211ad.tar.gz
blipper: disable charger ADC function at Z-state
In order to reduce the power consumption of Z-state, we need disable charger ADC function at Z-state, and we use HW solution to solve AC cannot wake up Z-state issue. BUG=b:186717219 BRANCH=dedede TEST=EE verify the power consumption ok,and AC can wakeup Z-state at rework duts Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Change-Id: I674f0b73d0b593ea88973aa5b8b3447bd34b81ed Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2994881 Reviewed-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/blipper')
-rw-r--r--board/blipper/board.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/board/blipper/board.c b/board/blipper/board.c
index 1c3ad144b9..e26b3d4d51 100644
--- a/board/blipper/board.c
+++ b/board/blipper/board.c
@@ -7,6 +7,7 @@
#include "adc_chip.h"
#include "button.h"
+#include "cros_board_info.h"
#include "charge_manager.h"
#include "charge_state_v2.h"
#include "charger.h"
@@ -90,15 +91,6 @@ static void c0_ccsbu_ovp_interrupt(enum gpio_signal s)
pd_handle_cc_overvoltage(0);
}
-void board_hibernate(void)
-{
- /*
- * Charger IC need to be put into their "low power mode" before
- * entering the Z-state.
- */
- raa489000_hibernate(0, false);
-}
-
/* Must come after other header files and interrupt handler declarations */
#include "gpio_list.h"
@@ -204,6 +196,8 @@ const int usb_port_enable[USB_PORT_COUNT] = {
GPIO_EN_USB_A0_VBUS
};
+static uint32_t board_id;
+
void board_init(void)
{
gpio_enable_interrupt(GPIO_USB_C0_INT_ODL);
@@ -227,9 +221,27 @@ void board_init(void)
keyscan_config.actual_key_mask[12] = 0xff;
keyscan_config.actual_key_mask[13] = 0xff;
keyscan_config.actual_key_mask[14] = 0xff;
+
+ cbi_get_board_version(&board_id);
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
+void board_hibernate(void)
+{
+ /*
+ * Charger IC need to be put into their "low power mode" before
+ * entering the Z-state.
+ *
+ * b:186717219: In order to solve the power consumption problem of
+ * hibernate,HW solution is adopted after board id 3 to solve the
+ * problem that AC cannot wake up hibernate mode.
+ */
+ if (board_id > 2)
+ raa489000_hibernate(0, true);
+ else
+ raa489000_hibernate(0, false);
+}
+
__override void board_pulse_entering_rw(void)
{
/*