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/configs') diff --git a/include/configs/rpi_b.h b/include/configs/rpi_b.h index 2d698094800..9a532326805 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.2.3 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/configs') diff --git a/include/configs/rpi_b.h b/include/configs/rpi_b.h index 9a532326805..3c3ba9a0b76 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.2.3 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/configs') diff --git a/include/configs/rpi_b.h b/include/configs/rpi_b.h index 3c3ba9a0b76..6d01b61718a 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.2.3