summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/scarlet/board.h4
-rw-r--r--board/scarlet/usb_pd_policy.c8
2 files changed, 8 insertions, 4 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 */
diff --git a/board/scarlet/usb_pd_policy.c b/board/scarlet/usb_pd_policy.c
index 0a62ea4f6d..95f365ff49 100644
--- a/board/scarlet/usb_pd_policy.c
+++ b/board/scarlet/usb_pd_policy.c
@@ -38,8 +38,12 @@ const int pd_src_pdo_max_cnt = ARRAY_SIZE(pd_src_pdo_max);
const uint32_t pd_snk_pdo[] = {
PDO_FIXED(5000, 500, PDO_FIXED_FLAGS),
- PDO_BATT(4750, 21000, 15000),
- PDO_VAR(4750, 21000, 3000),
+ PDO_BATT(4750,
+ (int)(PD_MAX_VOLTAGE_MV * 1.05),
+ PD_OPERATING_POWER_MW),
+ PDO_VAR(4750,
+ (int)(PD_MAX_VOLTAGE_MV * 1.05),
+ PD_MAX_CURRENT_MA),
};
const int pd_snk_pdo_cnt = ARRAY_SIZE(pd_snk_pdo);