summaryrefslogtreecommitdiff
path: root/baseboard
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 /baseboard
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 'baseboard')
-rw-r--r--baseboard/zork/baseboard.h3
-rw-r--r--baseboard/zork/variant_trembyle.c8
2 files changed, 7 insertions, 4 deletions
diff --git a/baseboard/zork/baseboard.h b/baseboard/zork/baseboard.h
index eaaf390ce4..ddbde2604f 100644
--- a/baseboard/zork/baseboard.h
+++ b/baseboard/zork/baseboard.h
@@ -345,6 +345,9 @@ __override_proto void ppc_interrupt(enum gpio_signal signal);
void board_print_temps(void);
+/* GPIO or IOEX signal used to set IN_HPD on DB retimer. */
+extern int board_usbc1_retimer_inhpd;
+
#endif /* !__ASSEMBLER__ */
#endif /* __CROS_EC_BASEBOARD_H */
diff --git a/baseboard/zork/variant_trembyle.c b/baseboard/zork/variant_trembyle.c
index 669ed5f6b7..32151cf0f9 100644
--- a/baseboard/zork/variant_trembyle.c
+++ b/baseboard/zork/variant_trembyle.c
@@ -420,10 +420,10 @@ static int board_ps8802_mux_set(const struct usb_mux *me,
return rv;
/* Enable IN_HPD on the DB */
- ioex_set_level(IOEX_USB_C1_HPD_IN_DB, 1);
+ gpio_or_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);
+ gpio_or_ioex_set_level(board_usbc1_retimer_inhpd, 0);
}
return rv;
@@ -486,10 +486,10 @@ static int board_ps8818_mux_set(const struct usb_mux *me,
return rv;
/* Enable IN_HPD on the DB */
- gpio_or_ioex_set_level(PORT_TO_HPD(1), 1);
+ gpio_or_ioex_set_level(board_usbc1_retimer_inhpd, 1);
} else {
/* Disable IN_HPD on the DB */
- gpio_or_ioex_set_level(PORT_TO_HPD(1), 0);
+ gpio_or_ioex_set_level(board_usbc1_retimer_inhpd, 0);
}
return rv;