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>
This commit is contained in:
parent
050be72e77
commit
655220ae69
|
@ -18,10 +18,22 @@
|
||||||
#include <device/mmio.h>
|
#include <device/mmio.h>
|
||||||
#include <gpio.h>
|
#include <gpio.h>
|
||||||
#include <timestamp.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)
|
static void mainboard_init(struct device *dev)
|
||||||
{
|
{
|
||||||
|
setup_usb();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mainboard_enable(struct device *dev)
|
static void mainboard_enable(struct device *dev)
|
||||||
|
|
|
@ -14,10 +14,22 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <arch/stages.h>
|
#include <arch/stages.h>
|
||||||
|
#include <soc/usb.h>
|
||||||
#include <soc/qclib_common.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)
|
void platform_romstage_main(void)
|
||||||
{
|
{
|
||||||
|
prepare_usb();
|
||||||
|
|
||||||
/* QCLib: DDR init & train */
|
/* QCLib: DDR init & train */
|
||||||
qclib_load_and_run();
|
qclib_load_and_run();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue