drivers/mipi: Add support for KD_KD110N11_51IE panel
[coreboot2.git] / src / soc / mediatek / mt8186 / usb.c
blob42804dd77f2b2380697909177e640bc0a25f9684
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 /*
4 * This file is created based on MT8186 Functional Specification
5 * Chapter number: 5.5
6 */
8 #include <device/mmio.h>
9 #include <gpio.h>
10 #include <soc/pll_common.h>
11 #include <soc/usb.h>
13 #define PERI_USB_WAKEUP_DEC_CON1 0x404
14 #define PERI_U3_WAKE_CTRL0 0x420
16 void mtk_usb_prepare(void)
18 mt_pll_set_usb_clock();
20 gpio_output(GPIO(USB_DRVVBUS_P1), 1);
22 /* disable IP0 debounce */
23 write32p(PERICFG_BASE + PERI_U3_WAKE_CTRL0, 0);
24 /* disable IP1 debounce */
25 write32p(PERICFG_BASE + PERI_USB_WAKEUP_DEC_CON1, 0);