summaryrefslogtreecommitdiff
path: root/zephyr/shim/include/config_chip.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-06-04 16:12:52 -0600
committerCommit Bot <commit-bot@chromium.org>2021-06-15 18:38:40 +0000
commit1f7dd8283ca3a0c11af78fd711829b4a581ed166 (patch)
tree5e004761e10419c3abd2e5f9b7b94a7c55c86e44 /zephyr/shim/include/config_chip.h
parent81e819908e1da88b0cb432f594e353e92f0b886c (diff)
downloadchrome-ec-1f7dd8283ca3a0c11af78fd711829b4a581ed166.tar.gz
zephyr: Complete Kconfig support for ITE TCPM
Move PLATFORM_EC_USB_PD_TCPM_ITE_ON_CHIP down with the other TCPM options so that everything is together. Add an option to set the active port count. For now, hard-code the chip's USB PHY count. We don't seem to have access to that information from the zephyr side at present. BUG=b:189855648 BRANCH=none TEST=with other CLs, build asurada for Zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I8fd3c5c160f4baa74089730bad0371a01021c9f0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941889 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'zephyr/shim/include/config_chip.h')
-rw-r--r--zephyr/shim/include/config_chip.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 92bc110cf1..c7bb224d5d 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -915,6 +915,9 @@
#undef CONFIG_USB_PD_TCPM_ITE_ON_CHIP
#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_ITE_ON_CHIP
#define CONFIG_USB_PD_TCPM_ITE_ON_CHIP
+
+/* TODO(b:189855648): hard-code a few things here; move to zephyr? */
+#define IT83XX_USBPD_PHY_PORT_COUNT 2
#endif
#undef CONFIG_USB_PD_TCPM_DRIVER_IT8XXX2
@@ -932,6 +935,12 @@
#define CONFIG_USB_PD_PORT_MAX_COUNT CONFIG_PLATFORM_EC_USB_PD_PORT_MAX_COUNT
#endif
+#undef CONFIG_USB_PD_ITE_ACTIVE_PORT_COUNT
+#ifdef CONFIG_PLATFORM_EC_USB_PD_ITE_ACTIVE_PORT_COUNT
+#define CONFIG_USB_PD_ITE_ACTIVE_PORT_COUNT \
+ CONFIG_PLATFORM_EC_USB_PD_ITE_ACTIVE_PORT_COUNT
+#endif
+
#undef CONFIG_USBC_PPC
#ifdef CONFIG_PLATFORM_EC_USBC_PPC
#define CONFIG_USBC_PPC