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

Skip to content
Commit 98202fdf authored by Guru Das Srinagesh's avatar Guru Das Srinagesh
Browse files

power: smb5: Reorder steps to change USBIN voltage for Type-C adaptors



Currently while changing USBIN voltage for QC2.0, QC3.0 and USB-PD
adaptors, the inductor ripple current sometimes rises to a magnitude
that results in damage of the SMB5 peripheral. This patch fixes this
issue by keeping inductor ripple current low and within sane limits.

Fixing this issue requires in general the re-ordering of the two main
steps involved in changing voltage - changing the DC-DC switcher's
frequency (FSW) and setting USBIN voltage as follows:
- When increasing input voltage: increase FSW first, then increase
  input voltage;
- When decreasing input voltage: decrease input voltage first,
  then decrease FSW.

This is implemented slightly differently in the case of each adaptor
type as duly recorded below.

For QC2.0:
- For 9V and 12V requests, first determine if the voltage change is an
  increase from a lower voltage or not.
- If so, then set the FSW first.
- Set the voltage afterwards.
- There is no change required to the way 5V requests are handled because
  5V being the lowest possible voltage, requests are made from a higher
  voltage, so the voltage change will always be a decrease.

For QC3.0 and USB-PD both:
- While increasing the voltage, increase the FSW first and only then set
  the voltage.
- There is no change required to the way voltage decrease currently occurs.

CRs-Fixed: 2296976
Change-Id: Ic6d9e79610e605ac6979e6dd29c425e1eb5aab17
Signed-off-by: default avatarGuru Das Srinagesh <gurus@codeaurora.org>
parent 159dc458
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment