| 1 | /* SPDX-License-Identifier: GPL-2.0-only OR MIT */ |
| 2 | |
| 3 | /* |
| 4 | * This file is created based on MT8188 Functional Specification |
| 5 | * Chapter number: 13.1,13.2 |
| 6 | */ |
| 7 | |
| 8 | #include <soc/addressmap.h> |
| 9 | #include <device/mmio.h> |
| 10 | #include <soc/usb.h> |
| 11 | |
| 12 | #define CTRL_U3_PORT_SS_SUP_SPEED (3U << 9) |
| 13 | |
| 14 | void mtk_usb_prepare(void) |
| 15 | { |
| 16 | /* SW sets this register to change USB3.2 speed to Gen1-5Gbps */ |
| 17 | struct ssusb_ippc_regs *ippc_regs = (void *)(SSUSB_IPPC_BASE); |
| 18 | |
| 19 | clrsetbits32(&ippc_regs->u3_ctrl_p[0], CTRL_U3_PORT_SS_SUP_SPEED, 0); |
| 20 | } |