Kevin: add usb initial support
authorLiangfeng Wu <wulf@rock-chips.com>
Tue, 24 May 2016 12:30:45 +0000 (20:30 +0800)
committerchrome-bot <chrome-bot@chromium.org>
Fri, 27 May 2016 03:37:32 +0000 (20:37 -0700)
Kevin can boot from both USB3.0 interfaces on rockchip
rk3399 platform. And both USB2.0 interfaces not needed
in firmware on this board.

BRANCH=none
BUG=chrome-os-partner:52684
TEST=boot from USB

Change-Id: I2a829ab838327a8da3e7289609637a7f104d2158
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Liangfeng Wu <wulf@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/345667
Commit-Ready: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
src/board/kevin/board.c

index e80717e..13b0452 100644 (file)
@@ -23,6 +23,7 @@
 #include "config.h"
 #include "drivers/bus/i2s/rockchip.h"
 #include "drivers/bus/spi/rockchip.h"
+#include "drivers/bus/usb/usb.h"
 #include "drivers/ec/cros/spi.h"
 #include "drivers/flash/spi.h"
 #include "drivers/flash/spi.h"
@@ -106,6 +107,16 @@ static int board_setup(void)
        list_insert_after(&sd_card->mmc.ctrlr.list_node,
                          &removable_block_dev_controllers);
 
+       /*
+        * Support both USB3.0 XHCI controllers in firmware.
+        * And both USB2.0 controllers not needed in firmware.
+        */
+       UsbHostController *uhst0_xhci = new_usb_hc(XHCI, 0xfe800000);
+       UsbHostController *uhst1_xhci = new_usb_hc(XHCI, 0xfe900000);
+
+       list_insert_after(&uhst0_xhci->list_node, &usb_host_controllers);
+       list_insert_after(&uhst1_xhci->list_node, &usb_host_controllers);
+
        return 0;
 }