summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/servo_v4p1/board.c2
-rw-r--r--driver/usb_mux/tusb1064.h25
2 files changed, 25 insertions, 2 deletions
diff --git a/board/servo_v4p1/board.c b/board/servo_v4p1/board.c
index 837891794b..481b2ac16e 100644
--- a/board/servo_v4p1/board.c
+++ b/board/servo_v4p1/board.c
@@ -71,7 +71,7 @@ const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = {
[DUT] = { /* DUT port with UFP mux */
.usb_port = DUT,
.i2c_port = I2C_PORT_MASTER,
- .i2c_addr_flags = TUSB1064_ADDR_FLAGS,
+ .i2c_addr_flags = TUSB1064_I2C_ADDR10_FLAGS,
.driver = &tusb1064_usb_mux_driver,
}
};
diff --git a/driver/usb_mux/tusb1064.h b/driver/usb_mux/tusb1064.h
index 9f5873d8ab..e860cc539a 100644
--- a/driver/usb_mux/tusb1064.h
+++ b/driver/usb_mux/tusb1064.h
@@ -9,7 +9,30 @@
#include <stdint.h>
#include "usb_mux.h"
-#define TUSB1064_ADDR_FLAGS 0x12
+/*
+ * TUSB1064 Has 16 possible device addresses which are selected by A1|A0 lines
+ * using 4 level inputs.
+ * 0 -> tied directly to GND
+ * R -> tied to GND via a 20k pulldown
+ * F -> floating
+ * 1 -> tied to VCC
+ */
+#define TUSB1064_I2C_ADDR0_FLAGS 0x44
+#define TUSB1064_I2C_ADDR1_FLAGS 0x45
+#define TUSB1064_I2C_ADDR2_FLAGS 0x46
+#define TUSB1064_I2C_ADDR3_FLAGS 0x47
+#define TUSB1064_I2C_ADDR4_FLAGS 0x20
+#define TUSB1064_I2C_ADDR5_FLAGS 0x21
+#define TUSB1064_I2C_ADDR6_FLAGS 0x22
+#define TUSB1064_I2C_ADDR7_FLAGS 0x23
+#define TUSB1064_I2C_ADDR8_FLAGS 0x10
+#define TUSB1064_I2C_ADDR9_FLAGS 0x11
+#define TUSB1064_I2C_ADDR10_FLAGS 0x12
+#define TUSB1064_I2C_ADDR11_FLAGS 0x13
+#define TUSB1064_I2C_ADDR12_FLAGS 0x0C
+#define TUSB1064_I2C_ADDR13_FLAGS 0x0D
+#define TUSB1064_I2C_ADDR14_FLAGS 0x0E
+#define TUSB1064_I2C_ADDR15_FLAGS 0x0F
/* TUSB1064 General Register */
#define TUSB1064_REG_GENERAL 0x0a