From 56d60167ff593fa5a28a012b1a897155dd42893b Mon Sep 17 00:00:00 2001 From: Cong Yang Date: Fri, 17 Jan 2025 12:49:04 +0800 Subject: [PATCH] mb/google/skywalker: Pass XHCI_INIT_DONE to the payload Configure GPIO (XHCI_INIT_DONE) as output, so that payloads (for example depthcharge) can assert it to notify EC to enable USB VBUS. BUG=b:390357201 BRANCH=none TEST=detect USB devices in depthcharge, and the log is like "Added USB disk 2." Change-Id: I99760ace3e87626f55c52dc4f8a30bab27cba345 Signed-off-by: Cong Yang Reviewed-on: https://review.coreboot.org/c/coreboot/+/87347 Tested-by: build bot (Jenkins) Reviewed-by: Yidi Lin Reviewed-by: Yu-Ping Wu --- src/mainboard/google/skywalker/chromeos.c | 8 +++++++- src/mainboard/google/skywalker/gpio.h | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/mainboard/google/skywalker/gpio.h diff --git a/src/mainboard/google/skywalker/chromeos.c b/src/mainboard/google/skywalker/chromeos.c index 0e0f62d252..b779fe7bce 100644 --- a/src/mainboard/google/skywalker/chromeos.c +++ b/src/mainboard/google/skywalker/chromeos.c @@ -1,8 +1,14 @@ /* SPDX-License-Identifier: GPL-2.0-only OR MIT */ #include +#include + +#include "gpio.h" void fill_lb_gpios(struct lb_gpios *gpios) { - /* TODO: add ChromeOS specific gpios */ + struct lb_gpio chromeos_gpios[] = { + {GPIO_XHCI_INIT_DONE.id, ACTIVE_HIGH, -1, "XHCI init done"}, + }; + lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios)); } diff --git a/src/mainboard/google/skywalker/gpio.h b/src/mainboard/google/skywalker/gpio.h new file mode 100644 index 0000000000..11e2eb36dc --- /dev/null +++ b/src/mainboard/google/skywalker/gpio.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef __MAINBOARD_GOOGLE_SKYWALKER_GPIO_H__ +#define __MAINBOARD_GOOGLE_SKYWALKER_GPIO_H__ + +#include + +#define GPIO_XHCI_INIT_DONE GPIO(GBE_MDC) + +#endif