1 /* SPDX-License-Identifier: GPL-2.0-only */
4 * This file is created based on MT8186 Functional Specification
8 #include <device/mmio.h>
10 #include <soc/pll_common.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);