diff options
-rw-r--r-- | zephyr/Kconfig.retimer | 4 | ||||
-rw-r--r-- | zephyr/Kconfig.usb_mux | 1 | ||||
-rw-r--r-- | zephyr/shim/src/bb_retimer_usb_mux.c | 8 | ||||
-rw-r--r-- | zephyr/shim/src/usb_muxes.c | 8 |
4 files changed, 5 insertions, 16 deletions
diff --git a/zephyr/Kconfig.retimer b/zephyr/Kconfig.retimer index 9ce134dc13..3a052f1f1a 100644 --- a/zephyr/Kconfig.retimer +++ b/zephyr/Kconfig.retimer @@ -6,6 +6,8 @@ if PLATFORM_EC_USBC config PLATFORM_EC_USBC_RETIMER_INTEL_BB bool "Support Intel Burnside Bridge retimer" + depends on PLATFORM_EC_USB_MUX + depends on DT_HAS_INTEL_JHL8040R_ENABLED select PLATFORM_EC_USB_PD_USB4 select PLATFORM_EC_USB_PD_TBT_COMPAT_MODE help @@ -29,6 +31,8 @@ config PLATFORM_EC_USBC_RETIMER_INTEL_BB config PLATFORM_EC_USBC_RETIMER_INTEL_HB bool "Support Intel Hayden Bridge retimer" + depends on PLATFORM_EC_USB_MUX + depends on DT_HAS_INTEL_JHL8040R_ENABLED select PLATFORM_EC_USB_PD_USB4 select PLATFORM_EC_USB_PD_TBT_COMPAT_MODE help diff --git a/zephyr/Kconfig.usb_mux b/zephyr/Kconfig.usb_mux index 6f4e31a2cf..376a28f9b2 100644 --- a/zephyr/Kconfig.usb_mux +++ b/zephyr/Kconfig.usb_mux @@ -7,6 +7,7 @@ if PLATFORM_EC_USBC menuconfig PLATFORM_EC_USB_MUX bool "USB muxes" default y + depends on DT_HAS_CROS_EC_USB_MUX_CHAIN_ENABLED help Enables support for USB muxes. These allow multiplexing diff --git a/zephyr/shim/src/bb_retimer_usb_mux.c b/zephyr/shim/src/bb_retimer_usb_mux.c index 2f45a5ee0f..b0e3944528 100644 --- a/zephyr/shim/src/bb_retimer_usb_mux.c +++ b/zephyr/shim/src/bb_retimer_usb_mux.c @@ -9,12 +9,6 @@ #include <zephyr/devicetree.h> #include <zephyr/sys/util_macro.h> -/** - * This prevents creating struct usb_mux bb_controls[] for platforms that didn't - * migrate USB mux configuration to DTS yet. - */ -#if DT_HAS_COMPAT_STATUS_OKAY(cros_ec_usb_mux_chain) - BB_RETIMER_CHECK_SAME_CONTROLS(BB_RETIMER_INSTANCES_LIST) /** @@ -36,5 +30,3 @@ BB_RETIMER_CHECK_SAME_CONTROLS(BB_RETIMER_INSTANCES_LIST) BB_CONTROLS_CONST struct bb_usb_control bb_controls[] = { USB_MUX_BB_RETIMERS_CONTROLS_ARRAY }; - -#endif /* #if DT_HAS_COMPAT_STATUS_OKAY(cros_ec_usb_mux_chain) */ diff --git a/zephyr/shim/src/usb_muxes.c b/zephyr/shim/src/usb_muxes.c index af86cec0cd..b3854e2ca8 100644 --- a/zephyr/shim/src/usb_muxes.c +++ b/zephyr/shim/src/usb_muxes.c @@ -10,12 +10,6 @@ #include <zephyr/sys/util_macro.h> /** - * This prevents creating struct usb_mux usb_muxes[] for platforms that didn't - * migrate USB mux configuration to DTS yet. - */ -#if DT_HAS_COMPAT_STATUS_OKAY(cros_ec_usb_mux_chain) - -/** * @brief Check if @p mux_id is not part of @p chain_id or if @p chain_id USBC * port is the same as @p mux_port. Result ends with && to construct * logical expression using FOREACH macro. @@ -96,5 +90,3 @@ BUILD_ASSERT(ARRAY_SIZE(usb_muxes) == CONFIG_USB_PD_PORT_MAX_COUNT); * MAYBE_CONST struct usb_mux USB_MUX_NODE_<node_id> = { ... }; */ USB_MUX_FOREACH_MUX(USB_MUX_DEFINE) - -#endif /* #if DT_HAS_COMPAT_STATUS_OKAY(cros_ec_usb_mux_chain) */ |