diff options
Diffstat (limited to 'src/mainboard/google/trogdor')
-rw-r--r-- | src/mainboard/google/trogdor/mainboard.c | 14 | ||||
-rw-r--r-- | src/mainboard/google/trogdor/romstage.c | 12 |
2 files changed, 25 insertions, 1 deletions
diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c index 42af265cd9..63fac19984 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 void mainboard_init(struct device *dev) +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 718538728c..872798a791 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(); } |