diff options
author | Aseda Aboagye <aaboagye@google.com> | 2018-01-22 17:46:05 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-02-01 18:08:36 -0800 |
commit | e127855f27ace32faa948ee8ab052ccb98e42dd6 (patch) | |
tree | 45d3fc814a6b41cec5fac0f24230bc672d245143 /include/usbc_ppc.h | |
parent | 1b87ee65ac8f3cd895da6ef2e219670d2f9779ec (diff) | |
download | chrome-ec-e127855f27ace32faa948ee8ab052ccb98e42dd6.tar.gz |
ppc: Add Vconn and CC polarity settings.
BUG=b:72292985
BRANCH=None
TEST=Flash meowth; Verify with twinkie that Vconn is provided for a sink
that requires it.
Change-Id: I8168d2e4c46e04810dcf5c2898b2c337424eefec
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/888224
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include/usbc_ppc.h')
-rw-r--r-- | include/usbc_ppc.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/usbc_ppc.h b/include/usbc_ppc.h index eec8362959..54142b2921 100644 --- a/include/usbc_ppc.h +++ b/include/usbc_ppc.h @@ -49,6 +49,15 @@ struct ppc_drv { int (*vbus_source_enable)(int port, int enable); /** + * Inform the PPC of the polarity of the CC pins. + * + * @param port: The Type-C port number. + * @param polarity: 1: CC2 used for comms, 0: CC1 used for comms. + * @return EC_SUCCESS on success, error otherwise. + */ + int (*set_polarity)(int port, int polarity); + + /** * Set the Vbus source path current limit * * @param port: The Type-C port number. @@ -66,6 +75,14 @@ struct ppc_drv { */ int (*discharge_vbus)(int port, int enable); + /** + * Turn on/off the VCONN FET. + * + * @param port: The Type-C port number. + * @param enable: 1: enable VCONN FET 0: disable VCONN FET. + */ + int (*set_vconn)(int port, int enable); + #ifdef CONFIG_CMD_PPC_DUMP /** * Perform a register dump of the PPC. @@ -121,6 +138,15 @@ int ppc_is_vbus_present(int port); int ppc_is_sourcing_vbus(int port); /** + * Inform the PPC of the polarity of the CC pins. + * + * @param port: The Type-C port number. + * @param polarity: 1: CC2 used for comms, 0: CC1 used for comms. + * @return EC_SUCCESS on success, error otherwise. + */ +int ppc_set_polarity(int port, int polarity); + +/** * Set the Vbus source path current limit * * @param port: The Type-C port number. @@ -130,6 +156,14 @@ int ppc_is_sourcing_vbus(int port); int ppc_set_vbus_source_current_limit(int port, enum tcpc_rp_value rp); /** + * Turn on/off the VCONN FET. + * + * @param port: The Type-C port number. + * @param enable: 1: enable VCONN FET 0: disable VCONN FET. + */ +int ppc_set_vconn(int port, int enable); + +/** * Discharge PD VBUS on src/sink disconnect & power role swap * * @param port: The Type-C port number. |