Skip to content

Commit c3496e0

Browse files
LeoCX-Tsaiamstan
authored andcommitted
fwk: dogwood: fix provide 3A logic
The dogwood design should only provide one 3A power to the device but will now offer 3A to both ports, add an AND condition to avoid this situation. BRANCH=fwk-dogwood-27111 BUG=None TEST=plug-in TYPEC Monitor(port0) and 3A dongle(port1), boot to system and typec cypdstatus 0 at EC console, check only has one device with 3A RDO. Signed-off-by: LeoCX_Tsai <LeoCX_Tsai@compal.com>
1 parent 0e28f94 commit c3496e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

zephyr/program/framework/src/cypress_pd_common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1732,7 +1732,8 @@ void cypd_port_int(int controller, int port)
17321732
/* check if the device is the first 3A pd device or not */
17331733
if (pd_port_states[another_pd_port].pd_state != PD_ROLE_SOURCE ||
17341734
(pd_port_states[another_pd_port].pd_state == PD_ROLE_SOURCE &&
1735-
pd_port_states[another_pd_port].current != 3000))
1735+
pd_port_states[another_pd_port].current != 3000 &&
1736+
pd_port_states[another_pd_port].first_pd_device != true))
17361737
pd_port_states[pd_port].first_pd_device = true;
17371738
}
17381739
#ifdef CONFIG_PD_CCG8_EPR

0 commit comments

Comments
 (0)