From c624651b90e6372eb846cdfcfc93f0b27ecc18f8 Mon Sep 17 00:00:00 2001 From: Diana Z Date: Fri, 25 Jun 2021 11:50:18 -0600 Subject: NCT3807: Set up correct FRS enable The NCT3807 requires a few steps for FRS enablement. Specifically: - Zero out VBUS_SINK_DISCONNECT_THRESHOLD - Enable FRS interrupt (already done in TCPCI code) - Set FRS enable to 1 Note that it should not use the TCPCI specification method of clearing AutoDischargeDisconnect as soon as FRS is set. This results in the CC lines immediately reading as Open. BRANCH=None BUG=b:183586640,b:192012189 TEST=on guybrush C0, confirm FRS can execute successfully with WooHubs, HooToo, and Moshi Signed-off-by: Diana Z Change-Id: Ida0d33ae9ce4b8660615a0b9f3064cf90f5ae3bd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2987598 Reviewed-by: Denis Brockus --- include/driver/tcpm/tcpci.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/driver/tcpm/tcpci.h b/include/driver/tcpm/tcpci.h index 2bd9614123..cfe7513c31 100644 --- a/include/driver/tcpm/tcpci.h +++ b/include/driver/tcpm/tcpci.h @@ -232,7 +232,10 @@ #define TCPC_REG_TX_BUFFER 0x51 #define TCPC_REG_VBUS_VOLTAGE 0x70 + #define TCPC_REG_VBUS_SINK_DISCONNECT_THRESH 0x72 +#define TCPC_REG_VBUS_SINK_DISCONNECT_THRESH_DEFAULT 0x008C /* 3.5 V */ + #define TCPC_REG_VBUS_STOP_DISCHARGE_THRESH 0x74 #define TCPC_REG_VBUS_VOLTAGE_ALARM_HI_CFG 0x76 #define TCPC_REG_VBUS_VOLTAGE_ALARM_LO_CFG 0x78 -- cgit v1.2.1