From 418ce5f80a26a0da4af396b802b1a2a5ce5b4291 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Mon, 4 May 2015 17:39:09 -0700 Subject: ryu: update PD electrical parameters The new charger has a different input voltage range and has now a 5V boost providing 1.5A when sourcing VBUS (along with an updated 1.5A Rp), update the PD descriptors and voltage thresholds accordingly. Overall, there is no functional change. Signed-off-by: Vincent Palatin BRANCH=none BUG=chrome-os-partner:38603 TEST=build and verify 5V and 12V charging is still working Change-Id: Ie3d54956c940781d06039fccd52966f37d7d48e4 Reviewed-on: https://chromium-review.googlesource.com/269261 Reviewed-by: Alec Berg Commit-Queue: Vincent Palatin Tested-by: Vincent Palatin --- board/ryu/usb_pd_config.h | 6 ++++-- board/ryu/usb_pd_policy.c | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/board/ryu/usb_pd_config.h b/board/ryu/usb_pd_config.h index 032611c34a..7017118c0a 100644 --- a/board/ryu/usb_pd_config.h +++ b/board/ryu/usb_pd_config.h @@ -199,8 +199,10 @@ static inline int pd_snk_is_vbus_provided(int port) return gpio_get_level(GPIO_CHGR_ACOK); } -/* Standard-current DFP : no-connect voltage is 1.55V */ -#define PD_SRC_VNC 1550 /* mV */ +/* 1.5A DFP : no-connect voltage threshold is 1.60V */ +#define PD_SRC_VNC 1600 /* mV */ +/* 1.5A DFP : Ra/Rd detection voltage threshold is 400mV */ +#define PD_SRC_RD_THRESHOLD 400 /* mV */ /* UFP-side : threshold for DFP connection detection */ #define PD_SNK_VA 200 /* mV */ diff --git a/board/ryu/usb_pd_policy.c b/board/ryu/usb_pd_policy.c index 9459ab8772..7bb5aea2e4 100644 --- a/board/ryu/usb_pd_policy.c +++ b/board/ryu/usb_pd_policy.c @@ -29,8 +29,8 @@ const int pd_src_pdo_cnt = ARRAY_SIZE(pd_src_pdo); const uint32_t pd_snk_pdo[] = { PDO_FIXED(5000, 500, PDO_FIXED_FLAGS), - PDO_BATT(4750, 21000, 10000), - PDO_VAR(4750, 21000, 3000), + PDO_BATT(4500, 14000, 10000), + PDO_VAR(4500, 14000, 3000), }; const int pd_snk_pdo_cnt = ARRAY_SIZE(pd_snk_pdo); -- cgit v1.2.1