diff options
-rw-r--r-- | board/coral/board.h | 1 | ||||
-rw-r--r-- | board/eve/board.h | 1 | ||||
-rw-r--r-- | board/fizz/board.h | 1 | ||||
-rw-r--r-- | board/glkrvp/board.h | 1 | ||||
-rw-r--r-- | board/kahlee/board.h | 1 | ||||
-rw-r--r-- | board/poppy/board.h | 1 | ||||
-rw-r--r-- | board/reef/board.h | 1 | ||||
-rw-r--r-- | board/reef_it8320/board.h | 1 | ||||
-rw-r--r-- | common/usb_pd_protocol.c | 41 | ||||
-rw-r--r-- | include/config.h | 3 |
10 files changed, 3 insertions, 49 deletions
diff --git a/board/coral/board.h b/board/coral/board.h index 057b005c9e..dea50317a6 100644 --- a/board/coral/board.h +++ b/board/coral/board.h @@ -86,7 +86,6 @@ #define CONFIG_USB_PD_LOGGING #define CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT TYPEC_RP_3A0 #define CONFIG_USB_PD_PORT_COUNT 2 -#define CONFIG_USB_PD_QUIRK_SLOW_CC_STATUS #define CONFIG_USB_PD_VBUS_DETECT_CHARGER #define CONFIG_USB_PD_TCPC_BOARD_INIT #define CONFIG_USB_PD_TCPC_LOW_POWER diff --git a/board/eve/board.h b/board/eve/board.h index c8d85bd513..76fcde231f 100644 --- a/board/eve/board.h +++ b/board/eve/board.h @@ -164,7 +164,6 @@ #define CONFIG_USB_PD_LOGGING #define CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT TYPEC_RP_3A0 #define CONFIG_USB_PD_PORT_COUNT 2 -#define CONFIG_USB_PD_QUIRK_SLOW_CC_STATUS #define CONFIG_USB_PD_VBUS_DETECT_CHARGER #define CONFIG_USB_PD_TCPC_LOW_POWER #define CONFIG_USB_PD_TCPM_MUX diff --git a/board/fizz/board.h b/board/fizz/board.h index 75ff25b5da..723df09813 100644 --- a/board/fizz/board.h +++ b/board/fizz/board.h @@ -97,7 +97,6 @@ #define CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE #define CONFIG_USB_PD_LOGGING #define CONFIG_USB_PD_PORT_COUNT 1 -#define CONFIG_USB_PD_QUIRK_SLOW_CC_STATUS #define CONFIG_USB_PD_VBUS_DETECT_GPIO #define CONFIG_USB_PD_TCPC_LOW_POWER #define CONFIG_USB_PD_TCPM_MUX diff --git a/board/glkrvp/board.h b/board/glkrvp/board.h index d76ca49706..21c3a0effc 100644 --- a/board/glkrvp/board.h +++ b/board/glkrvp/board.h @@ -60,7 +60,6 @@ #define CONFIG_USB_PD_DUAL_ROLE #define CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT TYPEC_RP_3A0 #define CONFIG_USB_PD_PORT_COUNT 2 -#define CONFIG_USB_PD_QUIRK_SLOW_CC_STATUS #define CONFIG_USB_PD_TCPM_TCPCI #define CONFIG_USB_PD_TRY_SRC #define CONFIG_USB_PD_VBUS_DETECT_TCPC diff --git a/board/kahlee/board.h b/board/kahlee/board.h index 240c24569e..c780f722d8 100644 --- a/board/kahlee/board.h +++ b/board/kahlee/board.h @@ -69,7 +69,6 @@ #define CONFIG_USB_PD_LOGGING #define CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT TYPEC_RP_3A0 #define CONFIG_USB_PD_PORT_COUNT 2 -#define CONFIG_USB_PD_QUIRK_SLOW_CC_STATUS #undef CONFIG_USB_PD_VBUS_DETECT_CHARGER #define ADC_VBUS -1 #define CONFIG_USB_PD_TCPC_LOW_POWER diff --git a/board/poppy/board.h b/board/poppy/board.h index 63a3c0d9cb..480ad9f985 100644 --- a/board/poppy/board.h +++ b/board/poppy/board.h @@ -143,7 +143,6 @@ #define CONFIG_USB_PD_LOGGING #define CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT TYPEC_RP_3A0 #define CONFIG_USB_PD_PORT_COUNT 2 -#define CONFIG_USB_PD_QUIRK_SLOW_CC_STATUS #define CONFIG_USB_PD_VBUS_DETECT_GPIO #define CONFIG_USB_PD_TCPC_LOW_POWER #define CONFIG_USB_PD_TCPM_MUX diff --git a/board/reef/board.h b/board/reef/board.h index 7e33626307..7ceed4dbcb 100644 --- a/board/reef/board.h +++ b/board/reef/board.h @@ -88,7 +88,6 @@ #define CONFIG_USB_PD_LOGGING #define CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT TYPEC_RP_3A0 #define CONFIG_USB_PD_PORT_COUNT 2 -#define CONFIG_USB_PD_QUIRK_SLOW_CC_STATUS #define CONFIG_USB_PD_VBUS_DETECT_CHARGER #define CONFIG_USB_PD_TCPC_LOW_POWER #define CONFIG_USB_PD_TCPM_MUX /* for both PS8751 and ANX3429 */ diff --git a/board/reef_it8320/board.h b/board/reef_it8320/board.h index c63f2b0ecf..44f2bd6d7c 100644 --- a/board/reef_it8320/board.h +++ b/board/reef_it8320/board.h @@ -77,7 +77,6 @@ #define CONFIG_USB_PD_LOGGING #define CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT TYPEC_RP_3A0 #define CONFIG_USB_PD_PORT_COUNT 2 -#define CONFIG_USB_PD_QUIRK_SLOW_CC_STATUS #define CONFIG_USB_PD_VBUS_DETECT_CHARGER #define CONFIG_USB_PD_TCPM_ITE83XX #define CONFIG_USB_PD_TRY_SRC diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index 675d069472..76552db1c1 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -255,36 +255,6 @@ static inline int pd_is_vbus_present(int port) #endif } -static int pd_snk_debug_acc_toggle(int port) -{ -#if defined(CONFIG_CASE_CLOSED_DEBUG) || \ -defined(CONFIG_CASE_CLOSED_DEBUG_EXTERNAL) -#ifdef CONFIG_USB_PD_QUIRK_SLOW_CC_STATUS - static int possible_debug_acc[CONFIG_USB_PD_PORT_COUNT]; - int vbus = pd_is_vbus_present(port); - int result; - - /* reset debouncing of Rd/Rd debug accessory presence */ - if ((pd[port].last_state != PD_STATE_SNK_DISCONNECTED) || !vbus) - possible_debug_acc[port] = 0; - /* returns if it was possibly present in the previous iteration */ - result = possible_debug_acc[port]; - possible_debug_acc[port] = vbus; - return result; -#else /* !CONFIG_USB_PD_QUIRK_SLOW_CC_STATUS */ - /* - * when we are in SNK_DISCONNECTED and we see VBUS appearing - * (without having seen Rp before), that might be a powered debug - * accessory, let's toggle to source to try to detect it. - */ - return pd_is_vbus_present(port); -#endif /* !CONFIG_USB_PD_QUIRK_SLOW_CC_STATUS */ -#else - /* Debug accessories not supported, never toggle */ - return 0; -#endif -} - static int pd_debug_acc_plugged(int port) { #if defined(CONFIG_CASE_CLOSED_DEBUG) || \ @@ -2404,14 +2374,9 @@ void pd_task(void *u) break; } - /* - * If no source detected, check for role toggle. - * If VBUS is detected, and we are in the debug - * accessory toggle state, then allow toggling. - */ - if ((drp_state == PD_DRP_TOGGLE_ON && - get_time().val >= next_role_swap) || - pd_snk_debug_acc_toggle(port)) { + /* If no source detected, check for role toggle. */ + if (drp_state == PD_DRP_TOGGLE_ON && + get_time().val >= next_role_swap) { /* Swap roles to source */ pd[port].power_role = PD_ROLE_SOURCE; set_state(port, PD_STATE_SRC_DISCONNECTED); diff --git a/include/config.h b/include/config.h index e56a17824c..82daf94eb0 100644 --- a/include/config.h +++ b/include/config.h @@ -2541,9 +2541,6 @@ /* Number of USB PD ports */ #undef CONFIG_USB_PD_PORT_COUNT -/* Workaround TCPC that takes longer time to update CC status */ -#undef CONFIG_USB_PD_QUIRK_SLOW_CC_STATUS - /* Simple DFP, such as power adapter, will not send discovery VDM on connect */ #undef CONFIG_USB_PD_SIMPLE_DFP |