summaryrefslogtreecommitdiff
path: root/zephyr/test/vboot_efs2
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2022-11-10 15:15:59 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-11-11 19:42:30 +0000
commit50ca1e0aa37d48ea42e96591a0dc41abd5526b5a (patch)
treee0a9e5bc86725b5ddaf125cbabf277e568aff08a /zephyr/test/vboot_efs2
parent6acfadf0df547a86b1dfddb3f5487d606774be6a (diff)
downloadchrome-ec-50ca1e0aa37d48ea42e96591a0dc41abd5526b5a.tar.gz
test: usb_mux: use devicetrees
Update the tests to use the "cros-ec,usb-mux-chain" to specify the USB muxes under test instead of hard coding via stubs. BUG=b:239457738 BRANCH=none TEST=twister Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I5a5acaf0b3815558454d4ec886e1058e4ccf36ea Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4023767 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Yuval Peress <peress@google.com>
Diffstat (limited to 'zephyr/test/vboot_efs2')
-rw-r--r--zephyr/test/vboot_efs2/boards/native_posix.overlay9
-rw-r--r--zephyr/test/vboot_efs2/src/main.c11
2 files changed, 9 insertions, 11 deletions
diff --git a/zephyr/test/vboot_efs2/boards/native_posix.overlay b/zephyr/test/vboot_efs2/boards/native_posix.overlay
index ced94c28b1..d6b008c69d 100644
--- a/zephyr/test/vboot_efs2/boards/native_posix.overlay
+++ b/zephyr/test/vboot_efs2/boards/native_posix.overlay
@@ -61,6 +61,15 @@
reg = <0>;
chg = <&isl923x_emul>;
tcpc = <&tcpci_emul>;
+ usb-mux-chain-1 {
+ compatible = "cros-ec,usb-mux-chain";
+ usb-muxes = <&tcpci_mux_c0>;
+ };
+ };
+ port0-muxes {
+ tcpci_mux_c0: tcpci-mux-c0 {
+ compatible = "cros-ec,usbc-mux-tcpci";
+ };
};
};
i2c2: i2c@500 {
diff --git a/zephyr/test/vboot_efs2/src/main.c b/zephyr/test/vboot_efs2/src/main.c
index 1558fb75f0..f757030489 100644
--- a/zephyr/test/vboot_efs2/src/main.c
+++ b/zephyr/test/vboot_efs2/src/main.c
@@ -401,17 +401,6 @@ const struct pi3usb9201_config_t pi3usb9201_bc12_chips[] = {
},
};
-struct usb_mux_chain usb_muxes[] = {
- [USBC_PORT_C0] = {
- .mux = &(struct usb_mux) {
- .usb_port = USBC_PORT_C0,
- .driver = &tcpci_tcpm_usb_mux_driver,
- .i2c_port = I2C_PORT_USB_C0,
- .i2c_addr_flags = DT_REG_ADDR(DT_NODELABEL(tcpci_emul)),
- },
- },
-};
-
/* USBC PPC configuration */
struct ppc_config_t ppc_chips[] = {
[USBC_PORT_C0] = {