Skip to content

Commit 8ddab0f

Browse files
authored
Merge pull request #808 from FrameworkComputer/fwk.dp_low_power_fix_anx_drop
workaround dp alt mode active bit wrong
2 parents 67553ee + fc06038 commit 8ddab0f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

zephyr/program/lotus/src/cypress_pd_common.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1520,7 +1520,13 @@ static void poweroff_dp_check(void)
15201520
cypd_read_reg8(PORT_TO_CONTROLLER(i),
15211521
CCG_DP_ALT_MODE_CONFIG_REG(PORT_TO_CONTROLLER_PORT(i)),
15221522
&alt_active);
1523-
if ((alt_active & BIT(1)) == 0) {
1523+
/* DP_ALT should be on bit 1 always, but there is a bug
1524+
* in the PD stack that if a port does not have TBT mode
1525+
* enabled, it will shift the DP alt mode enable bit to
1526+
* bit 0. Since we only whitelist DP alt mode cards, just
1527+
* mask on both as a workaround.
1528+
*/
1529+
if ((alt_active & (BIT(1) + BIT(0))) == 0) {
15241530
port_to_safe_mode(i);
15251531
}
15261532
pending_dp_poweroff[i] = 0;

0 commit comments

Comments
 (0)