summaryrefslogtreecommitdiff
path: root/board/plankton
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2014-11-02 17:55:11 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-11-06 20:06:25 +0000
commit8bd7ab6203b2e6a33a75be83ae178bde52720145 (patch)
tree60e2e70a7219208a54a10074ee2bebc442becad6 /board/plankton
parent75ced738383d4b3bdf4e95b31c193cb0366e69cf (diff)
downloadchrome-ec-8bd7ab6203b2e6a33a75be83ae178bde52720145.tar.gz
pd: update source/sink cap PDOs and use to get dual role capable
Update source and sink capacity tables for all PD boards. As per spec, the first entry in both tables must be a fixed power supply PDO. Added dual-role capable bit to fixed PDOs and added new state variable to keep track of that information for each port. This will be used to make decisions in charge manager and to pass up via host commands. BUG=chrome-os-partner:28869 BRANCH=samus TEST=make buildall. use "pd 1 status" to check if part partner is dual-role capable and check zinger is not, C to A receptable adapter is not, and another samus is. Change-Id: I49f034a372bc145cd524577c17ca210eec4c1013 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/227170 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org>
Diffstat (limited to 'board/plankton')
-rw-r--r--board/plankton/usb_pd_policy.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/board/plankton/usb_pd_policy.c b/board/plankton/usb_pd_policy.c
index f213fce9ca..c4367a094d 100644
--- a/board/plankton/usb_pd_policy.c
+++ b/board/plankton/usb_pd_policy.c
@@ -23,10 +23,10 @@
/* Source PDOs */
const uint32_t pd_src_pdo[] = {
- PDO_FIXED(5000, 500, PDO_FIXED_EXTERNAL),
- PDO_FIXED(5000, 3000, PDO_FIXED_EXTERNAL),
- PDO_FIXED(12000, 3000, PDO_FIXED_EXTERNAL),
- PDO_FIXED(20000, 3000, PDO_FIXED_EXTERNAL),
+ PDO_FIXED(5000, 500, PDO_FIXED_EXTERNAL|PDO_FIXED_DUAL_ROLE),
+ PDO_FIXED(5000, 3000, PDO_FIXED_EXTERNAL|PDO_FIXED_DUAL_ROLE),
+ PDO_FIXED(12000, 3000, PDO_FIXED_EXTERNAL|PDO_FIXED_DUAL_ROLE),
+ PDO_FIXED(20000, 3000, PDO_FIXED_EXTERNAL|PDO_FIXED_DUAL_ROLE),
};
static const int pd_src_pdo_cnts[3] = {
[SRC_CAP_5V] = 2,
@@ -38,9 +38,9 @@ static int pd_src_pdo_idx;
/* Fake PDOs : we just want our pre-defined voltages */
const uint32_t pd_snk_pdo[] = {
- PDO_FIXED(5000, 500, 0),
- PDO_FIXED(12000, 500, 0),
- PDO_FIXED(20000, 500, 0),
+ PDO_FIXED(5000, 500, PDO_FIXED_DUAL_ROLE),
+ PDO_FIXED(12000, 500, PDO_FIXED_DUAL_ROLE),
+ PDO_FIXED(20000, 500, PDO_FIXED_DUAL_ROLE),
};
const int pd_snk_pdo_cnt = ARRAY_SIZE(pd_snk_pdo);