summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorjohnwc_yeh <johnwc_yeh@compal.corp-partner.google.com>2022-06-28 13:30:18 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-07 18:27:30 +0000
commit4dfe7f2a385d9ad3ca10064b29e4acb0f68c30a3 (patch)
tree53a426b89e2da4c0cfe4ce67e0d5be93d313a066 /driver
parent43fa6b4bf834803e23562a868dfba32e561ea96f (diff)
downloadchrome-ec-4dfe7f2a385d9ad3ca10064b29e4acb0f68c30a3.tar.gz
BB retimer: Set 'DP CONNECTION' bit only when mux_state gets HPD event
For some chromebooks design, there are expanssion card (typeC to HDMI) communicate with TCPC through CC line, when the HDMI card connect to chromebook the DP CONNECTION bit would be enable even no connect HDMI moinitor. It will increase BBR power consumption, so set 'DP CONNECTION' bit only when mux_state gets HPD event. BUG=b:233975818 BRANCH=None TEST=Test on Banshee, measure BBR power consumption reduce from 143mW to 7mW. And the HDMI monitor can be output. Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: I8a80235992cfa1bac28f03c3b6a7ec378e07ecf3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3726600 Reviewed-by: Diana Z <dzigterman@chromium.org> Tested-by: Enzo Hong <enzo.hong@intel.corp-partner.google.com> Commit-Queue: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r--driver/retimer/bb_retimer.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/driver/retimer/bb_retimer.c b/driver/retimer/bb_retimer.c
index 3efbaaab6a..6b7dffa2cc 100644
--- a/driver/retimer/bb_retimer.c
+++ b/driver/retimer/bb_retimer.c
@@ -413,13 +413,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)
@@ -498,14 +492,26 @@ void bb_retimer_hpd_update(const struct usb_mux *me, mux_state_t mux_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 (mux_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);