summaryrefslogtreecommitdiff
path: root/zephyr
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2021-07-09 14:40:04 -0600
committerCommit Bot <commit-bot@chromium.org>2021-07-12 15:42:04 +0000
commit8b81257ffd943e6ad301b647ef31338df13433b5 (patch)
treed4df702dfea7885bb21ac6ac6bbfa15c2fcb991c /zephyr
parentc8c4df352b969b736faa411a75dbbfd96c5824f7 (diff)
downloadchrome-ec-8b81257ffd943e6ad301b647ef31338df13433b5.tar.gz
zephyr: add support for CONFIG_USBC_PPC_SYV682X_SMART_DISCHARGE
Add Kconfig option to enable the CONFIG_USBC_PPC_SYV682X_SMART_DISCHARGE option on the SYV682x PPC. BUG=b:193195946 BRANCH=none TEST=zmake testall TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I5530951f75e2d4b64756858b9799c7978be44ba3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3015868 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
Diffstat (limited to 'zephyr')
-rw-r--r--zephyr/Kconfig.usbc16
-rw-r--r--zephyr/shim/include/config_chip.h5
2 files changed, 17 insertions, 4 deletions
diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc
index b2d48396fc..e40eba1140 100644
--- a/zephyr/Kconfig.usbc
+++ b/zephyr/Kconfig.usbc
@@ -809,10 +809,18 @@ config PLATFORM_EC_USBC_PPC_SYV682C
config PLATFORM_EC_USBC_PPC_SYV682X_NO_CC
bool "SYV682X does not pass through CC"
help
- Enable this if a SYV682X does not pass through CC.
- There is a 3.6V limit on the HOST_CC signals, so the TCPC
- should not source 5V VCONN. This config determines if
- sourcing VCONN should be enabled by default.
+ Enable this if a SYV682X does not pass through CC.
+ There is a 3.6V limit on the HOST_CC signals, so the TCPC
+ should not source 5V VCONN. This config determines if
+ sourcing VCONN should be enabled by default.
+
+config PLATFORM_EC_USBC_PPC_SYV682X_SMART_DISCHARGE
+ bool "Enable smart discharge on the SYV682X PPC"
+ help
+ Enable the smart discharge feature on VBUS provided by the SYV682x
+ PPC. This should be enabled for revision C and above of the SYV682X.
+ Earlier revisions of the chip block I2C transactions during smart
+ discharge, causing USB PD compliance issues.
config PLATFORM_EC_USBC_PPC_DEDICATED_INT
bool "Power Power Controller has a dedicated interrupt pin"
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index d1c8672092..89f2ad4d52 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -974,6 +974,11 @@
#define CONFIG_USBC_PPC_SYV682X_NO_CC
#endif
+#undef CONFIG_USBC_PPC_SYV682X_SMART_DISCHARGE
+#ifdef CONFIG_PLATFORM_EC_USBC_PPC_SYV682X_SMART_DISCHARGE
+#define CONFIG_USBC_PPC_SYV682X_SMART_DISCHARGE
+#endif
+
#undef CONFIG_USB_PD_TCPC_RUNTIME_CONFIG
#undef CONFIG_USB_MUX_RUNTIME_CONFIG
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPC_RUNTIME_CONFIG