From cf7460f6ea72327d509951f50c712b4870eb253a Mon Sep 17 00:00:00 2001 From: Cong Yang Date: Fri, 17 Jan 2025 12:51:12 +0800 Subject: [PATCH] mb/google/skywalker: Enable USB3_HUB_RST We have to reset the USB hub as early as possible. Otherwise the USB3 hub may not be usable in the payload. This design has been introduced since Cherry. BUG=b:390357201 BRANCH=none TEST=detect USB devices in depthcharge, and the log is like "Added USB disk 2." Change-Id: I4ee24aef2a887c8a30738912a8bf90f830a72bed Signed-off-by: Cong Yang Reviewed-on: https://review.coreboot.org/c/coreboot/+/87348 Reviewed-by: Yidi Lin Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu --- src/mainboard/google/skywalker/bootblock.c | 9 +++++++++ src/mainboard/google/skywalker/gpio.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/mainboard/google/skywalker/bootblock.c b/src/mainboard/google/skywalker/bootblock.c index 1062d9bbe5..71c3dfc418 100644 --- a/src/mainboard/google/skywalker/bootblock.c +++ b/src/mainboard/google/skywalker/bootblock.c @@ -1,9 +1,18 @@ /* SPDX-License-Identifier: GPL-2.0-only OR MIT */ #include +#include #include +#include "gpio.h" + +static void usb3_hub_reset(void) +{ + gpio_output(GPIO_USB3_HUB_RST_L, 1); +} + void bootblock_mainboard_init(void) { mtk_snfc_init(); + usb3_hub_reset(); } diff --git a/src/mainboard/google/skywalker/gpio.h b/src/mainboard/google/skywalker/gpio.h index 11e2eb36dc..74d9b04154 100644 --- a/src/mainboard/google/skywalker/gpio.h +++ b/src/mainboard/google/skywalker/gpio.h @@ -6,5 +6,6 @@ #include #define GPIO_XHCI_INIT_DONE GPIO(GBE_MDC) +#define GPIO_USB3_HUB_RST_L GPIO(GPIO07) #endif