diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2021-04-15 12:20:51 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-20 02:04:31 +0000 |
commit | a6f791ada46d9dbcbaf334672fafca8da9535834 (patch) | |
tree | de56182e26364c7d45b43719ef1e2cdfcbd564f4 /include | |
parent | 748deb2db0ecc013c04c72768fd99467d5ddec6f (diff) | |
download | chrome-ec-a6f791ada46d9dbcbaf334672fafca8da9535834.tar.gz |
TCPC: Cleanup: Enable PPC from PD or Power MUX
Some PD chips have integrated SRC FET and control the SRC/SINK FET
from GPIOs hence cleaned up the code to enable Power Path Control
from either from PD or from Power MUX.
BUG=none
BRANCH=none
TEST=make buildall -j
Change-Id: I77f96b681fd2e5fca35bce425e4bd5ec87d5ccfd
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2828980
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 10 | ||||
-rw-r--r-- | include/driver/tcpm/tcpm.h | 2 | ||||
-rw-r--r-- | include/usb_pd_tcpm.h | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/include/config.h b/include/config.h index 71a5724cf7..c381ae6bd3 100644 --- a/include/config.h +++ b/include/config.h @@ -4322,6 +4322,9 @@ /* Enable PCIE tunneling if Thunderbolt-Compatible mode is enabled*/ #undef CONFIG_USB_PD_PCIE_TUNNELING +/* Enable Power Path Control from PD */ +#undef CONFIG_USB_PD_PPC + /* * The following two macros are ASCII text strings that matches what appears * in the USB-IF Product Registration form for this device. These macros are @@ -5535,6 +5538,13 @@ #define CONFIG_USBC_PPC #endif /* "has a PPC" */ +/* Following chips use Power Path Control information from TCPC chip */ +#if defined(CONFIG_USBC_PPC_AOZ1380) || \ + defined(CONFIG_USBC_PPC_NX20P3481) || \ + defined(CONFIG_USBC_PPC_NX20P3483) +#define CONFIG_USB_PD_PPC +#endif + /* The TI SN5S330 supports VCONN and needs to be informed of CC polarity */ #if defined(CONFIG_USBC_PPC_SN5S330) #define CONFIG_USBC_PPC_POLARITY diff --git a/include/driver/tcpm/tcpm.h b/include/driver/tcpm/tcpm.h index 7965684017..901f44a26a 100644 --- a/include/driver/tcpm/tcpm.h +++ b/include/driver/tcpm/tcpm.h @@ -254,7 +254,7 @@ static inline int tcpm_transmit(int port, enum tcpm_transmit_type type, return tcpc_config[port].drv->transmit(port, type, header, data); } -#ifdef CONFIG_USBC_PPC +#ifdef CONFIG_USB_PD_PPC static inline int tcpm_get_snk_ctrl(int port, bool *sinking) { int rv = EC_ERROR_UNIMPLEMENTED; diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h index df195d1832..a814c2b7af 100644 --- a/include/usb_pd_tcpm.h +++ b/include/usb_pd_tcpm.h @@ -367,7 +367,7 @@ struct tcpm_drv { int (*get_chip_info)(int port, int live, struct ec_response_pd_chip_info_v1 *info); -#ifdef CONFIG_USBC_PPC +#ifdef CONFIG_USB_PD_PPC /** * Request current sinking state of the TCPC * NOTE: this is most useful for PPCs that can not tell on their own |