summaryrefslogtreecommitdiff
path: root/board/berknip
diff options
context:
space:
mode:
authorEdward Hill <ecgh@chromium.org>2020-09-23 14:14:48 -0600
committerCommit Bot <commit-bot@chromium.org>2020-09-23 23:38:53 +0000
commit54e4cbf51dd64f74d30a330ec5eb5df12c5c5948 (patch)
treed0448d1d28e43f35cadf1697128d8d4259e89005 /board/berknip
parente6cc0576f2829357ccf349896fb1536300f22f0f (diff)
downloadchrome-ec-54e4cbf51dd64f74d30a330ec5eb5df12c5c5948.tar.gz
zork: Update PS8802/PS8818 IN_HPD to match HW changes
Add a global variable board_usbc1_retimer_inhpd that boards can set to IOEX_USB_C1_HPD_IN_DB or GPIO_USB_C1_HPD_IN_DB_V1 depending on board version, that is then used by board_ps8802/ps881_mux_set to enable/disable IN_HPD on the DB retimer. BUG=b:168884674 BRANCH=zork TEST=morphius dali + picasso USB-C1 display works Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Ifca733ce05a72cc095463b2b9365857232784d34 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2426959 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'board/berknip')
-rw-r--r--board/berknip/board.c13
1 files changed, 8 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)