summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver/tcpm/nct38xx.c2
-rw-r--r--include/usb_pd_tcpm.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/driver/tcpm/nct38xx.c b/driver/tcpm/nct38xx.c
index fdd22c4119..469f67f18c 100644
--- a/driver/tcpm/nct38xx.c
+++ b/driver/tcpm/nct38xx.c
@@ -66,6 +66,8 @@ static int nct38xx_init(int port)
(reg & TCPC_REG_POWER_STATUS_DEBUG_ACC_CON))
CPRINTS("C%d: Booted in dead battery mode, not changing debug"
" control", port);
+ else if (tcpc_config[port].flags & TCPC_FLAGS_NO_DEBUG_ACC_CONTROL)
+ CPRINTS("C%d: NO_DEBUG_ACC_CONTROL", port);
else
RETURN_ERROR(tcpc_update8(port, TCPC_REG_TCPC_CTRL,
TCPC_REG_TCPC_CTRL_DEBUG_ACC_CONTROL,
diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h
index 584f3ac321..0902d411b5 100644
--- a/include/usb_pd_tcpm.h
+++ b/include/usb_pd_tcpm.h
@@ -478,12 +478,14 @@ struct tcpm_drv {
* Bit 3 --> Set to 1 if TCPC is using TCPCI Revision 2.0
* Bit 4 --> Set to 1 if TCPC is using TCPCI Revision 2.0 but does not support
* the vSafe0V bit in the EXTENDED_STATUS_REGISTER
+ * Bit 5 --> Set to 1 to prevent TCPC setting debug accessory control
*/
#define TCPC_FLAGS_ALERT_ACTIVE_HIGH BIT(0)
#define TCPC_FLAGS_ALERT_OD BIT(1)
#define TCPC_FLAGS_RESET_ACTIVE_HIGH BIT(2)
#define TCPC_FLAGS_TCPCI_REV2_0 BIT(3)
#define TCPC_FLAGS_TCPCI_REV2_0_NO_VSAFE0V BIT(4)
+#define TCPC_FLAGS_NO_DEBUG_ACC_CONTROL BIT(5)
struct tcpc_config_t {
enum ec_bus_type bus_type; /* enum ec_bus_type */