diff options
author | Edward Hill <ecgh@chromium.org> | 2018-01-14 17:50:27 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-01-16 01:26:15 -0800 |
commit | 7f1bb54c108d8e01158b5fade051552942664fd0 (patch) | |
tree | ec777d50513f7c848497b65c3c9d8c1d3f0d624a | |
parent | 76bd681c8f46137953f4dc02c5de03589b0d203f (diff) | |
download | chrome-ec-7f1bb54c108d8e01158b5fade051552942664fd0.tar.gz |
grunt: Set source current limit to enable 3A output
Call ppc_set_vbus_source_current_limit to enable 3A output.
BUG=b:69378796
BRANCH=none
TEST=connect PD sink and see 5V 3A on both ports
Change-Id: Ia38ebcb3b1b3d1148a00b3050fcda2bd2cf73af5
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/866158
Reviewed-by: Justin TerAvest <teravest@chromium.org>
-rw-r--r-- | board/grunt/usb_pd_policy.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/board/grunt/usb_pd_policy.c b/board/grunt/usb_pd_policy.c index b4184a1da5..ca2545c436 100644 --- a/board/grunt/usb_pd_policy.c +++ b/board/grunt/usb_pd_policy.c @@ -125,8 +125,10 @@ void pd_power_supply_reset(int port) if (prev_en) pd_set_vbus_discharge(port, 1); +#ifdef CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT /* Give back the current quota we are no longer using */ charge_manager_source_port(port, 0); +#endif /* defined(CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT) */ /* Notify host of power info change. */ pd_send_host_event(PD_EVENT_POWER_CHANGE); @@ -141,9 +143,6 @@ int pd_set_power_supply_ready(int port) if (rv) return rv; - /* Ensure we advertise the proper available current quota */ - charge_manager_source_port(port, 1); - pd_set_vbus_discharge(port, 0); /* Provide Vbus. */ @@ -151,6 +150,11 @@ int pd_set_power_supply_ready(int port) if (rv) return rv; +#ifdef CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT + /* Ensure we advertise the proper available current quota */ + charge_manager_source_port(port, 1); +#endif /* defined(CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT) */ + /* Notify host of power info change. */ pd_send_host_event(PD_EVENT_POWER_CHANGE); @@ -164,7 +168,7 @@ void pd_transition_voltage(int idx) void typec_set_source_current_limit(int port, int rp) { - /* TODO(ecgh): call ppc_set_vbus_source_current_limit */ + ppc_set_vbus_source_current_limit(port, rp); } int pd_snk_is_vbus_provided(int port) |