summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/ezkinil/board.c14
-rw-r--r--driver/usb_mux/ps8743.c6
-rw-r--r--driver/usb_mux/ps8743.h16
3 files changed, 16 insertions, 20 deletions
diff --git a/board/ezkinil/board.c b/board/ezkinil/board.c
index 8859701416..5ff02886fd 100644
--- a/board/ezkinil/board.c
+++ b/board/ezkinil/board.c
@@ -276,15 +276,11 @@ static int board_ps8743_mux_set(const struct usb_mux *me,
rv = ps8743_read(me, PS8743_REG_MODE, &reg);
if (rv)
return rv;
- /*
- * TODO(b:152736880) Due to Ezkinil doesn't have FLIP_PIN and
- * CE_DP_PIN, we need set 1 to this two BIT, but the name of
- * these two bits are confusing. Need fix the name in other patch.
- */
- /* Disable FLIP pin detect since ezkinil don't have FLIP. */
- reg |= PS8743_MODE_FLIP_PIN_ENABLED;
- /* Disable CE_DP pin detect, since ezkinil don't have CE_DP. */
- reg |= PS8743_MODE_CE_DP_ENABLED;
+
+ /* Disable FLIP pin, enable I2C control. */
+ reg |= PS8743_MODE_FLIP_REG_CONTROL;
+ /* Disable CE_DP pin, enable I2C control. */
+ reg |= PS8743_MODE_DP_REG_CONTROL;
/* DP specific config */
if (mux_state & USB_PD_MUX_DP_ENABLED) {
diff --git a/driver/usb_mux/ps8743.c b/driver/usb_mux/ps8743.c
index c44a2f9c89..413b37e322 100644
--- a/driver/usb_mux/ps8743.c
+++ b/driver/usb_mux/ps8743.c
@@ -77,11 +77,11 @@ static int ps8743_set_mux(const struct usb_mux *me, mux_state_t mux_state)
uint8_t reg = 0;
if (mux_state & USB_PD_MUX_USB_ENABLED)
- reg |= PS8743_MODE_USB_ENABLED;
+ reg |= PS8743_MODE_USB_ENABLE;
if (mux_state & USB_PD_MUX_DP_ENABLED)
- reg |= PS8743_MODE_DP_ENABLED;
+ reg |= PS8743_MODE_DP_ENABLE;
if (mux_state & USB_PD_MUX_POLARITY_INVERTED)
- reg |= PS8743_MODE_POLARITY_INVERTED;
+ reg |= PS8743_MODE_FLIP_ENABLE;
return ps8743_write(me, PS8743_REG_MODE, reg);
}
diff --git a/driver/usb_mux/ps8743.h b/driver/usb_mux/ps8743.h
index b728e49523..23e5c363e5 100644
--- a/driver/usb_mux/ps8743.h
+++ b/driver/usb_mux/ps8743.h
@@ -17,15 +17,15 @@
/* Mode register for setting mux */
#define PS8743_REG_MODE 0x00
-#define PS8743_MODE_POLARITY_INVERTED BIT(2)
-#define PS8743_MODE_FLIP_PIN_ENABLED BIT(3)
-#define PS8743_MODE_USB_ENABLED BIT(4)
-#define PS8743_MODE_CE_USB_ENABLED BIT(5)
-#define PS8743_MODE_DP_ENABLED BIT(6)
-#define PS8743_MODE_CE_DP_ENABLED BIT(7)
+#define PS8743_MODE_FLIP_ENABLE BIT(2)
+#define PS8743_MODE_FLIP_REG_CONTROL BIT(3)
+#define PS8743_MODE_USB_ENABLE BIT(4)
+#define PS8743_MODE_USB_REG_CONTROL BIT(5)
+#define PS8743_MODE_DP_ENABLE BIT(6)
+#define PS8743_MODE_DP_REG_CONTROL BIT(7)
/* To reset the state machine to default */
-#define PS8743_MODE_POWER_DOWN (PS8743_MODE_CE_USB_ENABLED | \
- PS8743_MODE_CE_DP_ENABLED)
+#define PS8743_MODE_POWER_DOWN (PS8743_MODE_USB_REG_CONTROL | \
+ PS8743_MODE_DP_REG_CONTROL)
/* Status register for checking mux state */
#define PS8743_REG_STATUS 0x09