diff options
author | Shaocheng Wang <shaocheng.wang@mediatek.corp-partner.google.com> | 2022-07-05 15:41:18 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-07-13 10:42:14 +0000 |
commit | 15e5a3be76826cefb8e9708bb08b12070042a9f2 (patch) | |
tree | 328fd25f3cc88d42fd67061f4a6a0df5c37eee97 /src/soc/mediatek/mt8188/usb.c | |
parent | 29f1866e9592bd3bc2d9ec25039a732bfa30b5fa (diff) |
soc/mediatek/mt8188: add usb host support
Add usb host function support.
TEST=read usb data successfully.
BUG=b:236331724
Signed-off-by: Shaocheng Wang <shaocheng.wang@mediatek.corp-partner.google.com>
Change-Id: I3494b687b811466cb6b988164d3c5b6fecc3016a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65754
Reviewed-by: Yidi Lin <yidilin@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/mediatek/mt8188/usb.c')
-rw-r--r-- | src/soc/mediatek/mt8188/usb.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8188/usb.c b/src/soc/mediatek/mt8188/usb.c new file mode 100644 index 0000000000..8d1f513758 --- /dev/null +++ b/src/soc/mediatek/mt8188/usb.c @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +/* + * This file is created based on MT8188 Functional Specification + * Chapter number: 5.5 + */ + +#include <device/mmio.h> +#include <gpio.h> +#include <soc/gpio.h> +#include <soc/infracfg.h> +#include <soc/pll_common.h> +#include <soc/usb.h> + +void mtk_usb_prepare(void) +{ + mt_pll_set_usb_clock(); + + /* usb drvvbus for 5v power */ + gpio_output(GPIO(USB1_DRV_VBUS), 1); +} |