summaryrefslogtreecommitdiff
path: root/include/config.h
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2019-08-01 09:09:10 -0700
committerCommit Bot <commit-bot@chromium.org>2019-09-10 09:24:36 +0000
commitc32c1ae24c398679edae807f9c1620eb91377003 (patch)
treef284f214e47729345cdd2d9c25add31a7449e7a0 /include/config.h
parent16ce272e65cae34ad1b0ad3e8a301e6e307ed49c (diff)
downloadchrome-ec-c32c1ae24c398679edae807f9c1620eb91377003.tar.gz
pd: USB Power Delivery State Machine based on Revision 3.0 of the spec.
Adds Power Delivery to the TypeC state machine as detailed in Revision 3.0, Version 1.2 of the specification. This CL passes the PD2.0 compliance tests and has been tested on several devices. Some areas such as handling Electronically Marked Cable information, creation of PIDs, and Host commands will be addressed in later CLs. BUG=b:130895206 BRANCH=none TEST=manual Port 0 on Hatch was used to run this CL, merged with PD functionality, on the PD2.0 Compliance tester. All tests pass except for a few physical layer tests. The test report has been added to the bug. Atlas was verified to work with Apple, Amazon, StarTech, MKDGO and several other generic docks. Atlas was verified to work with Google's and Apple's CTVPD. Signed-off-by: Sam Hurst <shurst@chromium.org> Change-Id: Ia5e1988b0d81ec4cf9a7175e273197bd5a0865e4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1737899 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Tested-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'include/config.h')
-rw-r--r--include/config.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index 8b4e67420b..81de017ae3 100644
--- a/include/config.h
+++ b/include/config.h
@@ -4918,4 +4918,22 @@
#endif
#endif /* CONFIG_ACCEL_FIFO */
+/*
+ * If USB PD Discharge is enabled, verify that CONFIG_USB_PD_DISCHARGE_GPIO
+ * and CONFIG_USB_PD_PORT_COUNT, CONFIG_USB_PD_DISCHARGE_TCPC, or
+ * CONFIG_USB_PD_DISCHARGE_PPC is defined.
+ */
+#ifdef CONFIG_USB_PD_DISCHARGE
+#ifdef CONFIG_USB_PD_DISCHARGE_GPIO
+#if !defined(CONFIG_USB_PD_PORT_COUNT)
+#error "PD discharge port not defined"
+#endif
+#else
+#if !defined(CONFIG_USB_PD_DISCHARGE_TCPC) && \
+ !defined(CONFIG_USB_PD_DISCHARGE_PPC)
+#error "PD discharge implementation not defined"
+#endif
+#endif /* CONFIG_USB_PD_DISCHARGE_GPIO */
+#endif /* CONFIG_USB_PD_DISCHARGE */
+
#endif /* __CROS_EC_CONFIG_H */