summaryrefslogtreecommitdiff
path: root/src/mainboard/google/cheza
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/cheza')
-rw-r--r--src/mainboard/google/cheza/mainboard.c14
-rw-r--r--src/mainboard/google/cheza/romstage.c11
2 files changed, 25 insertions, 0 deletions
diff --git a/src/mainboard/google/cheza/mainboard.c b/src/mainboard/google/cheza/mainboard.c
index cb4f5d061a..42adf56c79 100644
--- a/src/mainboard/google/cheza/mainboard.c
+++ b/src/mainboard/google/cheza/mainboard.c
@@ -16,9 +16,23 @@
#include <device/device.h>
#include <bootblock_common.h>
#include <gpio.h>
+#include <timestamp.h>
+#include <soc/usb.h>
+
+static struct usb_board_data usb1_board_data = {
+ .pll_bias_control_2 = 0x28,
+ .imp_ctrl1 = 0x08,
+ .port_tune1 = 0x20,
+};
static void setup_usb(void)
{
+ /*
+ * Primary USB is used only for DP functionality on cheza platform.
+ * Hence Setting up only Secondary USB DWC3 controller.
+ */
+ setup_usb_host1(&usb1_board_data);
+
gpio_output(GPIO(120), 1); /* Deassert HUB_RST_L to enable hub. */
}
diff --git a/src/mainboard/google/cheza/romstage.c b/src/mainboard/google/cheza/romstage.c
index ad8506193d..7b7da4ce8c 100644
--- a/src/mainboard/google/cheza/romstage.c
+++ b/src/mainboard/google/cheza/romstage.c
@@ -14,7 +14,18 @@
*/
#include <arch/stages.h>
+#include <soc/usb.h>
+
+static void prepare_usb(void)
+{
+ /*
+ * Do DWC3 core and phy reset. Kick these resets
+ * off early so they get at least 1ms to settle.
+ */
+ reset_usb1();
+}
void platform_romstage_main(void)
{
+ prepare_usb();
}