diff options
author | Ruibin Chang <ruibin.chang@ite.com.tw> | 2020-03-31 18:34:21 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-07 07:12:29 +0000 |
commit | 5e61cf5d90823c422004e96b120a0660919da91b (patch) | |
tree | 9a01443e05422a4794cb0476190fc21b88ae4382 /driver | |
parent | 20b5fdd6fc75cae0784adc44b844cf74063b34ba (diff) | |
download | chrome-ec-5e61cf5d90823c422004e96b120a0660919da91b.tar.gz |
it83xx/gpio: disable unused cc port module
To prevent cc pins leakage and cc pins can be used as gpio.
We will check if the chip supported tcpc physical port count is
more than board active ITE port count. If yes, we will disable
unused cc port module.
BUG=none
BRANCH=none
TEST=1) on board it8xxx2_pdevb with chip it81202, check the pd
port connection with adapter and dongle when hibernate
and resume.
adapter: connect
dongle: disconnect then re-connect
2) on board it83xx_evb with chip it8320, set cc pins as
gpio, check output level when hibernate and resume.
Change-Id: I13511741b2e066dd87277db9f71f2b4a9323ad6d
Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1994693
Tested-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
Commit-Queue: Ruibin Chang <Ruibin.Chang@ite.com.tw>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/tcpm/it83xx_pd.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/driver/tcpm/it83xx_pd.h b/driver/tcpm/it83xx_pd.h index 0056f85cb1..54c5ed3c84 100644 --- a/driver/tcpm/it83xx_pd.h +++ b/driver/tcpm/it83xx_pd.h @@ -191,6 +191,10 @@ #define IT83XX_USBPD_CC_PIN_CONFIG 0x86 #define IT83XX_USBPD_CC_PIN_CONFIG2 0x06 +#ifndef CONFIG_USB_PD_TCPM_ITE_ON_CHIP +#define CONFIG_USB_PD_ITE_ACTIVE_PORT_COUNT 0 +#endif + #define TASK_EVENT_PHY_TX_DONE TASK_EVENT_CUSTOM_BIT(PD_EVENT_FIRST_FREE_BIT) #define SET_MASK(reg, bit_mask) ((reg) |= (bit_mask)) |