coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
usb.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 /*
4  * This file is created based on MT8186 Functional Specification
5  * Chapter number: 5.5
6  */
7 
8 #include <device/mmio.h>
9 #include <gpio.h>
10 #include <soc/gpio.h>
11 #include <soc/usb.h>
12 
13 #define PERI_USB_WAKEUP_DEC_CON1 0x404
14 #define PERI_U3_WAKE_CTRL0 0x420
15 
16 void mtk_usb_prepare(void)
17 {
18  gpio_output(GPIO(USB_DRVVBUS_P1), 1);
19 
20  /* disable IP0 debounce */
22  /* disable IP1 debounce */
24 }
@ GPIO
Definition: chip.h:84
static __always_inline void write32p(const uintptr_t addr, const uint32_t value)
Definition: mmio.h:240
void gpio_output(gpio_t gpio, int value)
Definition: gpio.c:194
__weak void mtk_usb_prepare(void)
Definition: usb.c:143
@ PERICFG_BASE
Definition: addressmap.h:24
#define PERI_USB_WAKEUP_DEC_CON1
Definition: usb.c:13
#define PERI_U3_WAKE_CTRL0
Definition: usb.c:14