summaryrefslogtreecommitdiff
path: root/src/mainboard/google/dedede/variants/boxy/gpio.c
diff options
context:
space:
mode:
authorReka Norman <rekanorman@chromium.org>2023-10-09 10:57:17 +1100
committerFelix Held <felix-coreboot@felixheld.de>2023-10-10 13:39:01 +0000
commite486082dfb1658b0916915bc944c1d3266862423 (patch)
tree0cb92fe72b554455884c8ed5df46e34ccd5574b5 /src/mainboard/google/dedede/variants/boxy/gpio.c
parent7c193b9480eaa0692b4d68ed768262ff34ae35e6 (diff)
mb/google/dedede: Wait for HPD on dibbi variants
Some Type-C monitors do not immediately assert HPD. If we enter FSP-S before HDP is asserted, display initialisation may fail. So wait for HPD. This is similar to commit b40c6009141e ("mainboard/hatch: Fix puff DP output on cold boots") on puff, except we don't use google_chromeec_wait_for_displayport() since that EC command was removed for TCPMv2 (https://crrev.com/c/4221975). Instead we use the HPD signals only. By waiting for any HPD signal (Type-C or HDMI), we skip waiting if HDMI is connected, which is the same behaviour as puff and fizz. TEST=On dibbi, connect a display via a Type-C to HDMI dongle and check the dev and recovery screens are now displayed correctly. Also check the logs in the following cases: Cold reboot in dev mode, Type-C to HDMI dongle: HPD ready after 800 ms Warm reboot in dev mode, Type-C to HDMI dongle: HPD ready after 0 ms Cold/warm reboot in dev mode, direct Type-C: HPD ready after 0 ms Cold/warm reboot in dev mode, direct HDMI: HPD ready after 0 ms Cold/warm reboot in dev mode, no display: HPD not ready after 3000 ms. Abort. Change-Id: Id4657b5d5a95a68ecbd9efcf3585cf96ad1e13e1 Signed-off-by: Reka Norman <rekanorman@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78294 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sam McNally <sammc@google.com>
Diffstat (limited to 'src/mainboard/google/dedede/variants/boxy/gpio.c')
-rw-r--r--src/mainboard/google/dedede/variants/boxy/gpio.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mainboard/google/dedede/variants/boxy/gpio.c b/src/mainboard/google/dedede/variants/boxy/gpio.c
index f8ed0cfefd..e8cb9ffe81 100644
--- a/src/mainboard/google/dedede/variants/boxy/gpio.c
+++ b/src/mainboard/google/dedede/variants/boxy/gpio.c
@@ -87,3 +87,18 @@ const struct pad_config *variant_override_gpio_table(size_t *num)
*num = ARRAY_SIZE(gpio_table);
return gpio_table;
}
+
+static const gpio_t hpd_gpios[] = {
+ /* HDMI1 */
+ GPP_A17,
+ /* USB C0 */
+ GPP_B23,
+ /* USB C1 */
+ GPP_A16,
+};
+
+const gpio_t *variant_hpd_gpios(size_t *num)
+{
+ *num = ARRAY_SIZE(hpd_gpios);
+ return hpd_gpios;
+}