mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 17:11:42 +00:00
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>
This commit is contained in:
committed by
chrome-bot
parent
2ddc2ae675
commit
0fd106fbf4
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user