Commit 85a02aa9ccf3757c09e56e06926024cec6d9cfa0

Authored by Tom Rini
1 parent 610af383f1

am335x_evm: Regroup USB options

Signed-off-by: Tom Rini <trini@ti.com>

Showing 1 changed file with 41 additions and 39 deletions Side-by-side Diff

include/configs/am335x_evm.h
... ... @@ -171,44 +171,6 @@
171 171 "run mmcboot;" \
172 172 "run nandboot;"
173 173  
174   -/* USB Composite download gadget - g_dnl */
175   -#define CONFIG_USB_GADGET
176   -#define CONFIG_USBDOWNLOAD_GADGET
177   -
178   -/* USB TI's IDs */
179   -#define CONFIG_G_DNL_VENDOR_NUM 0x0403
180   -#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
181   -#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
182   -
183   -/* USB Device Firmware Update support */
184   -#define CONFIG_DFU_FUNCTION
185   -#define CONFIG_DFU_MMC
186   -#define CONFIG_CMD_DFU
187   -#define DFU_ALT_INFO_MMC \
188   - "boot part 0 1;" \
189   - "rootfs part 0 2;" \
190   - "MLO fat 0 1;" \
191   - "MLO.raw mmc 100 100;" \
192   - "u-boot.img.raw mmc 300 400;" \
193   - "spl-os-args.raw mmc 80 80;" \
194   - "spl-os-image.raw mmc 900 2000;" \
195   - "spl-os-args fat 0 1;" \
196   - "spl-os-image fat 0 1;" \
197   - "u-boot.img fat 0 1;" \
198   - "uEnv.txt fat 0 1"
199   -#ifdef CONFIG_NAND
200   -#define CONFIG_DFU_NAND
201   -#define DFU_ALT_INFO_NAND \
202   - "SPL part 0 1;" \
203   - "SPL.backup1 part 0 2;" \
204   - "SPL.backup2 part 0 3;" \
205   - "SPL.backup3 part 0 4;" \
206   - "u-boot part 0 5;" \
207   - "u-boot-spl-os part 0 6;" \
208   - "kernel part 0 8;" \
209   - "rootfs part 0 9"
210   -#endif
211   -
212 174 /* NS16550 Configuration */
213 175 #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
214 176 #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
215 177  
... ... @@ -283,13 +245,19 @@
283 245 #endif
284 246  
285 247 /*
286   - * USB configuration
  248 + * USB configuration. We enable MUSB support, both for host and for
  249 + * gadget. We set USB0 as peripheral and USB1 as host, based on the
  250 + * board schematic and physical port wired to each. Then for host we
  251 + * add mass storage support and for gadget we add both RNDIS ethernet
  252 + * and DFU.
287 253 */
288 254 #define CONFIG_USB_MUSB_DSPS
289 255 #define CONFIG_ARCH_MISC_INIT
290 256 #define CONFIG_MUSB_GADGET
291 257 #define CONFIG_MUSB_PIO_ONLY
292 258 #define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT
  259 +#define CONFIG_USB_GADGET
  260 +#define CONFIG_USBDOWNLOAD_GADGET
293 261 #define CONFIG_USB_GADGET_DUALSPEED
294 262 #define CONFIG_USB_GADGET_VBUS_DRAW 2
295 263 #define CONFIG_MUSB_HOST
... ... @@ -307,6 +275,11 @@
307 275 #define CONFIG_USB_ETHER
308 276 #define CONFIG_USB_ETH_RNDIS
309 277 #define CONFIG_USBNET_HOST_ADDR "de:ad:be:af:00:00"
  278 +
  279 +/* USB TI's IDs */
  280 +#define CONFIG_G_DNL_VENDOR_NUM 0x0403
  281 +#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
  282 +#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
310 283 #endif /* CONFIG_MUSB_GADGET */
311 284  
312 285 #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT)
... ... @@ -316,6 +289,35 @@
316 289 * Disable CPSW SPL support so we fit within the 101KiB limit.
317 290 */
318 291 #undef CONFIG_SPL_ETH_SUPPORT
  292 +#endif
  293 +
  294 +/* USB Device Firmware Update support */
  295 +#define CONFIG_DFU_FUNCTION
  296 +#define CONFIG_DFU_MMC
  297 +#define CONFIG_CMD_DFU
  298 +#define DFU_ALT_INFO_MMC \
  299 + "boot part 0 1;" \
  300 + "rootfs part 0 2;" \
  301 + "MLO fat 0 1;" \
  302 + "MLO.raw mmc 100 100;" \
  303 + "u-boot.img.raw mmc 300 400;" \
  304 + "spl-os-args.raw mmc 80 80;" \
  305 + "spl-os-image.raw mmc 900 2000;" \
  306 + "spl-os-args fat 0 1;" \
  307 + "spl-os-image fat 0 1;" \
  308 + "u-boot.img fat 0 1;" \
  309 + "uEnv.txt fat 0 1"
  310 +#ifdef CONFIG_NAND
  311 +#define CONFIG_DFU_NAND
  312 +#define DFU_ALT_INFO_NAND \
  313 + "SPL part 0 1;" \
  314 + "SPL.backup1 part 0 2;" \
  315 + "SPL.backup2 part 0 3;" \
  316 + "SPL.backup3 part 0 4;" \
  317 + "u-boot part 0 5;" \
  318 + "u-boot-spl-os part 0 6;" \
  319 + "kernel part 0 8;" \
  320 + "rootfs part 0 9"
319 321 #endif
320 322  
321 323 /*