[U-Boot] [PATCH 1/5] tbs2910: support for usb otg host mode

Add support for USB OTG host mode. Only high speed devices supported so far (e.g. usb 2.0 hub required to connect a keyboard).
Signed-off-by: Soeren Moch smoch@web.de --- Cc: Stefano Babic sbabic@denx.de --- board/tbs/tbs2910/tbs2910.c | 10 ++++++++++ include/configs/tbs2910.h | 1 + 2 files changed, 11 insertions(+)
diff --git a/board/tbs/tbs2910/tbs2910.c b/board/tbs/tbs2910/tbs2910.c index 42b166d..0b509b6 100644 --- a/board/tbs/tbs2910/tbs2910.c +++ b/board/tbs/tbs2910/tbs2910.c @@ -372,6 +372,12 @@ static const struct boot_mode board_boot_modes[] = { }; #endif
+#ifdef CONFIG_USB_EHCI_MX6 +static iomux_v3_cfg_t const usb_otg_pads[] = { + MX6_PAD_ENET_RX_ER__USB_OTG_ID | MUX_PAD_CTRL(NO_PAD_CTRL), +}; +#endif + int board_init(void) { /* address of boot parameters */ @@ -391,6 +397,10 @@ int board_init(void) #ifdef CONFIG_CMD_BMODE add_board_boot_modes(board_boot_modes); #endif +#ifdef CONFIG_USB_EHCI_MX6 + imx_iomux_v3_setup_multiple_pads( + usb_otg_pads, ARRAY_SIZE(usb_otg_pads)); +#endif return 0; }
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h index 7089378..e5828e0 100644 --- a/include/configs/tbs2910.h +++ b/include/configs/tbs2910.h @@ -163,6 +163,7 @@ #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_MX6 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 +#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB_MASS_STORAGE

Only enable graphical output for stdout/stderr (and a usb keyboard for stdin) when a hdmi device is detected. Serial console is always enabled for stdin/stdout/stderr.
Signed-off-by: Soeren Moch smoch@web.de --- Cc: Stefano Babic sbabic@denx.de --- include/configs/tbs2910.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h index e5828e0..ea4666d 100644 --- a/include/configs/tbs2910.h +++ b/include/configs/tbs2910.h @@ -183,7 +183,13 @@ #ifdef CONFIG_USB_KEYBOARD #define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE #define CONFIG_SYS_STDIO_DEREGISTER -#define CONFIG_PREBOOT "if hdmidet; then usb start; fi" +#define CONFIG_PREBOOT \ + "if hdmidet; then " \ + "usb start; " \ + "run set_con_usb_hdmi; " \ + "else " \ + "run set_con_serial; " \ + "fi;" #endif /* CONFIG_USB_KEYBOARD */ #endif /* CONFIG_CMD_USB */
@@ -241,9 +247,12 @@ "bootm 0x10800000 0x10d00000\0" \ "console=ttymxc0\0" \ "fan=gpio set 92\0" \ - "stdin=serial,usbkbd\0" \ - "stdout=serial,vga\0" \ - "stderr=serial,vga\0" + "set_con_serial=setenv stdin serial; " \ + "setenv stdout serial; " \ + "setenv stderr serial;\0" \ + "set_con_usb_hdmi=setenv stdin serial,usbkbd; " \ + "setenv stdout serial,vga; " \ + "setenv stderr serial,vga;\0"
#define CONFIG_BOOTCOMMAND \ "mmc rescan; " \

On 05/05/2015 23:09, Soeren Moch wrote:
Only enable graphical output for stdout/stderr (and a usb keyboard for stdin) when a hdmi device is detected. Serial console is always enabled for stdin/stdout/stderr.
Signed-off-by: Soeren Moch smoch@web.de
Cc: Stefano Babic sbabic@denx.de
include/configs/tbs2910.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h index e5828e0..ea4666d 100644 --- a/include/configs/tbs2910.h +++ b/include/configs/tbs2910.h @@ -183,7 +183,13 @@ #ifdef CONFIG_USB_KEYBOARD #define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE #define CONFIG_SYS_STDIO_DEREGISTER -#define CONFIG_PREBOOT "if hdmidet; then usb start; fi" +#define CONFIG_PREBOOT \
- "if hdmidet; then " \
"usb start; " \
"run set_con_usb_hdmi; " \
- "else " \
"run set_con_serial; " \
- "fi;"
#endif /* CONFIG_USB_KEYBOARD */ #endif /* CONFIG_CMD_USB */
@@ -241,9 +247,12 @@ "bootm 0x10800000 0x10d00000\0" \ "console=ttymxc0\0" \ "fan=gpio set 92\0" \
- "stdin=serial,usbkbd\0" \
- "stdout=serial,vga\0" \
- "stderr=serial,vga\0"
- "set_con_serial=setenv stdin serial; " \
"setenv stdout serial; " \
"setenv stderr serial;\0" \
- "set_con_usb_hdmi=setenv stdin serial,usbkbd; " \
"setenv stdout serial,vga; " \
"setenv stderr serial,vga;\0"
#define CONFIG_BOOTCOMMAND \ "mmc rescan; " \
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Since there is a default CONFIG_SYS_PBSIZE definition in config_fallbacks.h, this setting is no longer required in board configurations.
Signed-off-by: Soeren Moch smoch@web.de --- Cc: Stefano Babic sbabic@denx.de --- include/configs/tbs2910.h | 2 -- 1 file changed, 2 deletions(-)
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h index ea4666d..9efb8c2 100644 --- a/include/configs/tbs2910.h +++ b/include/configs/tbs2910.h @@ -39,8 +39,6 @@ #define CONFIG_CMDLINE_EDITING #define CONFIG_SYS_MAXARGS 16 #define CONFIG_SYS_CBSIZE 1024 -#define CONFIG_SYS_PBSIZE \ - (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) #define CONFIG_SYS_HZ 1000
/* Physical Memory Map */

