summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuibin Chang <ruibin.chang@ite.com.tw>2020-12-15 16:03:18 +0800
committerCommit Bot <commit-bot@chromium.org>2020-12-21 21:31:04 +0000
commit774cfcbb675455973bb4d7856633d065f5c674fb (patch)
treeba172e038c140f454666563702ac8e2d7e032d08
parent623ab3b91352fa93209bd8015b7769bfda7f8d2f (diff)
downloadchrome-ec-774cfcbb675455973bb4d7856633d065f5c674fb.tar.gz
tcpm/it83xx: Disable Rx decode in pd init
Default setting of Rx decode SOP and Hard reset are enabled, so I disable it in pd init. BUG=none BRANCH=none TEST=on drawcia, console cmd check register 01h Bit[5:7] = 000b, 1Bh Bit[0] = 0b. Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw> Change-Id: Ibf3c7bc144dc0385d8d92a07fab7899d1f0d0bdd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2592535 Tested-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--driver/tcpm/it83xx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/driver/tcpm/it83xx.c b/driver/tcpm/it83xx.c
index bfa42dec09..6affdddfdf 100644
--- a/driver/tcpm/it83xx.c
+++ b/driver/tcpm/it83xx.c
@@ -52,6 +52,8 @@ const struct usbpd_ctrl_t usbpd_ctrl_regs[] = {
};
BUILD_ASSERT(ARRAY_SIZE(usbpd_ctrl_regs) == IT83XX_USBPD_PHY_PORT_COUNT);
+static int it83xx_tcpm_set_rx_enable(int port, int enable);
+
/*
* Disable cc analog and pd digital module, but only left Rd_5.1K (Not
* Dead Battery) analog module alive to assert Rd on CCs. EC reset or
@@ -413,6 +415,8 @@ static void it83xx_init(enum usbpd_port port, int role)
*/
IT83XX_USBPD_BMCSR(port) = (IT83XX_USBPD_BMCSR(port) & ~0x70) |
((CONFIG_PD_RETRY_COUNT + 1) << 4);
+ /* Disable Rx decode */
+ it83xx_tcpm_set_rx_enable(port, 0);
/* W/C status */
IT83XX_USBPD_ISR(port) = 0xff;
/* enable cc, select cc1 and Rd. */