summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8192/usb.c
blob: 44f2f150edaf07780bdecec4a709f6a64f72816b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* SPDX-License-Identifier: GPL-2.0-only */

#include <soc/addressmap.h>
#include <device/mmio.h>
#include <soc/usb.h>

#define REG_SPM_POWERON_CONFIG_EN          (void *)(SPM_BASE + 0x000)
#define REG_SPM_SSPM_PWR_CON               (void *)(SPM_BASE + 0x390)

void mtk_usb_prepare(void)
{
	/* power on SSUSB SRAM FIFO */
	setbits32(REG_SPM_POWERON_CONFIG_EN, 0xB160001);
	clrbits32(REG_SPM_SSPM_PWR_CON, 0x000001FF);
}