diff options
author | Yidi Lin <yidilin@chromium.org> | 2024-04-03 19:33:28 +0800 |
---|---|---|
committer | Yu-Ping Wu <yupingso@google.com> | 2024-10-19 04:37:00 +0000 |
commit | f789d41539a72d71bad97ce5e19566a05a952244 (patch) | |
tree | d8f57bc16fea67f9520ba78e94651eb5e1a1d849 /src/mainboard/google/rauru | |
parent | 1a82871cc0d2f1cca8dceb0bba13d036fedba802 (diff) |
mb/google/rauru: Pass XHCI_INIT_DONE to the payload
Configure GPIO EINT28 (XHCI_INIT_DONE) as output, so that payloads
(for example depthcharge) can assert it to notify EC to enable USB VBUS.
BUG=b:317009620
TEST=emerge-rauru coreboot
Change-Id: I5950974435b56997626886b16d371cd8e6472e3c
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84691
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Diffstat (limited to 'src/mainboard/google/rauru')
-rw-r--r-- | src/mainboard/google/rauru/bootblock.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/rauru/chromeos.c | 13 | ||||
-rw-r--r-- | src/mainboard/google/rauru/gpio.h | 12 |
3 files changed, 26 insertions, 1 deletions
diff --git a/src/mainboard/google/rauru/bootblock.c b/src/mainboard/google/rauru/bootblock.c index 578ec7558a..b1f986369e 100644 --- a/src/mainboard/google/rauru/bootblock.c +++ b/src/mainboard/google/rauru/bootblock.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include <bootblock_common.h> +#include <gpio.h> #include <soc/spi.h> #include "gpio.h" @@ -14,4 +15,5 @@ void bootblock_mainboard_init(void) { mtk_snfc_init(); usb3_hub_reset(); + setup_chromeos_gpios(); } diff --git a/src/mainboard/google/rauru/chromeos.c b/src/mainboard/google/rauru/chromeos.c index 4555b90ca0..b6aaefbead 100644 --- a/src/mainboard/google/rauru/chromeos.c +++ b/src/mainboard/google/rauru/chromeos.c @@ -1,8 +1,19 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include <boot/coreboot_tables.h> +#include <gpio.h> + +#include "gpio.h" + +void setup_chromeos_gpios(void) +{ + gpio_output(GPIO_XHCI_INIT_DONE, 0); +} 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/rauru/gpio.h b/src/mainboard/google/rauru/gpio.h new file mode 100644 index 0000000000..f05a3779fe --- /dev/null +++ b/src/mainboard/google/rauru/gpio.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef __MAINBOARD_GOOGLE_RAURU_GPIO_H__ +#define __MAINBOARD_GOOGLE_RAURU_GPIO_H__ + +#include <soc/gpio.h> + +#define GPIO_XHCI_INIT_DONE GPIO(EINT28) + +void setup_chromeos_gpios(void); + +#endif |