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 <frank.wang@rock-chips.com>
Change-Id: Iefeb7dd20c03c04832ac82d43cc4f8d9edccbcc6
This commit is contained in:
Frank Wang
2024-10-29 09:51:13 +08:00
committed by Tao Huang
parent 7f84caccd0
commit 6448d1eec8

View File

@@ -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);