summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Michalec <tm@semihalf.com>2022-09-05 19:18:51 +0200
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-09-13 11:19:34 +0000
commitcaf5990c7b6955672459bf84bf54e499bdacc66f (patch)
tree168c6c73d3514e875e7a6bcf97a3ef80a7eaf4a8
parent7ada57a3e1836ee8c81e0a829ce8f78a6c2f36fa (diff)
downloadchrome-ec-caf5990c7b6955672459bf84bf54e499bdacc66f.tar.gz
zephyr: Add alternative usb_mux_chain config for corsola
Add alternative USB mux configuration in DTS for corsola. LOW_COVERAGE_REASON=missing PS8743 emulator to introduce kingler baseboard_x_ec_gpio2_init test BUG=b:234482311 TEST=zmake build -a BRANCH=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I82e8bbf7da49ba927eb2dfc151db046f5c88cb77 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3875324 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com>
-rw-r--r--zephyr/projects/corsola/src/usbc_config.c9
-rw-r--r--zephyr/projects/corsola/usbc_kingler.dts5
-rw-r--r--zephyr/projects/corsola/usbc_krabby.dts5
-rw-r--r--zephyr/projects/corsola/usbc_magikarp.dts5
-rw-r--r--zephyr/projects/corsola/usbc_tentacruel.dts5
5 files changed, 22 insertions, 7 deletions
diff --git a/zephyr/projects/corsola/src/usbc_config.c b/zephyr/projects/corsola/src/usbc_config.c
index 3b8bc07917..daf3e5a5cc 100644
--- a/zephyr/projects/corsola/src/usbc_config.c
+++ b/zephyr/projects/corsola/src/usbc_config.c
@@ -32,6 +32,7 @@
#include "usb_mux.h"
#include "usb_pd_tcpm.h"
#include "usb_tc_sm.h"
+#include "usbc/usb_muxes.h"
#include "usbc_ppc.h"
#include "variant_db_detection.h"
@@ -255,11 +256,6 @@ static void baseboard_x_ec_gpio2_init(void)
static struct ppc_drv virtual_ppc_drv = { 0 };
static struct tcpm_drv virtual_tcpc_drv = { 0 };
static struct bc12_drv virtual_bc12_drv = { 0 };
- static const struct usb_mux virtual_usb_mux = {
- .usb_port = USBC_PORT_C1,
- .driver = &virtual_usb_mux_driver,
- .hpd_update = &virtual_hpd_update,
- };
/* no sub board */
if (corsola_get_db_type() == CORSOLA_DB_NONE) {
@@ -291,8 +287,7 @@ static void baseboard_x_ec_gpio2_init(void)
bc12_ports[USBC_PORT_C1] =
(const struct bc12_config){ .drv = &virtual_bc12_drv };
/* Use virtual mux to notify AP the mainlink direction. */
- usb_muxes[USBC_PORT_C1].mux = &virtual_usb_mux;
- usb_muxes[USBC_PORT_C1].next = NULL;
+ USB_MUX_ENABLE_ALTERNATIVE(usb_mux_chain_1_hdmi_db);
/*
* If a HDMI DB is attached, C1 port tasks will be exiting in that
diff --git a/zephyr/projects/corsola/usbc_kingler.dts b/zephyr/projects/corsola/usbc_kingler.dts
index eb27d7d272..18bc6ce303 100644
--- a/zephyr/projects/corsola/usbc_kingler.dts
+++ b/zephyr/projects/corsola/usbc_kingler.dts
@@ -40,6 +40,11 @@
compatible = "cros-ec,usb-mux-chain";
usb-muxes = <&ps8743_mux_1 &virtual_mux_1>;
};
+ usb_mux_chain_1_hdmi_db: usb-mux-chain-1-hdmi-db {
+ compatible = "cros-ec,usb-mux-chain";
+ alternative-chain;
+ usb-muxes = <&virtual_mux_1>;
+ };
};
port1-muxes {
diff --git a/zephyr/projects/corsola/usbc_krabby.dts b/zephyr/projects/corsola/usbc_krabby.dts
index 8437e8e236..a72864da35 100644
--- a/zephyr/projects/corsola/usbc_krabby.dts
+++ b/zephyr/projects/corsola/usbc_krabby.dts
@@ -36,6 +36,11 @@
compatible = "cros-ec,usb-mux-chain";
usb-muxes = <&tusb1064_mux_1 &virtual_mux_1>;
};
+ usb_mux_chain_1_hdmi_db: usb-mux-chain-1-hdmi-db {
+ compatible = "cros-ec,usb-mux-chain";
+ alternative-chain;
+ usb-muxes = <&virtual_mux_1>;
+ };
};
port1-muxes {
virtual_mux_1: virtual-mux-1 {
diff --git a/zephyr/projects/corsola/usbc_magikarp.dts b/zephyr/projects/corsola/usbc_magikarp.dts
index d3069beca0..0e0473cd86 100644
--- a/zephyr/projects/corsola/usbc_magikarp.dts
+++ b/zephyr/projects/corsola/usbc_magikarp.dts
@@ -36,6 +36,11 @@
compatible = "cros-ec,usb-mux-chain";
usb-muxes = <&ps8743_mux_1 &virtual_mux_1>;
};
+ usb_mux_chain_1_hdmi_db: usb-mux-chain-1-hdmi-db {
+ compatible = "cros-ec,usb-mux-chain";
+ alternative-chain;
+ usb-muxes = <&virtual_mux_1>;
+ };
};
port1-muxes {
virtual_mux_1: virtual-mux-1 {
diff --git a/zephyr/projects/corsola/usbc_tentacruel.dts b/zephyr/projects/corsola/usbc_tentacruel.dts
index d3069beca0..0e0473cd86 100644
--- a/zephyr/projects/corsola/usbc_tentacruel.dts
+++ b/zephyr/projects/corsola/usbc_tentacruel.dts
@@ -36,6 +36,11 @@
compatible = "cros-ec,usb-mux-chain";
usb-muxes = <&ps8743_mux_1 &virtual_mux_1>;
};
+ usb_mux_chain_1_hdmi_db: usb-mux-chain-1-hdmi-db {
+ compatible = "cros-ec,usb-mux-chain";
+ alternative-chain;
+ usb-muxes = <&virtual_mux_1>;
+ };
};
port1-muxes {
virtual_mux_1: virtual-mux-1 {