From 0223a95c723b5ad33c0f2ee1fc7acd2afe0f023b Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Tue, 4 Nov 2014 04:25:09 +0100 Subject: arm: socfpga: Add example UDC config Add example of an USB UDC configuration with DFU and UMS. Signed-off-by: Marek Vasut Cc: Chin Liang See Cc: Dinh Nguyen Cc: Vince Bridgers Acked-by: Pavel Machek Cc: Stefan Roese Reviewed-by: Lukasz Majewski --- board/altera/socfpga/socfpga_cyclone5.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'board') diff --git a/board/altera/socfpga/socfpga_cyclone5.c b/board/altera/socfpga/socfpga_cyclone5.c index 0f81d89..ce625e5 100644 --- a/board/altera/socfpga/socfpga_cyclone5.c +++ b/board/altera/socfpga/socfpga_cyclone5.c @@ -8,6 +8,10 @@ #include #include +#include +#include +#include + #include DECLARE_GLOBAL_DATA_PTR; @@ -39,3 +43,20 @@ int board_init(void) return 0; } + +#ifdef CONFIG_USB_GADGET +struct s3c_plat_otg_data socfpga_otg_data = { + .regs_otg = CONFIG_USB_DWC2_REG_ADDR, + .usb_gusbcfg = 0x1417, +}; + +int board_usb_init(int index, enum usb_init_type init) +{ + return s3c_udc_probe(&socfpga_otg_data); +} + +int g_dnl_board_usb_cable_connected(void) +{ + return 1; +} +#endif -- cgit v1.1