From 6e9e06260d4fa8873fdebddc2a11f9205674d189 Mon Sep 17 00:00:00 2001 From: Oleksandr Tymoshenko Date: Sat, 1 Feb 2014 21:51:25 -0700 Subject: usb: dwc2: Add driver for Synopsis DWC2 USB IP block This is the USB host controller used on the Altera SoCFPGA and Raspbery Pi. This code has three checkpatch warnings, but to make sure it stays at least readable and clear, these are not fixed. These bugs are in the USB request handling combinatorial logic, so any abstracting of those is out of question. Tested on DENX MCV (Altera SoCFPGA 5CSFXC6C6U23C8N) and RPi B+ (BCM2835). Signed-off-by: Oleksandr Tymoshenko Signed-off-by: Stephen Warren Signed-off-by: Marek Vasut Cc: Chin Liang See Cc: Dinh Nguyen Acked-by: Pavel Machek Cc: Vince Bridgers Tested-by: Dinh Nguyen --- include/usb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/usb.h b/include/usb.h index c355fbe..c4a288d 100644 --- a/include/usb.h +++ b/include/usb.h @@ -150,7 +150,8 @@ enum usb_init_type { defined(CONFIG_USB_OMAP3) || defined(CONFIG_USB_DA8XX) || \ defined(CONFIG_USB_BLACKFIN) || defined(CONFIG_USB_AM35X) || \ defined(CONFIG_USB_MUSB_DSPS) || defined(CONFIG_USB_MUSB_AM35X) || \ - defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined(CONFIG_USB_XHCI) + defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined(CONFIG_USB_XHCI) || \ + defined(CONFIG_USB_DWC2) int usb_lowlevel_init(int index, enum usb_init_type init, void **controller); int usb_lowlevel_stop(int index); -- cgit v1.1 From 72d5702c44ed43cf36491059f00a7b1819341610 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 21 Sep 2014 10:25:12 +0200 Subject: arm: rpi: Enable USB support on RPi Enable DWC2 USB, storage and ethernet support. Tested on RPi B+. Signed-off-by: Marek Vasut Cc: Stephen Warren Cc: Chin Liang See Cc: Dinh Nguyen Cc: Albert Aribaud Cc: Tom Rini Cc: Wolfgang Denk Cc: Pavel Machek --- include/configs/rpi_b.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/configs/rpi_b.h b/include/configs/rpi_b.h index 2d69809..9a53232 100644 --- a/include/configs/rpi_b.h +++ b/include/configs/rpi_b.h @@ -124,13 +124,7 @@ /* Some things don't make sense on this HW or yet */ #undef CONFIG_CMD_FPGA -#undef CONFIG_CMD_NET -#undef CONFIG_CMD_NFS #undef CONFIG_CMD_SAVEENV -#undef CONFIG_CMD_DHCP -#undef CONFIG_CMD_MII -#undef CONFIG_CMD_NET -#undef CONFIG_CMD_PING /* Environment */ #define ENV_DEVICE_SETTINGS \ @@ -181,4 +175,13 @@ #define CONFIG_BOOTDELAY 2 +#define CONFIG_CMD_USB +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_DWC2 +#define CONFIG_USB_DWC2_REG_ADDR 0x20980000 +#define CONFIG_USB_STORAGE +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_SMSC95XX +#endif + #endif -- cgit v1.1 From 4f80a06df3c174773b6fc4379f50562bf8db5a62 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Fri, 26 Sep 2014 20:51:39 -0600 Subject: ARM: rpi_b: query internal MAC address from firmware The built-in SMSC 95xx chip doesn't know its own MAC address. Instead, we must query it from the VC firmware; it's probably encoded in fuses on the BCM2835. Signed-off-by: Stephen Warren --- include/configs/rpi_b.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/configs/rpi_b.h b/include/configs/rpi_b.h index 9a53232..3c3ba9a 100644 --- a/include/configs/rpi_b.h +++ b/include/configs/rpi_b.h @@ -182,6 +182,7 @@ #define CONFIG_USB_STORAGE #define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_SMSC95XX +#define CONFIG_MISC_INIT_R #endif #endif -- cgit v1.1 From 227ec97f5173df008f85bf4743e00fe16f991204 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Fri, 26 Sep 2014 20:51:40 -0600 Subject: ARM: rpi_b: enable USB/DHCP/PXE in bootcmd USB support must be enabled before config_distro_bootcmd.h is included for bootcmd to include USB-related functionality. Signed-off-by: Stephen Warren --- include/configs/rpi_b.h | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/configs/rpi_b.h b/include/configs/rpi_b.h index 3c3ba9a..6d01b61 100644 --- a/include/configs/rpi_b.h +++ b/include/configs/rpi_b.h @@ -77,6 +77,16 @@ #define CONFIG_MMC_SDHCI_IO_ACCESSORS #define CONFIG_BCM2835_SDHCI +#define CONFIG_CMD_USB +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_DWC2 +#define CONFIG_USB_DWC2_REG_ADDR 0x20980000 +#define CONFIG_USB_STORAGE +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_SMSC95XX +#define CONFIG_MISC_INIT_R +#endif + /* Console UART */ #define CONFIG_PL011_SERIAL #define CONFIG_PL011_CLOCK 3000000 @@ -165,7 +175,10 @@ "ramdisk_addr_r=0x02100000\0" \ #define BOOT_TARGET_DEVICES(func) \ - func(MMC, mmc, 0) + func(MMC, mmc, 0) \ + func(USB, usb, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) #include #define CONFIG_EXTRA_ENV_SETTINGS \ @@ -175,14 +188,4 @@ #define CONFIG_BOOTDELAY 2 -#define CONFIG_CMD_USB -#ifdef CONFIG_CMD_USB -#define CONFIG_USB_DWC2 -#define CONFIG_USB_DWC2_REG_ADDR 0x20980000 -#define CONFIG_USB_STORAGE -#define CONFIG_USB_HOST_ETHER -#define CONFIG_USB_ETHER_SMSC95XX -#define CONFIG_MISC_INIT_R -#endif - #endif -- cgit v1.1 From 09bab6e77026d4b4e7682e56b470adf6e9f81563 Mon Sep 17 00:00:00 2001 From: Igor Grinberg Date: Thu, 23 Oct 2014 14:25:25 +0300 Subject: musb: fix warning in include/linux/usb/musb.h Fix the following build warning by including linux/compat.h: include/linux/usb/musb.h:110: warning: 'struct device' declared inside parameter list include/linux/usb/musb.h:110: warning: its scope is only this definition or declaration, which is probably not what you want Signed-off-by: Igor Grinberg --- include/linux/usb/musb.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index 9f65ef9..075d222 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h @@ -14,6 +14,8 @@ #define __deprecated #endif +#include + /* The USB role is defined by the connector used on the board, so long as * standards are being followed. (Developer boards sometimes won't.) */ -- cgit v1.1