summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorRob Barnes <robbarnes@google.com>2021-04-27 06:44:55 -0600
committerCommit Bot <commit-bot@chromium.org>2021-04-27 22:42:35 +0000
commitda02ed5aace26a2abe545daaede8a18a100cc197 (patch)
treea33a181896aeb2e84048edb6f08d824f9ad0a2b8 /board
parentda8382de9741fad4af44dda39e59ec232f1ea66c (diff)
downloadchrome-ec-da02ed5aace26a2abe545daaede8a18a100cc197.tar.gz
ANX7451: Set upstream AUX FLIP
AUX flip control must be enabled. Otherwise alternate mode will not work on ANX7451 when cable is flipped. The USB registers use a separate i2c address that must be dynamically configured. Since there may be multiple ANX74** parts on a board, this address must be dynamically configured using a board callback. BUG=b:185276137 TEST=Display works when cable is flipped on B2 BRANCH=None Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: I144131b2f53985d97e0be960e202366f726dd90b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2854120 Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/guybrush/board.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/board/guybrush/board.c b/board/guybrush/board.c
index 85861a9995..75ffa3d183 100644
--- a/board/guybrush/board.c
+++ b/board/guybrush/board.c
@@ -165,6 +165,17 @@ __override int board_c1_ps8818_mux_set(const struct usb_mux *me,
return rv;
}
+/*
+ * ANX7491(A1) and ANX7451(C1) are on the same i2c bus. Both default
+ * to 0x29 for the USB i2c address. This moves ANX7451(C1) USB i2c
+ * address to 0x2A. ANX7491(A1) will stay at the default 0x29.
+ */
+uint16_t board_anx7451_get_usb_i2c_addr(const struct usb_mux *me)
+{
+ ASSERT(me->usb_port == USBC_PORT_C1);
+ return 0x2a;
+}
+
void motion_interrupt(enum gpio_signal signal)
{
switch (signal) {