summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>2015-08-04 13:03:26 +0530
committerMichal Simek <michal.simek@xilinx.com>2015-08-19 11:27:30 +0200
commit16fa00a71147de0fb87062f912478a0551d148d3 (patch)
tree6e50cfecf80f86e61e3a345d7628b51135a3b25f /board
parentff560a13056a565a4e9ce1761bd04276a3cace88 (diff)
downloadu-boot-imx-16fa00a71147de0fb87062f912478a0551d148d3.zip
u-boot-imx-16fa00a71147de0fb87062f912478a0551d148d3.tar.gz
u-boot-imx-16fa00a71147de0fb87062f912478a0551d148d3.tar.bz2
zynqmp: usb: Add usb dwc3 driver support for zynqmp
Added usb dwc3 driver support for zynqmp this also supports the DFU and LTHOR to download the linux images on to RAM and cen be booted from those linux images. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'board')
-rw-r--r--board/xilinx/zynqmp/zynqmp.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index ffb3a58..d105bb4 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -12,6 +12,8 @@
#include <asm/arch/hardware.h>
#include <asm/arch/sys_proto.h>
#include <asm/io.h>
+#include <usb.h>
+#include <dwc3-uboot.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -136,3 +138,29 @@ int checkboard(void)
puts("Board:\tXilinx ZynqMP\n");
return 0;
}
+
+#ifdef CONFIG_USB_DWC3
+static struct dwc3_device dwc3_device_data = {
+ .maximum_speed = USB_SPEED_HIGH,
+ .base = ZYNQMP_USB0_XHCI_BASEADDR,
+ .dr_mode = USB_DR_MODE_PERIPHERAL,
+ .index = 0,
+};
+
+int usb_gadget_handle_interrupts(void)
+{
+ dwc3_uboot_handle_interrupt(0);
+ return 0;
+}
+
+int board_usb_init(int index, enum usb_init_type init)
+{
+ return dwc3_uboot_init(&dwc3_device_data);
+}
+
+int board_usb_cleanup(int index, enum usb_init_type init)
+{
+ dwc3_uboot_exit(index);
+ return 0;
+}
+#endif