summaryrefslogtreecommitdiff
path: root/board/elm
diff options
context:
space:
mode:
authorMilton Chiang <milton.chiang@mediatek.com>2016-10-07 09:52:01 +0800
committerchrome-bot <chrome-bot@chromium.org>2016-10-13 04:32:18 -0700
commit0fd106fbf4671306114f2d4de51c2d44f46fef55 (patch)
tree2d72f6011cd52534ee1ad416aa838b37e262e464 /board/elm
parent2ddc2ae6750af478cc104342ccc355fad1046bd5 (diff)
downloadchrome-ec-0fd106fbf4671306114f2d4de51c2d44f46fef55.tar.gz
elm: disable 3.3V to ANX7688 by default and enable it in board_power_on_pd_mcu.
In dead battery mode, we can find ANX7688 will pull the CC to Rp in the beginning; some of the adapters will drop the VBUS since this should be treated as a disconnection, hence the whole system lost the only power source and cannot boot up. According to chrome-os-partner:58283, there's a chance for ANX7688 to be in an abnormal state if the system provides it with 3.3V first but RESET_N and PWR_EN are still in an unstable level. To prevent this situation, we try to enable the 3.3V only after RESET_N and PWR_EN are in their initial state. BRANCH=none BUG=chrome-os-partner:58283 TEST=plug in the adapter, check ANX7688 does not pull CC to Rp in the beginning, and boot up system in dead battery mode Change-Id: Ibb81a33a7dd957d3bdc6c54bb7723cc9ffdcfd26 Signed-off-by: Milton Chiang <milton.chiang@mediatek.com> Reviewed-on: https://chromium-review.googlesource.com/394408 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'board/elm')
-rw-r--r--board/elm/board.c2
-rw-r--r--board/elm/gpio.inc2
2 files changed, 3 insertions, 1 deletions
diff --git a/board/elm/board.c b/board/elm/board.c
index 9548bb71fc..133f6b25af 100644
--- a/board/elm/board.c
+++ b/board/elm/board.c
@@ -215,6 +215,8 @@ static void board_power_on_pd_mcu(void)
/* check if power is already on */
if (!gpio_get_level(GPIO_USB_C0_PWR_EN_L))
return;
+
+ gpio_set_level(GPIO_USB_C0_EXTPWR_EN, 1);
hook_call_deferred(&deferred_reset_pd_mcu_data, 1*MSEC);
}
diff --git a/board/elm/gpio.inc b/board/elm/gpio.inc
index d9193938a5..e48290c4ab 100644
--- a/board/elm/gpio.inc
+++ b/board/elm/gpio.inc
@@ -81,7 +81,7 @@ GPIO(USB_C0_5V_EN, PIN(D, 8), GPIO_OUT_LOW) /* USBC port 0 5V */
GPIO(USB_C0_CHARGE_L, PIN(D, 9), GPIO_OUT_LOW) /* USBC port 0 charge */
GPIO(USB_C0_RST, PIN(D, 10), GPIO_ODR_HIGH) /* ANX7688 reset */
GPIO(USB_C0_PWR_EN_L, PIN(B, 15), GPIO_ODR_HIGH) /* ANX7688 power enable */
-GPIO(USB_C0_EXTPWR_EN, PIN(F, 2), GPIO_OUT_HIGH) /* ANX7688 3.3V ext power enable */
+GPIO(USB_C0_EXTPWR_EN, PIN(F, 2), GPIO_OUT_LOW) /* ANX7688 3.3V ext power enable */
GPIO(USB_DP_HPD, PIN(F, 3), GPIO_INPUT)
GPIO(EN_TP_INT_L, PIN(E, 14), GPIO_OUT_LOW) /* touchpad interrupt enable */