From 6448d1eec82ff147875bd418e234efe089eaf40b Mon Sep 17 00:00:00 2001 From: Frank Wang Date: Tue, 29 Oct 2024 09:51:13 +0800 Subject: [PATCH] usb: typec: fusb302: set src current to default 80uA The FUSB302B failed to detect sink devices from SRC_UNATTACHED state with SRC 180 uA CC current setting, the TCPM and FUSB302 logs like the below and FUSB302B has no further action. [ 72.229911] fusb302 IRQ: 0x21, a: 0x00, b: 0x00, status0: 0x23: [ 72.229993] fusb302 IRQ: COMP_CHNG, comp=true: [ 72.230212] fusb302 cc1=Open, cc2=Open: [ 72.230265] tcpm CC1: 2 -> 0, CC2: 0 -> 0 [state SRC_ATTACH_WAIT, polarity 0, disconnected]: [ 72.230306] tcpm state change SRC_ATTACH_WAIT -> SRC_UNATTACHED [rev3 NONE_AMS]: [ 72.230345] tcpm Start toggling: [ 72.237430] fusb302 start drp toggling: The vendor said that FUSB302B was designed with 80uA for sink detection which means it can only guarantee FUSB302B will works well with that setting, so amend the SRC CC current at toggling to fix it. Signed-off-by: Frank Wang Change-Id: Iefeb7dd20c03c04832ac82d43cc4f8d9edccbcc6 --- drivers/usb/typec/tcpm/fusb302.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c index 77a050cd2e88..f990f8e172aa 100644 --- a/drivers/usb/typec/tcpm/fusb302.c +++ b/drivers/usb/typec/tcpm/fusb302.c @@ -942,7 +942,7 @@ static int tcpm_start_toggling(struct tcpc_dev *dev, } mutex_lock(&chip->lock); - ret = fusb302_set_src_current(chip, cc_src_current[cc]); + ret = fusb302_set_src_current(chip, SRC_CURRENT_DEFAULT); if (ret < 0) { fusb302_log(chip, "unable to set src current %s, ret=%d", typec_cc_status_name[cc], ret);