diff options
author | Diana Z <dzigterman@chromium.org> | 2020-12-16 11:31:01 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-12-24 01:10:58 +0000 |
commit | 1edf350debe3c19215d8afb7d168d26950fe9cdb (patch) | |
tree | 25642d6a51c19c76bdba51cd9afb28082fe9a69d /include/usb_pd_dpm.h | |
parent | bab787e065cac46be3a3070b4060741108601475 (diff) | |
download | chrome-ec-1edf350debe3c19215d8afb7d168d26950fe9cdb.tar.gz |
TCPMv2: DPM sourcing policy - 3.0 A PD sinks
Move the sourcing policy from the charge_manager to the DPM for TCPMv2.
The first step of this policy will be to allocate 3.0 A only if a
peripheral reports requiring more than 1.5 A in their Sink Capabilities
vSafe5V operational current. For this commit, leave in some
charge_manager APIs for linking which will be re-named or removed later.
BRANCH=None
BUG=b:141690755,b:168862110
TEST=on drawcia verify:
- non-PD sink only offered 1.5 A Rp
- PD sink requiring 1.5 A or less Rp isn't offered 3.0 A
- PD sink requiring 3.0 A is offered a new 3.0 A Source Capability after
sink capability probing. Port continues to receive 3.0 A over both hard
and soft resets.
- When 2 3.0 A sinks are plugged in, only the first is offered 3.0 A.
After the first is unplugged, the second receives a 3.0 A source
capability message
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Iec48312df1125086db2919c1503c7ba31fe12bcc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2597429
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'include/usb_pd_dpm.h')
-rw-r--r-- | include/usb_pd_dpm.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/usb_pd_dpm.h b/include/usb_pd_dpm.h index ccc7c57ff7..29253f4031 100644 --- a/include/usb_pd_dpm.h +++ b/include/usb_pd_dpm.h @@ -58,4 +58,21 @@ void dpm_vdm_naked(int port, enum tcpm_transmit_type type, uint16_t svid, */ void dpm_run(int port); +/* + * Determines the current allocation for the connection, past the basic + * CONFIG_USB_PD_PULLUP value set by the TC (generally 1.5 A) + * + * @param port USB-C port number + * @param vsafe5v_pdo Copy of first Sink_Capability PDO, which should + * represent the vSafe5V fixed PDO + */ +void dpm_evaluate_sink_fixed_pdo(int port, uint32_t vsafe5v_pdo); + +/* + * Remove this port as a sink, and reallocate maximum current as needed. + * + * @param port USB-C port number + */ +void dpm_remove_sink(int port); + #endif /* __CROS_EC_USB_DPM_H */ |