usb: typec: tcpm: fix cc role at port reset

In the current implementation, the tcpm set CC1/CC2 role to open when
it do port reset would cause the VBUS removed by the Type-C partner.

The Figure 4-20 in the TCPCI 2.0 specification show that the CC1/CC2
role should set to 01b (Rp) or 10b (Rd) at Power On or Reset stage
in DRP initialization and connection detection.

So set CC1/CC2 to Rd to fix it.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Iea0fbd30c111d59b8d56f8002827eb6ceea28196
This commit is contained in:
Frank Wang
2022-04-24 14:10:39 +08:00
committed by Tao Huang
parent eb3b2e232c
commit a43f9c974a

View File

@ -4383,7 +4383,7 @@ static void run_state_machine(struct tcpm_port *port)
break;
case PORT_RESET:
tcpm_reset_port(port);
tcpm_set_cc(port, TYPEC_CC_OPEN);
tcpm_set_cc(port, TYPEC_CC_RD);
tcpm_set_state(port, PORT_RESET_WAIT_OFF,
PD_T_ERROR_RECOVERY);
break;