tbs2910: support for usb otg host mode
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).
---
Cc: Stefano Babic <[email protected]>
--- board/tbs/tbs2910/tbs2910.c | 10 ++++++++++ include/configs/tbs2910.h | 1 + 2 files changed, 11 insertions(+)
board/tbs/tbs2910/tbs2910.c +10 -0
@@ -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 ; }
include/configs/tbs2910.h +1 -0
@@ -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
Signature · 1 line
1.9.1
PATCH 2/5 tbs2910: only enable vga output for stdout/stderr when hdmi detected
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.
---
Cc: Stefano Babic <[email protected]>
--- include/configs/tbs2910.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
include/configs/tbs2910.h +13 -4
@@ -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; " \
Signature · 1 line
1.9.1
PATCH 2/5 tbs2910: only enable vga output for stdout/stderr when hdmi detected
Quoted 37 lines · Soeren Moch
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 <[email protected]>---
Cc: Stefano Babic <[email protected]>--- include/configs/tbs2910.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)include/configs/tbs2910.h +7
-3@@ -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" \
include/configs/tbs2910.h line 258
Quoted 10 lines
include/configs/tbs2910.h +6
-1-"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
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 3/5 tbs2910: use default CONFIG_SYS_PBSIZE
In reply to Soeren MochSince there is a default CONFIG_SYS_PBSIZE definition in config_fallbacks.h, this setting is no longer required in board configurations.
---
Cc: Stefano Babic <[email protected]>
--- include/configs/tbs2910.h | 2 -- 1 file changed, 2 deletions(-)
include/configs/tbs2910.h +0 -2
@@ -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 */
Signature · 1 line
1.9.1
PATCH 3/5 tbs2910: use default CONFIG_SYS_PBSIZE
Quoted 16 lines · Soeren Moch
Since there is a default
CONFIG_SYS_PBSIZEdefinition inconfig_fallbacks.h, this setting is no longer required in board configurations.Signed-off-by Soeren Moch <[email protected]>---
Cc: Stefano Babic <[email protected]>--- include/configs/tbs2910.h | 2 -- 1 file changed, 2 deletions(-)include/configs/tbs2910.h +0
-0
include/configs/tbs2910.h line 44
Quoted 8 lines
include/configs/tbs2910.h +0
-2@@ -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
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 4/5 tbs2910: add CONFIG_SUPPORT_EMMC_BOOT
In reply to Soeren MochAdd emmc boot partition commands to be able to select the boot partition.
---
Cc: Stefano Babic <[email protected]>
--- include/configs/tbs2910.h | 1 + 1 file changed, 1 insertion(+)
include/configs/tbs2910.h +1 -0
@@ -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 */
Signature · 1 line
1.9.1
PATCH 4/5 tbs2910: add CONFIG_SUPPORT_EMMC_BOOT
Quoted 15 lines · Soeren Moch
Add emmc boot partition commands to be able to select the boot partition.
Signed-off-by Soeren Moch <[email protected]>---
Cc: Stefano Babic <[email protected]>--- include/configs/tbs2910.h | 1 + 1 file changed, 1 insertion(+)include/configs/tbs2910.h +0
-0
include/configs/tbs2910.h line 108
Quoted 7 lines
include/configs/tbs2910.h +1
-0@@ -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
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 5/5 tbs2910: add ext4 write support
In reply to Soeren MochAdd CONFIG_CMD_EXT4_WRITE to enable ext4 write support.
---
Cc: Stefano Babic <[email protected]>
--- include/configs/tbs2910.h | 1 + 1 file changed, 1 insertion(+)
include/configs/tbs2910.h +1 -0
@@ -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
Signature · 1 line
1.9.1
PATCH 5/5 tbs2910: add ext4 write support
Quoted 14 lines · Soeren Moch
Add
CONFIG_CMD_EXT4_WRITEto enable ext4 write support.Signed-off-by Soeren Moch <[email protected]>---
Cc: Stefano Babic <[email protected]>--- include/configs/tbs2910.h | 1 + 1 file changed, 1 insertion(+)include/configs/tbs2910.h +0
-0
include/configs/tbs2910.h line 89
Quoted 7 lines
include/configs/tbs2910.h +1
-0@@ -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
PATCH 1/5 tbs2910: support for usb otg host mode
In reply to Soeren MochQuoted 7 lines · Soeren Moch
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 <[email protected]>---
Cc: Stefano Babic <[email protected]>
---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================