diff options
author | Aseda Aboagye <aaboagye@google.com> | 2018-09-25 18:27:19 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-03-26 04:42:42 -0700 |
commit | 901dfa10e5204bb6e45f5f70d068aeefa3ad452b (patch) | |
tree | 3635f4a4ee73de30d6b8568cd1c8864ef011b94d /include/usbc_ppc.h | |
parent | a4c7cc8ab45d47fff3ab4c45d6a93ea449208e4d (diff) | |
download | chrome-ec-901dfa10e5204bb6e45f5f70d068aeefa3ad452b.tar.gz |
sn5s330: Add support for SBU FET control.
The SN5S330 has FETs for the SBU lines which need to be controlled by
the TCPM. This commit adds a function to control the SBU FETs and
enables them when configuring the USB mux.
This commit also fixes a bug with the external VBUS current limit
setting by setting it appropriately to a min of ~3A.
BUG=b:114340064
BRANCH=firmware-nocturne-10984.B
TEST=Flash nocturne; plug in hoho; verify that external display is
shown. Bounce thru S5, verify that external display still works.
TEST=Repeat above with superspeed hub instead.
Change-Id: I931f7a47d4eb28e8d9e3cb188601ce0889a44f8d
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1244382
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1530125
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Edward Hill <ecgh@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include/usbc_ppc.h')
-rw-r--r-- | include/usbc_ppc.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/usbc_ppc.h b/include/usbc_ppc.h index a502ebe91e..fbd4385afc 100644 --- a/include/usbc_ppc.h +++ b/include/usbc_ppc.h @@ -89,6 +89,16 @@ struct ppc_drv { */ int (*discharge_vbus)(int port, int enable); +#ifdef CONFIG_USBC_PPC_SBU + /** + * Turn on/off the SBU FETs. + * + * @param port: The Type-C port number. + * @param enable: 1: enable SBU FETs 0: disable SBU FETs. + */ + int (*set_sbu)(int port, int enable); +#endif /* CONFIG_USBC_PPC_SBU */ + #ifdef CONFIG_USBC_PPC_VCONN /** * Turn on/off the VCONN FET. @@ -225,6 +235,14 @@ int ppc_set_polarity(int port, int polarity); int ppc_set_vbus_source_current_limit(int port, enum tcpc_rp_value rp); /** + * Turn on/off the SBU FETs. + * + * @param port: The Type-C port number. + * @param enable: 1: enable SBU FETs 0: disable SBU FETs. + */ +int ppc_set_sbu(int port, int enable); + +/** * Turn on/off the VCONN FET. * * @param port: The Type-C port number. |