From 0bec4db01a2a404356a63f7ccc13c8cc9591526d Mon Sep 17 00:00:00 2001 From: Wang Jie Date: Tue, 8 Feb 2022 09:40:41 +0800 Subject: [PATCH] usb: typec: tcpm: husb311: disable i2c timeout reset function According to the description of the I2C_RESET(0x9E) register in the husb311 datasheet, the main configuration is enable/disable i2c timeout reset function(bit[7]) and i2c timeout time(bit[3:0]). If the i2c timeout reset function is enabled, the husb311 will perform a soft reset in some cases, such as system hibernation, and close the i2c bus (SCL and SDA are low at the same time). So we disable the i2c timeout reset function. Change-Id: Id9169f3ecf65725a959aadda9d2f8f60f20c87a3 Signed-off-by: Wang Jie --- drivers/usb/typec/tcpm/tcpci_husb311.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/usb/typec/tcpm/tcpci_husb311.c b/drivers/usb/typec/tcpm/tcpci_husb311.c index 72a524b5cc98..46e07a8f0323 100644 --- a/drivers/usb/typec/tcpm/tcpci_husb311.c +++ b/drivers/usb/typec/tcpm/tcpci_husb311.c @@ -19,7 +19,6 @@ #define HUSB311_VID 0x2E99 #define HUSB311_PID 0x0311 #define HUSB311_TCPC_POWER 0x90 -#define HUSB311_TCPC_I2C_RESET 0x9E #define HUSB311_TCPC_SOFTRESET 0xA0 #define HUSB311_TCPC_FILTER 0xA1 #define HUSB311_TCPC_TDRP 0xA2 @@ -70,10 +69,8 @@ static int husb311_init(struct tcpci *tcpci, struct tcpci_data *tdata) int ret; struct husb311_chip *chip = tdata_to_husb311(tdata); - /* I2C reset : (val + 1) * 12.5ms */ - ret = husb311_write8(chip, HUSB311_TCPC_I2C_RESET, 0x8F); /* tTCPCfilter : (26.7 * val) us */ - ret |= husb311_write8(chip, HUSB311_TCPC_FILTER, 0x0F); + ret = husb311_write8(chip, HUSB311_TCPC_FILTER, 0x0F); /* tDRP : (51.2 + 6.4 * val) ms */ ret |= husb311_write8(chip, HUSB311_TCPC_TDRP, 0x04); /* dcSRC.DRP : 33% */