diff options
Diffstat (limited to 'board')
-rw-r--r-- | board/berknip/board.c | 13 | ||||
-rw-r--r-- | board/morphius/board.c | 6 | ||||
-rw-r--r-- | board/trembyle/board.c | 2 | ||||
-rw-r--r-- | board/woomax/board.c | 2 |
4 files changed, 18 insertions, 5 deletions
diff --git a/board/berknip/board.c b/board/berknip/board.c index bd61e383dc..8f797d9539 100644 --- a/board/berknip/board.c +++ b/board/berknip/board.c @@ -285,10 +285,10 @@ static int board_tusb544_mux_set(const struct usb_mux *me, { if (mux_state & USB_PD_MUX_DP_ENABLED) { /* Enable IN_HPD on the DB */ - ioex_set_level(IOEX_USB_C1_HPD_IN_DB, 1); + ioex_set_level(board_usbc1_retimer_inhpd, 1); } else { /* Disable IN_HPD on the DB */ - ioex_set_level(IOEX_USB_C1_HPD_IN_DB, 0); + ioex_set_level(board_usbc1_retimer_inhpd, 0); } return EC_SUCCESS; } @@ -298,10 +298,10 @@ static int board_ps8743_mux_set(const struct usb_mux *me, { if (mux_state & USB_PD_MUX_DP_ENABLED) /* Enable IN_HPD on the DB */ - ioex_set_level(IOEX_USB_C1_HPD_IN_DB, 1); + ioex_set_level(board_usbc1_retimer_inhpd, 1); else /* Disable IN_HPD on the DB */ - ioex_set_level(IOEX_USB_C1_HPD_IN_DB, 0); + ioex_set_level(board_usbc1_retimer_inhpd, 0); return EC_SUCCESS; } @@ -326,6 +326,7 @@ const struct usb_mux usbc1_ps8743 = { */ enum gpio_signal GPIO_S0_PGOOD = GPIO_S0_PWROK_OD_V0; static uint32_t board_ver; +int board_usbc1_retimer_inhpd = GPIO_USB_C1_HPD_IN_DB_V1; static void board_version_check(void) { @@ -353,7 +354,9 @@ static void board_remap_gpio(void) * hardware is retired and no longer needed */ gpio_set_flags(GPIO_USB_C1_HPD_IN_DB_V1, GPIO_OUT_LOW); - } + board_usbc1_retimer_inhpd = GPIO_USB_C1_HPD_IN_DB_V1; + } else + board_usbc1_retimer_inhpd = IOEX_USB_C1_HPD_IN_DB; } static void setup_fw_config(void) diff --git a/board/morphius/board.c b/board/morphius/board.c index 0b8893957f..8dca1c99ed 100644 --- a/board/morphius/board.c +++ b/board/morphius/board.c @@ -271,6 +271,7 @@ BUILD_ASSERT(ARRAY_SIZE(usb_muxes) == USBC_PORT_COUNT); */ static uint32_t board_ver; enum gpio_signal gpio_ec_ps2_reset = GPIO_EC_PS2_RESET_V1; +int board_usbc1_retimer_inhpd = GPIO_USB_C1_HPD_IN_DB_V1; static void setup_v0_charger(void) { @@ -348,6 +349,11 @@ static void board_remap_gpio(void) ioex_enable_interrupt(IOEX_HDMI_CONN_HPD_3V3_DB); } + if (board_ver >= 4) + board_usbc1_retimer_inhpd = GPIO_USB_C1_HPD_IN_DB_V1; + else + board_usbc1_retimer_inhpd = IOEX_USB_C1_HPD_IN_DB; + ioex_get_level(IOEX_PPC_ID, &ppc_id); support_aoz_ppc = (board_ver == 3) || ((board_ver >= 4) && !ppc_id); diff --git a/board/trembyle/board.c b/board/trembyle/board.c index 10247219df..bcf1cc926c 100644 --- a/board/trembyle/board.c +++ b/board/trembyle/board.c @@ -329,6 +329,8 @@ BUILD_ASSERT(ARRAY_SIZE(usb_muxes) == USBC_PORT_COUNT); * Use FW_CONFIG to set correct configuration. */ +int board_usbc1_retimer_inhpd = IOEX_USB_C1_HPD_IN_DB; + static void setup_v0_charger(void) { chg_chips[0].i2c_port = I2C_PORT_CHARGER_V0; diff --git a/board/woomax/board.c b/board/woomax/board.c index 8b03905b44..f439bddda1 100644 --- a/board/woomax/board.c +++ b/board/woomax/board.c @@ -334,6 +334,8 @@ BUILD_ASSERT(ARRAY_SIZE(usb_muxes) == USBC_PORT_COUNT); * Use FW_CONFIG to set correct configuration. */ +int board_usbc1_retimer_inhpd = IOEX_USB_C1_HPD_IN_DB; + static void setup_fw_config(void) { /* Enable Gyro interrupts */ |