diff options
author | Scott Collyer <scollyer@google.com> | 2018-03-16 09:44:32 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-03-20 19:30:17 -0700 |
commit | 261afe62f30f0a259505b14ec1afcfb6fb1d781a (patch) | |
tree | da3aacf1d6785da778d036784273532caa1ac96b /common/usbc_ppc.c | |
parent | 699838c0c1b9222d2d01d1575be3519fa8e3b9ba (diff) | |
download | chrome-ec-261afe62f30f0a259505b14ec1afcfb6fb1d781a.tar.gz |
ppc: Add driver for NX20P3483
The NX20P3483 is a USB PD and Type C high voltage sink/source combo
switch. This CL adds support for this PPC variant. Unlike the TI
SN5S330, the NX20P3483 does not support VCONN and does not need to be
informed of CC polarity by the TCPM. To account for these differences,
2 new PPC config options are added and the driver for the TI SN5S330
was modified to include these new options.
The SNK/SRC switch mode for the NX20P3483 is controlled by 2 GPIO
signals which may be connected the EC or directly to the TCPC. To
handle both cases, the ppc_chips structure was modified with a flags,
snk_gpio, and src_gpio elements.
BUG=b:74206647
BRANCH=none
TEST=make -j buildall and verified there are no build errors.
Change-Id: Ic4415ab7571b80e7661ea673434eaf4cf1f1fd2d
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/966926
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'common/usbc_ppc.c')
-rw-r--r-- | common/usbc_ppc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/usbc_ppc.c b/common/usbc_ppc.c index 6ff79a17bf..7011309cf1 100644 --- a/common/usbc_ppc.c +++ b/common/usbc_ppc.c @@ -42,6 +42,7 @@ int ppc_is_sourcing_vbus(int port) return ppc_chips[port].drv->is_sourcing_vbus(port); } +#ifdef CONFIG_USBC_PPC_POLARITY int ppc_set_polarity(int port, int polarity) { if ((port < 0) || (port >= ppc_cnt)) @@ -49,6 +50,7 @@ int ppc_set_polarity(int port, int polarity) return ppc_chips[port].drv->set_polarity(port, polarity); } +#endif int ppc_set_vbus_source_current_limit(int port, enum tcpc_rp_value rp) { @@ -66,6 +68,7 @@ int ppc_discharge_vbus(int port, int enable) return ppc_chips[port].drv->discharge_vbus(port, enable); } +#ifdef CONFIG_USBC_PPC_VCONN int ppc_set_vconn(int port, int enable) { if ((port < 0) || (port >= ppc_cnt)) @@ -73,6 +76,7 @@ int ppc_set_vconn(int port, int enable) return ppc_chips[port].drv->set_vconn(port, enable); } +#endif int ppc_vbus_sink_enable(int port, int enable) { |