From d1b6c77e1f7ed4821da008c80325f589fcf44df9 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Tue, 4 Nov 2014 04:13:57 +0100 Subject: usb: s3c-otg: Split out PHY control Split the Samsung specific PHY control into a separate file and compile this into the S3C OTG driver only if used on a Samsung system. 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 Tested-by: Lukasz Majewski --- include/configs/exynos4-common.h | 1 + include/configs/s5p_goni.h | 1 + include/configs/s5pc210_universal.h | 1 + include/configs/smdkv310.h | 1 + 4 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/configs/exynos4-common.h b/include/configs/exynos4-common.h index 89ba14e..41631c7 100644 --- a/include/configs/exynos4-common.h +++ b/include/configs/exynos4-common.h @@ -59,6 +59,7 @@ #define CONFIG_USB_GADGET #define CONFIG_USB_GADGET_S3C_UDC_OTG +#define CONFIG_USB_GADGET_S3C_UDC_OTG_PHY #define CONFIG_USB_GADGET_DUALSPEED #define CONFIG_USB_GADGET_VBUS_DRAW 2 diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h index 3633a35..dfa2e07 100644 --- a/include/configs/s5p_goni.h +++ b/include/configs/s5p_goni.h @@ -281,6 +281,7 @@ #define CONFIG_SYS_MAX_I2C_BUS 7 #define CONFIG_USB_GADGET #define CONFIG_USB_GADGET_S3C_UDC_OTG +#define CONFIG_USB_GADGET_S3C_UDC_OTG_PHY #define CONFIG_USB_GADGET_DUALSPEED #define CONFIG_USB_GADGET_VBUS_DRAW 2 #define CONFIG_CMD_USB_MASS_STORAGE diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h index 4b30d14..e7bace4 100644 --- a/include/configs/s5pc210_universal.h +++ b/include/configs/s5pc210_universal.h @@ -181,6 +181,7 @@ #define CONFIG_USB_GADGET #define CONFIG_USB_GADGET_S3C_UDC_OTG +#define CONFIG_USB_GADGET_S3C_UDC_OTG_PHY #define CONFIG_USB_GADGET_DUALSPEED /* diff --git a/include/configs/smdkv310.h b/include/configs/smdkv310.h index a2469eb..655025c 100644 --- a/include/configs/smdkv310.h +++ b/include/configs/smdkv310.h @@ -14,6 +14,7 @@ #undef CONFIG_BOARD_COMMON #undef CONFIG_USB_GADGET #undef CONFIG_USB_GADGET_S3C_UDC_OTG +#undef CONFIG_USB_GADGET_S3C_UDC_OTG_PHY #undef CONFIG_CMD_USB_MASS_STORAGE #undef CONFIG_REVISION_TAG #undef CONFIG_CMD_THOR_DOWNLOAD -- cgit v1.1 From 481a11c552978132a7e291213762af82ed3e7003 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Tue, 4 Nov 2014 04:23:25 +0100 Subject: usb: s3c-otg: Allow custom gusbcfg Allow passing in a custom configuration of the gusbcfg register via platform data. 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 Tested-by: Lukasz Majewski --- include/usb/s3c_udc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/usb/s3c_udc.h b/include/usb/s3c_udc.h index 70e48f8..7f49a4e 100644 --- a/include/usb/s3c_udc.h +++ b/include/usb/s3c_udc.h @@ -108,5 +108,6 @@ struct s3c_plat_otg_data { unsigned int regs_otg; unsigned int usb_phy_ctrl; unsigned int usb_flags; + unsigned int usb_gusbcfg; }; #endif -- cgit v1.1 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 --- include/configs/socfpga_common.h | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index 83a1bcd..e1aae49 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -37,7 +37,7 @@ */ #define CONFIG_NR_DRAM_BANKS 1 #define PHYS_SDRAM_1 0x0 -#define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024) +#define CONFIG_SYS_MALLOC_LEN (64 * 1024 * 1024) #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1 #define CONFIG_SYS_MEMTEST_END PHYS_SDRAM_1_SIZE @@ -172,6 +172,34 @@ #endif /* + * USB Gadget (DFU, UMS) + */ +#if defined(CONFIG_CMD_DFU) || defined(CONFIG_CMD_USB_MASS_STORAGE) +#define CONFIG_USB_GADGET +#define CONFIG_USB_GADGET_S3C_UDC_OTG +#define CONFIG_USB_GADGET_DUALSPEED +#define CONFIG_USB_GADGET_VBUS_DRAW 2 + +/* USB Composite download gadget - g_dnl */ +#define CONFIG_USBDOWNLOAD_GADGET +#define CONFIG_USB_GADGET_MASS_STORAGE + +#define CONFIG_DFU_FUNCTION +#define CONFIG_DFU_MMC +#define CONFIG_SYS_DFU_DATA_BUF_SIZE (32 * 1024 * 1024) +#define DFU_DEFAULT_POLL_TIMEOUT 300 + +/* USB IDs */ +#define CONFIG_G_DNL_VENDOR_NUM 0x0525 /* NetChip */ +#define CONFIG_G_DNL_PRODUCT_NUM 0xA4A5 /* Linux-USB File-backed Storage Gadget */ +#define CONFIG_G_DNL_UMS_VENDOR_NUM CONFIG_G_DNL_VENDOR_NUM +#define CONFIG_G_DNL_UMS_PRODUCT_NUM CONFIG_G_DNL_PRODUCT_NUM +#ifndef CONFIG_G_DNL_MANUFACTURER +#define CONFIG_G_DNL_MANUFACTURER "Altera" +#endif +#endif + +/* * U-Boot environment */ #define CONFIG_SYS_CONSOLE_IS_IN_ENV -- cgit v1.1 From a8c2ebcf0a707a51d32cf7644d6459af11b00114 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 7 Nov 2014 18:34:55 +0900 Subject: usb: include and from include/usb.h The header file include/usb.h references ARCH_DMA_MINALIGH and block_dev_desc_t, thus it must include and . Signed-off-by: Masahiro Yamada --- include/usb.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/usb.h b/include/usb.h index 9d0d04d..d3c7415 100644 --- a/include/usb.h +++ b/include/usb.h @@ -11,6 +11,8 @@ #include #include +#include +#include /* * The EHCI spec says that we must align to at least 32 bytes. However, -- cgit v1.1