Philip Chen e6c6404cd6 scarlet: Limit the maximal acceptable VBUS to 13V
When my 15V/30W charger is plugged in scarlet,
I see rt946x (the battery charger on Scarlet) asserts OVP because
VBUS(15V) > VBUS_OVP(14V) defined in rt946x datasheet.

So we should limit the maximal VBUS to ~13V even if the source can
provide higher voltage.

Meanwhile, let's replace some numbers with macros for better
maintainability.

BUG=b:65118519
BRANCH=none
TEST=manually verify charging works with a 15V/30W PD charger

Change-Id: I19b7d8297bdbab0a722c488910fd872eb1395e16
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/639927
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: David Schneider <dnschneid@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-08-31 14:19:58 -07:00
2017-08-07 19:29:13 -07:00
2017-08-31 04:52:19 -07:00
2017-07-08 20:38:53 -07:00
2017-08-29 19:37:05 -07:00
2017-08-29 19:37:04 -07:00
2012-05-11 09:11:52 -07:00
2014-04-02 19:58:53 +00:00
2015-12-08 20:05:05 -08:00

For an overview of the Embedded Controller firmware, refer to

http://www.chromium.org/chromium-os/2014-firmware-summit

For instructions on building from source, refer to

http://www.chromium.org/chromium-os/ec-development/getting-started-building-ec-images-quickly
Description
No description provided
Readme 1.4 GiB
Languages
C 64.7%
Lasso 20.7%
ASL 3.6%
JavaScript 3.2%
C# 2.9%
Other 4.6%