On 05/05/2015 23:09, Soeren Moch wrote:
Since there is a default CONFIG_SYS_PBSIZE definition in config_fallbacks.h, this setting is no longer required in board configurations.
Signed-off-by: Soeren Moch smoch@web.de
Cc: Stefano Babic sbabic@denx.de
include/configs/tbs2910.h | 2 -- 1 file changed, 2 deletions(-)
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h index ea4666d..9efb8c2 100644 --- a/include/configs/tbs2910.h +++ b/include/configs/tbs2910.h @@ -39,8 +39,6 @@ #define CONFIG_CMDLINE_EDITING #define CONFIG_SYS_MAXARGS 16 #define CONFIG_SYS_CBSIZE 1024 -#define CONFIG_SYS_PBSIZE \
- (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
#define CONFIG_SYS_HZ 1000
/* Physical Memory Map */
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Add emmc boot partition commands to be able to select the boot partition.
Signed-off-by: Soeren Moch smoch@web.de --- Cc: Stefano Babic sbabic@denx.de --- include/configs/tbs2910.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h index 9efb8c2..1f3c3d8 100644 --- a/include/configs/tbs2910.h +++ b/include/configs/tbs2910.h @@ -102,6 +102,7 @@ #define CONFIG_MMC #define CONFIG_CMD_MMC #define CONFIG_GENERIC_MMC +#define CONFIG_SUPPORT_EMMC_BOOT #define CONFIG_BOUNCE_BUFFER
/* Ethernet */

On 05/05/2015 23:09, Soeren Moch wrote:
Add emmc boot partition commands to be able to select the boot partition.
Signed-off-by: Soeren Moch smoch@web.de
Cc: Stefano Babic sbabic@denx.de
include/configs/tbs2910.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h index 9efb8c2..1f3c3d8 100644 --- a/include/configs/tbs2910.h +++ b/include/configs/tbs2910.h @@ -102,6 +102,7 @@ #define CONFIG_MMC #define CONFIG_CMD_MMC #define CONFIG_GENERIC_MMC +#define CONFIG_SUPPORT_EMMC_BOOT #define CONFIG_BOUNCE_BUFFER
/* Ethernet */
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Add CONFIG_CMD_EXT4_WRITE to enable ext4 write support.
Signed-off-by: Soeren Moch smoch@web.de --- Cc: Stefano Babic sbabic@denx.de --- include/configs/tbs2910.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h index 1f3c3d8..d0d6a30 100644 --- a/include/configs/tbs2910.h +++ b/include/configs/tbs2910.h @@ -83,6 +83,7 @@
/* Filesystems / image support */ #define CONFIG_CMD_EXT4 +#define CONFIG_CMD_EXT4_WRITE #define CONFIG_CMD_FAT #define CONFIG_DOS_PARTITION #define CONFIG_EFI_PARTITION

On 05/05/15 23:09, Soeren Moch wrote:
Add CONFIG_CMD_EXT4_WRITE to enable ext4 write support.
Signed-off-by: Soeren Moch smoch@web.de
Cc: Stefano Babic sbabic@denx.de
include/configs/tbs2910.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h index 1f3c3d8..d0d6a30 100644 --- a/include/configs/tbs2910.h +++ b/include/configs/tbs2910.h @@ -83,6 +83,7 @@
/* Filesystems / image support */ #define CONFIG_CMD_EXT4 +#define CONFIG_CMD_EXT4_WRITE #define CONFIG_CMD_FAT #define CONFIG_DOS_PARTITION #define CONFIG_EFI_PARTITION
Stefano,
if the series [PATCH 0/10 v2] i.MX6: move duplicated options to mx6_common to standardise mx6 config http://lists.denx.de/pipermail/u-boot/2015-May/213883.html
will be applied (what I think would be a good idea), then please drop this patch.
Thanks, Soeren

On 05/05/2015 23:09, Soeren Moch wrote:
Add support for USB OTG host mode. Only high speed devices supported so far (e.g. usb 2.0 hub required to connect a keyboard).
Signed-off-by: Soeren Moch smoch@web.de
Cc: Stefano Babic sbabic@denx.de
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic
participants (2)
-
Soeren Moch
-
Stefano Babic