Patrick Georgi submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved
trogdor: Add mainboard USB support

Change-Id: I126d1d6b582ea95c97ac55784d44d3081aabdae7
Signed-off-by: Sandeep Maheswaram <sanm@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36232
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
---
M src/mainboard/google/trogdor/mainboard.c
M src/mainboard/google/trogdor/romstage.c
2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c
index 42af265..63fac19 100644
--- a/src/mainboard/google/trogdor/mainboard.c
+++ b/src/mainboard/google/trogdor/mainboard.c
@@ -18,10 +18,22 @@
#include <device/mmio.h>
#include <gpio.h>
#include <timestamp.h>
+#include <soc/usb.h>
+
+static struct usb_board_data usb0_board_data = {
+ .pll_bias_control_2 = 0x22,
+ .imp_ctrl1 = 0x08,
+ .port_tune1 = 0xc5,
+};
+
+static void setup_usb(void)
+{
+ setup_usb_host0(&usb0_board_data);
+}

static void mainboard_init(struct device *dev)
{
-
+ setup_usb();
}

static void mainboard_enable(struct device *dev)
diff --git a/src/mainboard/google/trogdor/romstage.c b/src/mainboard/google/trogdor/romstage.c
index 7185387..872798a 100644
--- a/src/mainboard/google/trogdor/romstage.c
+++ b/src/mainboard/google/trogdor/romstage.c
@@ -14,10 +14,22 @@
*/

#include <arch/stages.h>
+#include <soc/usb.h>
#include <soc/qclib_common.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_usb0();
+}
+
void platform_romstage_main(void)
{
+ prepare_usb();
+
/* QCLib: DDR init & train */
qclib_load_and_run();
}

To view, visit change 36232. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I126d1d6b582ea95c97ac55784d44d3081aabdae7
Gerrit-Change-Number: 36232
Gerrit-PatchSet: 12
Gerrit-Owner: mturney mturney <mturney@codeaurora.org>
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Ravi kumar <rbokka@codeaurora.org>
Gerrit-Reviewer: Sandeep Maheswaram <sanm@codeaurora.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-MessageType: merged