summaryrefslogtreecommitdiff
path: root/board/waddledoo/board.c
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2020-01-21 23:21:40 -0800
committerCommit Bot <commit-bot@chromium.org>2020-01-24 12:42:53 +0000
commit5b21ec1b453f114e892ffa8f972f50339d6ee3fc (patch)
tree54f1b93ddcbadec16549bfca98f33bcdf0e765ea /board/waddledoo/board.c
parente5605acefadc9517b0475b91685e9c2a1ced7c48 (diff)
downloadchrome-ec-5b21ec1b453f114e892ffa8f972f50339d6ee3fc.tar.gz
pi3usb3x532: Pack i2c port in port_addr
The PI3USB3X532 driver in the EC assumes that all superspeed muxes are on the same i2c bus, I2C_PORT_USB_MUX. However, that may not be true for some boards. This commit utilizes the MUX_PORT(...) macro to determine the i2c port to use from the usb_mux table. The boards that use this driver have been updated to pack the i2c port in the port_addr member. There should be no functional changes to those boards. BUG=b:147689445 BRANCH=None TEST=`make -j buildall` Change-Id: If6460b84a5e39610d658f06a42ca1db0bd4da048 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2013658 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/waddledoo/board.c')
-rw-r--r--board/waddledoo/board.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/board/waddledoo/board.c b/board/waddledoo/board.c
index 711b0dccf3..a4ba81d3ec 100644
--- a/board/waddledoo/board.c
+++ b/board/waddledoo/board.c
@@ -309,11 +309,13 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = {
{
- .port_addr = MUX_PORT_AND_ADDR(I2C_PORT_USB_C0, 0x54),
+ .port_addr = MUX_PORT_AND_ADDR(I2C_PORT_USB_C0,
+ PI3USB3X532_I2C_ADDR0),
.driver = &pi3usb3x532_usb_mux_driver,
},
{
- .port_addr = MUX_PORT_AND_ADDR(I2C_PORT_SUB_USB_C1, 0x54),
+ .port_addr = MUX_PORT_AND_ADDR(I2C_PORT_SUB_USB_C1,
+ PI3USB3X532_I2C_ADDR0),
.driver = &pi3usb3x532_usb_mux_driver,
}
};