summaryrefslogtreecommitdiff
path: root/board/servo_v4
diff options
context:
space:
mode:
authorEric Yilun Lin <yllin@chromium.org>2020-05-26 14:20:28 +0800
committerCommit Bot <commit-bot@chromium.org>2020-05-27 01:49:35 +0000
commitd7fbb75271a8ec4ca6d84e08bbac37e2ed6cc4e9 (patch)
tree39627e48cd909a85a793e1391f2f21fa97102c6d /board/servo_v4
parent97ba1d791eb7855ad6652d36a79325268fb28951 (diff)
downloadchrome-ec-d7fbb75271a8ec4ca6d84e08bbac37e2ed6cc4e9.tar.gz
servo_v4: use PD_PREFER_HIGH_VOLTAGE for PDO selection logic
Define PDO selection logic for SourceCap PDO collection. On a 45W PD charger, it might provide PDOs with 15V/3A and 20V/2.25A. In this case, pd_find_pdo_index() would always prefer 15V/3A rather than 20V/2.25A and such that the 20V PDO will be disappeared when servo-v4 advertise the SrcCap. We define PD_PREFER_HIGH_VOLTAGE so that all the PDOs could be advertised by servo-v4. BUG=b:147021699 TEST=plug treeya 45W charger, and see servo-v4 advertise 20V/2.25A PDO BRANCH=servo-v4 Change-Id: I3bd071161679bae98be17fd6b53a24e258d9c15c Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2215391 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'board/servo_v4')
-rw-r--r--board/servo_v4/board.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/board/servo_v4/board.h b/board/servo_v4/board.h
index b89df7f9f4..8654ad901e 100644
--- a/board/servo_v4/board.h
+++ b/board/servo_v4/board.h
@@ -150,6 +150,15 @@
#define PD_MAX_POWER_MW 60000
#define PD_MAX_CURRENT_MA 3000
#define PD_MAX_VOLTAGE_MV 20000
+/*
+ * Define PDO selection logic for SourceCap.
+ * On a 45W PD charger, it might provide PDOs with 15V/3A and 20V/2.25A.
+ * In this case, pd_find_pdo_index() would always prefer 15V/3A rather than
+ * 20V/2.25A and such that the 20V PDO will be disappeared when servo-v4
+ * advertise the SrcCap. We define PD_PREFER_HIGH_VOLTAGE so that all the
+ * PDOs could be advertised by servo-v4.
+ */
+#define PD_PREFER_HIGH_VOLTAGE
/*
* Allow dangerous commands all the time, since we don't have a write protect