mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
zoombini: meowth: Enable 3A output.
BUG=None BRANCH=None TEST=Flash zoombini; Plug in a PD sink, verify that 5V 3A source caps are sent. Plug in a second device, verify that 5V 1.5A source caps are sent. Unplug the first device and verify that 5V 3A source caps are sent. TEST=Repeat above tests for meowth. Change-Id: I0c2b6ce1d2793230f3855856c58633d8cae4b375 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/818336 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
755517e2cf
commit
81ca8fc4b8
@@ -93,7 +93,7 @@
|
||||
#endif /* defined(BOARD_ZOOMBINI) */
|
||||
#define CONFIG_USB_PD_DUAL_ROLE
|
||||
#define CONFIG_USB_PD_LOGGING
|
||||
/* TODO(aaboagye): What about CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT? */
|
||||
#define CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT TYPEC_RP_3A0
|
||||
#define CONFIG_USB_PD_VBUS_DETECT_TCPC
|
||||
#define CONFIG_USB_PD_TCPM_PS8805
|
||||
#define CONFIG_USB_PD_TCPM_TCPCI
|
||||
|
||||
@@ -27,6 +27,11 @@ const uint32_t pd_src_pdo[] = {
|
||||
};
|
||||
const int pd_src_pdo_cnt = ARRAY_SIZE(pd_src_pdo);
|
||||
|
||||
const uint32_t pd_src_pdo_max[] = {
|
||||
PDO_FIXED(5000, 3000, PDO_FIXED_FLAGS),
|
||||
};
|
||||
const int pd_src_pdo_max_cnt = ARRAY_SIZE(pd_src_pdo_max);
|
||||
|
||||
/* TODO(aaboagye): Determine correct values. */
|
||||
const uint32_t pd_snk_pdo[] = {
|
||||
PDO_FIXED(5000, 500, PDO_FIXED_FLAGS),
|
||||
@@ -108,6 +113,11 @@ void pd_power_supply_reset(int port)
|
||||
/* Disable VBUS. */
|
||||
ppc_vbus_source_enable(port, 0);
|
||||
|
||||
#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);
|
||||
}
|
||||
@@ -129,6 +139,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);
|
||||
|
||||
@@ -140,6 +155,11 @@ void pd_transition_voltage(int idx)
|
||||
/* No-operation: we are always 5V */
|
||||
}
|
||||
|
||||
void typec_set_source_current_limit(int p, int rp)
|
||||
{
|
||||
ppc_set_vbus_source_current_limit(p, rp);
|
||||
}
|
||||
|
||||
/* ----------------- Vendor Defined Messages ------------------ */
|
||||
const struct svdm_response svdm_rsp = {
|
||||
.identity = NULL,
|
||||
|
||||
Reference in New Issue
Block a user