diff options
author | Alec Berg <alecaberg@chromium.org> | 2014-11-02 17:55:11 -0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-11-06 20:06:25 +0000 |
commit | 8bd7ab6203b2e6a33a75be83ae178bde52720145 (patch) | |
tree | 60e2e70a7219208a54a10074ee2bebc442becad6 /board/twinkie | |
parent | 75ced738383d4b3bdf4e95b31c193cb0366e69cf (diff) | |
download | chrome-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/twinkie')
-rw-r--r-- | board/twinkie/usb_pd_policy.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/board/twinkie/usb_pd_policy.c b/board/twinkie/usb_pd_policy.c index d71770e4ec..1179318efd 100644 --- a/board/twinkie/usb_pd_policy.c +++ b/board/twinkie/usb_pd_policy.c @@ -18,16 +18,17 @@ #define CPRINTS(format, args...) cprints(CC_USBPD, format, ## args) const uint32_t pd_src_pdo[] = { - PDO_FIXED(5000, 500, PDO_FIXED_EXTERNAL), - PDO_FIXED(5000, 3000, 0), - PDO_FIXED(12000, 3000, 0), - PDO_FIXED(20000, 2000, 0), + 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), }; const int pd_src_pdo_cnt = ARRAY_SIZE(pd_src_pdo); const uint32_t pd_snk_pdo[] = { - PDO_BATT(4500, 5500, 15000), - PDO_BATT(11500, 12500, 36000), + PDO_FIXED(5000, 500, PDO_FIXED_DUAL_ROLE), + PDO_BATT(5000, 20000, 15000), + PDO_VAR(5000, 20000, 3000), }; const int pd_snk_pdo_cnt = ARRAY_SIZE(pd_snk_pdo); |