mturney mturney has uploaded this change for review.

View Change

trogdor: Add mainboard USB support

Change-Id: I126d1d6b582ea95c97ac55784d44d3081aabdae7
Signed-off-by: Sandeep Maheswaram <sanm@codeaurora.org>
---
M src/mainboard/google/trogdor/mainboard.c
M src/mainboard/google/trogdor/romstage.c
2 files changed, 25 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/32/36232/1
diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c
index dbdb4ed..170955a 100644
--- a/src/mainboard/google/trogdor/mainboard.c
+++ b/src/mainboard/google/trogdor/mainboard.c
@@ -19,10 +19,23 @@
#include <gpio.h>
#include <timestamp.h>
#include <soc/qupv3_fw_config.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)
{
qupv3_fw_init();
+ 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: 1
Gerrit-Owner: mturney mturney <mturney@codeaurora.org>
Gerrit-MessageType: newchange