diff options
author | Sam Hurst <shurst@google.com> | 2021-03-04 14:59:44 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-12 20:11:41 +0000 |
commit | 1dee3ef51fb66a139f2dbb98f8b923199366467d (patch) | |
tree | c037057665bb3891645d55e4e67203e661732ef3 /common | |
parent | 1de6b4fbda2bdc60c010c8136bfc02697a3839bb (diff) | |
download | chrome-ec-1dee3ef51fb66a139f2dbb98f8b923199366467d.tar.gz |
TCPMV2: Add explicit setting of VPD VDO CT Current
Add the capablility to explicity set a CTVPDs VDO
current.
BUG=b:165934405
BRANCH=none
TEST=make runtests
Verified that returned VDO from chocodile_vpdmcu was correct.
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: I2292024986fa89b228b56678d61d1aef2866c817
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2748427
Tested-by: Sam Hurst <shurst@google.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Sam Hurst <shurst@google.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/usbc/usb_pe_ctvpd_sm.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/common/usbc/usb_pe_ctvpd_sm.c b/common/usbc/usb_pe_ctvpd_sm.c index fd1c83a6df..06a9137a2d 100644 --- a/common/usbc/usb_pe_ctvpd_sm.c +++ b/common/usbc/usb_pe_ctvpd_sm.c @@ -194,8 +194,14 @@ static void pe_request_run(const int port) VPD_HW_VERSION, VPD_FW_VERSION, VPD_MAX_VBUS_20V, - VPD_VBUS_IMP(VPD_VBUS_IMPEDANCE), - VPD_GND_IMP(VPD_GND_IMPEDANCE), + IS_ENABLED(CONFIG_USB_CTVPD) ? VPD_CT_CURRENT + : 0, + IS_ENABLED(CONFIG_USB_CTVPD) ? VPD_VBUS_IMP( + VPD_VBUS_IMPEDANCE) + : 0, + IS_ENABLED(CONFIG_USB_CTVPD) ? VPD_GND_IMP( + VPD_GND_IMPEDANCE) + : 0, IS_ENABLED(CONFIG_USB_CTVPD) ? VPD_CTS_SUPPORTED : VPD_CTS_NOT_SUPPORTED); |