[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230313025843.17162-2-frank.wang@rock-chips.com>
Date: Mon, 13 Mar 2023 10:58:40 +0800
From: Frank Wang <frank.wang@...k-chips.com>
To: linux@...ck-us.net, heikki.krogerus@...ux.intel.com,
gregkh@...uxfoundation.org, heiko@...ech.de
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-rockchip@...ts.infradead.org, huangtao@...k-chips.com,
william.wu@...k-chips.com, jianwei.zheng@...k-chips.com,
yubing.zhang@...k-chips.com, wmc@...k-chips.com,
Frank Wang <frank.wang@...k-chips.com>
Subject: [PATCH 1/4] 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@...k-chips.com>
---
drivers/usb/typec/tcpm/tcpm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index a0d943d785800..66de02a56f512 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -4851,7 +4851,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;
--
2.17.1
Powered by blists - more mailing lists