summaryrefslogtreecommitdiff
path: root/board/scarlet/board.h
diff options
context:
space:
mode:
authorPhilip Chen <philipchen@google.com>2017-08-28 19:34:30 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-08-31 14:19:58 -0700
commite6c6404cd6c5618d9050aa57ac08307e47f8fe9f (patch)
tree68554523ac1f80b0fe02723d4a95acc25df38d77 /board/scarlet/board.h
parent463aead11bab59dd6c15dd6f2954be4a6197d531 (diff)
downloadchrome-ec-e6c6404cd6c5618d9050aa57ac08307e47f8fe9f.tar.gz
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>
Diffstat (limited to 'board/scarlet/board.h')
-rw-r--r--board/scarlet/board.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/board/scarlet/board.h b/board/scarlet/board.h
index 29ec62ad68..6e83f922be 100644
--- a/board/scarlet/board.h
+++ b/board/scarlet/board.h
@@ -125,9 +125,9 @@
#define BATTERY_DESIRED_CHARGING_CURRENT 2000 /* mA */
#define PD_OPERATING_POWER_MW 15000
-#define PD_MAX_POWER_MW 60000
+#define PD_MAX_POWER_MW ((PD_MAX_VOLTAGE_MV * PD_MAX_CURRENT_MA) / 1000)
#define PD_MAX_CURRENT_MA 3000
-#define PD_MAX_VOLTAGE_MV 20000
+#define PD_MAX_VOLTAGE_MV 12850
#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */
#define PD_POWER_SUPPLY_TURN_OFF_DELAY 50000 /* us */