From 05be5a60e98eb1243901f556fefd66b1691fabe4 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Sat, 31 Oct 2009 12:37:42 -0500 Subject: OMAP3 zoom1 Add usbtty configuration The primary console of zoom1 is the serial out from the jumpers accessed by removing the back panel. A secondary console is to use the usbtty. The user can set this manually by doing setenv stdout usbtty; setenv stdin usbtty; setenv stderr usbtty saveenv usbtty will be usable by accessing the /dev/ttyACM0 on a linux host. Signed-off-by: Tom Rix --- include/configs/omap3_zoom1.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/configs') diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index ef7a28bbc..fa5828159 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -101,6 +101,21 @@ /* DDR - I use Micron DDR */ #define CONFIG_OMAP3_MICRON_DDR 1 +/* USB */ +#define CONFIG_MUSB_UDC 1 +#define CONFIG_USB_OMAP3 1 +#define CONFIG_TWL4030_USB 1 + +/* USB device configuration */ +#define CONFIG_USB_DEVICE 1 +#define CONFIG_USB_TTY 1 +#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1 +/* Change these to suit your needs */ +#define CONFIG_USBD_VENDORID 0x0451 +#define CONFIG_USBD_PRODUCTID 0x5678 +#define CONFIG_USBD_MANUFACTURER "Texas Instruments" +#define CONFIG_USBD_PRODUCT_NAME "Zoom1" + /* commands to include */ #include @@ -160,6 +175,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x82000000\0" \ + "usbtty=cdc_acm\0" \ "console=ttyS2,115200n8\0" \ "videomode=1024x768@60,vxres=1024,vyres=768\0" \ "videospec=omapfb:vram:2M,vram:4M\0" \ -- cgit v1.2.3 From 25374bfbf3a6c6624d8db512c95a4960e3a84635 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Sat, 31 Oct 2009 12:37:43 -0500 Subject: OMAP3 beagle Add usbtty configuration The primary console of beagle is the serial header. A secondary console is to use the usbtty. The user can set this manually by doing setenv stdout usbtty; setenv stdin usbtty; setenv stderr usbtty saveenv usbtty will be usable by accessing the /dev/ttyACM0 on a linux host. Signed-off-by: Tom Rix --- include/configs/omap3_beagle.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/configs') diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index a6fe5e12b..4fe3bd8be 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -100,6 +100,21 @@ /* DDR - I use Micron DDR */ #define CONFIG_OMAP3_MICRON_DDR 1 +/* USB */ +#define CONFIG_MUSB_UDC 1 +#define CONFIG_USB_OMAP3 1 +#define CONFIG_TWL4030_USB 1 + +/* USB device configuration */ +#define CONFIG_USB_DEVICE 1 +#define CONFIG_USB_TTY 1 +#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1 +/* Change these to suit your needs */ +#define CONFIG_USBD_VENDORID 0x0451 +#define CONFIG_USBD_PRODUCTID 0x5678 +#define CONFIG_USBD_MANUFACTURER "Texas Instruments" +#define CONFIG_USBD_PRODUCT_NAME "Beagle" + /* commands to include */ #include @@ -164,6 +179,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x82000000\0" \ + "usbtty=cdc_acm\0" \ "console=ttyS2,115200n8\0" \ "vram=12M\0" \ "dvimode=1024x768MR-16@60\0" \ -- cgit v1.2.3 From 2ec1abea4359b94523d45a20d68d8582e09ace46 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Sat, 31 Oct 2009 12:37:45 -0500 Subject: OMAP3 zoom2 Use usbtty if the debug board is not connected. The preferred serial output comes from the debug board. When the debug board is disconnected, fall back on using usbtty from the usb connector on the Zoom2 board. This shows up as /dev/ttyACM0 in a linux host. Signed-off-by: Tom Rix --- board/logicpd/zoom2/zoom2_serial.c | 12 ++++++++---- include/configs/omap3_zoom2.h | 17 +++++++++++++++++ include/serial.h | 12 ++++++++++++ 3 files changed, 37 insertions(+), 4 deletions(-) (limited to 'include/configs') diff --git a/board/logicpd/zoom2/zoom2_serial.c b/board/logicpd/zoom2/zoom2_serial.c index a3d777dfa..ba58e3934 100644 --- a/board/logicpd/zoom2/zoom2_serial.c +++ b/board/logicpd/zoom2/zoom2_serial.c @@ -86,6 +86,8 @@ void quad_putc_dev (unsigned long base, const char c) quad_putc_dev (base, '\r'); NS16550_putc ((NS16550_t) base, c); + } else { + usbtty_putc(c); } } @@ -94,6 +96,8 @@ void quad_puts_dev (unsigned long base, const char *s) if (zoom2_debug_board_connected ()) { while ((s != NULL) && (*s != '\0')) quad_putc_dev (base, *s++); + } else { + usbtty_puts(s); } } @@ -101,16 +105,16 @@ int quad_getc_dev (unsigned long base) { if (zoom2_debug_board_connected ()) return NS16550_getc ((NS16550_t) base); - else - return 0; + + return usbtty_getc(); } int quad_tstc_dev (unsigned long base) { if (zoom2_debug_board_connected ()) return NS16550_tstc ((NS16550_t) base); - else - return 0; + + return usbtty_tstc(); } void quad_setbrg_dev (unsigned long base) diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h index 2b076666e..7a8beb850 100644 --- a/include/configs/omap3_zoom2.h +++ b/include/configs/omap3_zoom2.h @@ -125,6 +125,20 @@ #define CONFIG_OMAP3_GPIO_3 /* board revision */ #define CONFIG_OMAP3_GPIO_5 /* debug board detection, ZOOM2_LED_BLUE */ +/* USB */ +#define CONFIG_MUSB_UDC 1 +#define CONFIG_USB_OMAP3 1 +#define CONFIG_TWL4030_USB 1 + +/* USB device configuration */ +#define CONFIG_USB_DEVICE 1 +#define CONFIG_USB_TTY 1 +/* Change these to suit your needs */ +#define CONFIG_USBD_VENDORID 0x0451 +#define CONFIG_USBD_PRODUCTID 0x5678 +#define CONFIG_USBD_MANUFACTURER "Texas Instruments" +#define CONFIG_USBD_PRODUCT_NAME "Zoom2" + /* commands to include */ #include @@ -170,6 +184,9 @@ /* Environment information */ #define CONFIG_BOOTDELAY 10 +#define CONFIG_EXTRA_ENV_SETTINGS \ + "usbtty=cdc_acm\0" \ + /* * Miscellaneous configurable options */ diff --git a/include/serial.h b/include/serial.h index 43451a301..f2638ec56 100644 --- a/include/serial.h +++ b/include/serial.h @@ -67,9 +67,21 @@ extern int serial_assign(char * name); extern void serial_reinit_all(void); /* For usbtty */ +#ifdef CONFIG_USB_TTY + extern int usbtty_getc(void); extern void usbtty_putc(const char c); extern void usbtty_puts(const char *str); extern int usbtty_tstc(void); +#else + +/* stubs */ +#define usbtty_getc() 0 +#define usbtty_putc(a) +#define usbtty_puts(a) +#define usbtty_tstc() 0 + +#endif /* CONFIG_USB_TTY */ + #endif -- cgit v1.2.3 From 73c8640e93881439b87a5734485a9e56a494ef50 Mon Sep 17 00:00:00 2001 From: Ajay Kumar Gupta Date: Wed, 4 Nov 2009 15:58:23 -0600 Subject: omap3evm: musb: add USB config Added USB host and device config for host (MSC, Keyboard) and device (ACM) functionalities. Signed-off-by: Ajay Kumar Gupta --- include/configs/omap3_evm.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'include/configs') diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index 00093f83d..630b00fae 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -104,6 +104,44 @@ /* DDR - I use Micron DDR */ #define CONFIG_OMAP3_MICRON_DDR 1 +/* USB + * Enable CONFIG_MUSB_HCD for Host functionalities MSC, keyboard + * Enable CONFIG_MUSB_UDD for Device functionalities. + */ +#define CONFIG_USB_OMAP3 1 +#define CONFIG_MUSB_HCD 1 +/* #define CONFIG_MUSB_UDC 1 */ + +#ifdef CONFIG_USB_OMAP3 + +#ifdef CONFIG_MUSB_HCD +#define CONFIG_CMD_USB + +#define CONFIG_USB_STORAGE +#define CONGIG_CMD_STORAGE +#define CONFIG_CMD_FAT + +#ifdef CONFIG_USB_KEYBOARD +#define CONFIG_SYS_USB_EVENT_POLL +#define CONFIG_PREBOOT "usb start" +#endif /* CONFIG_USB_KEYBOARD */ + +#endif /* CONFIG_MUSB_HCD */ + +#ifdef CONFIG_MUSB_UDC +/* USB device configuration */ +#define CONFIG_USB_DEVICE 1 +#define CONFIG_USB_TTY 1 +#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1 +/* Change these to suit your needs */ +#define CONFIG_USBD_VENDORID 0x0451 +#define CONFIG_USBD_PRODUCTID 0x5678 +#define CONFIG_USBD_MANUFACTURER "Texas Instruments" +#define CONFIG_USBD_PRODUCT_NAME "EVM" +#endif /* CONFIG_MUSB_UDC */ + +#endif /* CONFIG_USB_OMAP3 */ + /* commands to include */ #include @@ -160,6 +198,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x82000000\0" \ + "usbtty=cdc_acm\0" \ "console=ttyS2,115200n8\0" \ "mmcargs=setenv bootargs console=${console} " \ "root=/dev/mmcblk0p2 rw " \ -- cgit v1.2.3