diff options
Diffstat (limited to 'driver/retimer/bb_retimer.c')
-rw-r--r-- | driver/retimer/bb_retimer.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/driver/retimer/bb_retimer.c b/driver/retimer/bb_retimer.c index 3bee94bb56..f7a4ce6164 100644 --- a/driver/retimer/bb_retimer.c +++ b/driver/retimer/bb_retimer.c @@ -5,10 +5,10 @@ * Driver for Intel Burnside Bridge - Thunderbolt/USB/DisplayPort Retimer */ +#include "driver/retimer/bb_retimer.h" #include "chipset.h" #include "common.h" #include "console.h" -#include "driver/retimer/bb_retimer.h" #include "gpio.h" #include "hooks.h" #include "i2c.h" @@ -428,14 +428,7 @@ static int retimer_set_state(const struct usb_mux *me, mux_state_t mux_state, set_retimer_con |= BB_RETIMER_USB_3_SPEED; } - /* - * Bit 8: DP_CONNECTION - * 0 ā No DP connection - * 1 ā DP connected - */ if (mux_state & USB_PD_MUX_DP_ENABLED) { - set_retimer_con |= BB_RETIMER_DP_CONNECTION; - /* * Bit 11-10: DP_PIN_ASSIGNMENT (ignored if BIT8 = 0) * 00 ā Pin assignments E/Eā @@ -552,15 +545,26 @@ void bb_retimer_hpd_update(const struct usb_mux *me, mux_state_t hpd_state, retimer_con_reg &= ~BB_RETIMER_IRQ_HPD; /* + * Bit 8: DP_CONNECTION + * 0 - No DP connection + * 1 - DP connected + * * Bit 15: HPD_LVL (ignored if BIT8 = 0) * 0 - HPD_State Low * 1 - HPD_State High + * + * HDMI card connect to chromebook the DP_CONNECTION bit + * would be enable. + * It will increase BBR power consumption, so enable the DP bit + * only when the HPD bit is set so that the retimer stays in + * low power mode until the external monitor is connected. */ - if (hpd_state & USB_PD_MUX_HPD_LVL) - retimer_con_reg |= BB_RETIMER_HPD_LVL; + retimer_con_reg |= + (BB_RETIMER_HPD_LVL | BB_RETIMER_DP_CONNECTION); else - retimer_con_reg &= ~BB_RETIMER_HPD_LVL; + retimer_con_reg &= + ~(BB_RETIMER_HPD_LVL | BB_RETIMER_DP_CONNECTION); /* Writing the register4 */ bb_retimer_write(me, BB_RETIMER_REG_CONNECTION_STATE, retimer_con_reg); |