summaryrefslogtreecommitdiff
path: root/board/kukui
diff options
context:
space:
mode:
authorDenis Brockus <dbrockus@chromium.org>2020-02-21 14:21:05 -0700
committerCommit Bot <commit-bot@chromium.org>2020-02-28 22:47:11 +0000
commit9c194fd057558a1dfadee419e92aca31953a86fc (patch)
tree001ae7c162a4152312a180574ae58e19a3763eb8 /board/kukui
parentab35b456ad8c52f336ea793b17155cfc796c4e44 (diff)
downloadchrome-ec-9c194fd057558a1dfadee419e92aca31953a86fc.tar.gz
usb_mux: retimer: mux as chained mux and retimer
This makes retimers appear as generic muxes. By allowing a chain of muxes they can be stacked up to the new configurations that zork requires and will continue to work as they did before on configurations that only have a single mux. The code used to have two different arrays, 1) muxes and 2) retimers. On one of the zork configurations the processor MUX stopped being the primary mux and the retimer took its place. In a different configuration of that same platform it left the primary and secondary alone but the mux_set FLIP operation had to be ignored. Since the same interfaces needed to be available for both it stopped making sense to have two different structures and two different methods of handling them. This consolodates the two into one. The platforms that do not have retimers, this change will not make any difference. For platforms like zork, it will remove the retimers and make them chained muxes. So testing on trembyle makes sense to verify, BUG=b:147593660 BRANCH=none TEST=verify USB still works on trembyle Change-Id: I286cf1e302f9bd3dd7e81098ec08514a2a009fe3 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2066794 Commit-Queue: Jett Rink <jettrink@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'board/kukui')
-rw-r--r--board/kukui/board.c7
-rw-r--r--board/kukui/board.h1
2 files changed, 6 insertions, 2 deletions
diff --git a/board/kukui/board.c b/board/kukui/board.c
index 91b989aec8..5476030130 100644
--- a/board/kukui/board.c
+++ b/board/kukui/board.c
@@ -119,7 +119,8 @@ void board_set_dp_mux_control(int output_enable, int polarity)
gpio_set_level(GPIO_USB_C0_DP_POLARITY, polarity);
}
-static void board_hpd_update(int port, int hpd_lvl, int hpd_irq)
+static void board_hpd_update(const struct usb_mux *me,
+ int hpd_lvl, int hpd_irq)
{
/*
* svdm_dp_attention() did most of the work, we only need to notify
@@ -144,7 +145,9 @@ __override const struct rt946x_init_setting *board_rt946x_init_setting(void)
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = {
{
- .port_addr = IT5205_I2C_ADDR1_FLAGS,
+ .usb_port = 0,
+ .i2c_port = I2C_PORT_USB_MUX,
+ .i2c_addr_flags = IT5205_I2C_ADDR1_FLAGS,
.driver = &it5205_usb_mux_driver,
.hpd_update = &board_hpd_update,
},
diff --git a/board/kukui/board.h b/board/kukui/board.h
index 9b299bc02a..2057ab191a 100644
--- a/board/kukui/board.h
+++ b/board/kukui/board.h
@@ -28,6 +28,7 @@
#define CONFIG_USB_MUX_IT5205
#define CONFIG_USB_MUX_VIRTUAL
#define CONFIG_VOLUME_BUTTONS
+#define CONFIG_USB_MUX_RUNTIME_CONFIG
/* Battery */
#ifdef BOARD_KRANE