mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
Snappy: clear hpd bit in board level tcpc init
PD alternate mode is covered in tcpc interface. So tcpci_tcpm_init() doesn't reset HPD. If keeping HDMI/DP type-C cable connected, doing sysjump sets HPD signal to high while it's already high(this high comes from previous state), then OS doesn't output to HDMI/DP monitor. BUG=None BRANCH=none TEST=make buildall Change-Id: I9b23cee82716d9073c98b6b53a0e54d587baf0ea Signed-off-by: Bruce.Wan <Bruce.Wan@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/409732 Commit-Ready: Devin Lu <Devin.Lu@quantatw.com> Tested-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
@@ -301,6 +301,8 @@ void board_print_tcpc_fw_version(int port)
|
||||
|
||||
void board_tcpc_init(void)
|
||||
{
|
||||
int port;
|
||||
|
||||
/* Only reset TCPC if not sysjump */
|
||||
if (!system_jumped_to_this_image())
|
||||
board_reset_pd_mcu();
|
||||
@@ -310,6 +312,16 @@ void board_tcpc_init(void)
|
||||
|
||||
/* Enable TCPC1 interrupt */
|
||||
gpio_enable_interrupt(GPIO_USB_C1_PD_INT_ODL);
|
||||
|
||||
/*
|
||||
* Initialize HPD to low; after sysjump SOC needs to see
|
||||
* HPD pulse to enable video path
|
||||
*/
|
||||
for (port = 0; port < CONFIG_USB_PD_PORT_COUNT; port++) {
|
||||
const struct usb_mux *mux = &usb_muxes[port];
|
||||
|
||||
mux->hpd_update(port, 0, 0);
|
||||
}
|
||||
}
|
||||
DECLARE_HOOK(HOOK_INIT, board_tcpc_init, HOOK_PRIO_INIT_I2C+1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user