Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af21981a authored by Harry Yang's avatar Harry Yang
Browse files

power: smb5-lib: Fix USBIN Under-Voltage Lock-out issue



Sometimes, the USB input under-voltage is easy to get triggered when
there is a large cable IR drop, like when QC2/3 supplies 3A ICL at 5V
when battery voltage is high.

Reduce the AICL collapse deglitch filter time and step time so that
the ICL can be lowered before the ASHDN is deglitched into UVLO and
turns off the switcher.

Change-Id: I72fd1a6549d6ea89b5c9f7ac05bc424d2bf142eb
Signed-off-by: default avatarHarry Yang <harryy@codeaurora.org>
parent 7e279040
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -1553,6 +1553,13 @@ static int smb5_configure_typec(struct smb_charger *chg)
		return rc;
		return rc;
	}
	}


	rc = smblib_masked_write(chg, USBIN_LOAD_CFG_REG,
		USBIN_IN_COLLAPSE_GF_SEL_MASK | USBIN_AICL_STEP_TIMING_SEL_MASK,
		0);
	if (rc < 0)
		dev_err(chg->dev,
			"Couldn't set USBIN_LOAD_CFG_REG rc=%d\n", rc);

	return rc;
	return rc;
}
}


+2 −0
Original line number Original line Diff line number Diff line
@@ -258,6 +258,8 @@ enum {


#define USBIN_LOAD_CFG_REG			(USBIN_BASE + 0x65)
#define USBIN_LOAD_CFG_REG			(USBIN_BASE + 0x65)
#define ICL_OVERRIDE_AFTER_APSD_BIT		BIT(4)
#define ICL_OVERRIDE_AFTER_APSD_BIT		BIT(4)
#define USBIN_AICL_STEP_TIMING_SEL_MASK		GENMASK(3, 2)
#define USBIN_IN_COLLAPSE_GF_SEL_MASK		GENMASK(1, 0)


#define USBIN_ICL_OPTIONS_REG			(USBIN_BASE + 0x66)
#define USBIN_ICL_OPTIONS_REG			(USBIN_BASE + 0x66)
#define CFG_USB3P0_SEL_BIT			BIT(2)
#define CFG_USB3P0_SEL_BIT			BIT(2)