public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/3] cm-fx6 maintenance
@ 2015-08-30 12:36 Nikita Kiryanov
  2015-08-30 12:36 ` [U-Boot] [PATCH 1/3] arm: mx6: cm-fx6: force host mode on usb controller Nikita Kiryanov
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Nikita Kiryanov @ 2015-08-30 12:36 UTC (permalink / raw)
  To: u-boot

This is a collection of small fixes and improvements to cm-fx6.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>

Nikita Kiryanov (3):
  arm: mx6: cm-fx6: force host mode on usb controller
  arm: mx6: cm-fx6: print PCB revision
  arm: mx6: cm-fx6: switch to usb kbd polling via int queue

 board/compulab/cm_fx6/cm_fx6.c | 13 +++++++++++++
 configs/cm_fx6_defconfig       |  2 +-
 include/configs/cm_fx6.h       |  1 +
 3 files changed, 15 insertions(+), 1 deletion(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 1/3] arm: mx6: cm-fx6: force host mode on usb controller
  2015-08-30 12:36 [U-Boot] [PATCH 0/3] cm-fx6 maintenance Nikita Kiryanov
@ 2015-08-30 12:36 ` Nikita Kiryanov
  2015-08-30 13:33   ` Igor Grinberg
  2015-08-30 12:36 ` [U-Boot] [PATCH 2/3] arm: mx6: cm-fx6: print PCB revision Nikita Kiryanov
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Nikita Kiryanov @ 2015-08-30 12:36 UTC (permalink / raw)
  To: u-boot

On some CM-FX6 modules U-Boot attempts to configure the usb0 controller in
device mode, which renders it unavailable:
	USB0:   Port not available.
and also causes usb stop to report an error
	EHCI failed to shut down host controller.

This happens mostly on MX6 Dual based modules, and is caused by the USBPHY_CTRL
register reporting USBPHY_CTRL_OTG_ID to be 1, even when it is pulled down.
Since we do not support device mode in cm-fx6 u-boot, force all controllers to
be configured as hosts.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
---
 board/compulab/cm_fx6/cm_fx6.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index def821c..668d221 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -14,6 +14,7 @@
 #include <miiphy.h>
 #include <netdev.h>
 #include <errno.h>
+#include <usb.h>
 #include <fdt_support.h>
 #include <sata.h>
 #include <splash.h>
@@ -349,6 +350,11 @@ static int cm_fx6_setup_usb_otg(void)
 	return gpio_direction_output(SB_FX6_USB_OTG_PWR, 0);
 }
 
+int board_usb_phy_mode(int port)
+{
+	return USB_INIT_HOST;
+}
+
 int board_ehci_hcd_init(int port)
 {
 	int ret;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 2/3] arm: mx6: cm-fx6: print PCB revision
  2015-08-30 12:36 [U-Boot] [PATCH 0/3] cm-fx6 maintenance Nikita Kiryanov
  2015-08-30 12:36 ` [U-Boot] [PATCH 1/3] arm: mx6: cm-fx6: force host mode on usb controller Nikita Kiryanov
@ 2015-08-30 12:36 ` Nikita Kiryanov
  2015-08-30 13:33   ` Igor Grinberg
  2015-08-30 12:36 ` [U-Boot] [PATCH 3/3] arm: mx6: cm-fx6: switch to usb kbd polling via int queue Nikita Kiryanov
  2015-08-31 16:29 ` [U-Boot] [PATCH 0/3] cm-fx6 maintenance Stefano Babic
  3 siblings, 1 reply; 8+ messages in thread
From: Nikita Kiryanov @ 2015-08-30 12:36 UTC (permalink / raw)
  To: u-boot

Print board revision for cm-fx6.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
---
 board/compulab/cm_fx6/cm_fx6.c | 7 +++++++
 include/configs/cm_fx6.h       | 1 +
 2 files changed, 8 insertions(+)

diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index 668d221..3ad1216 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -645,6 +645,13 @@ int checkboard(void)
 	return 0;
 }
 
+int misc_init_r(void)
+{
+	cl_print_pcb_info();
+
+	return 0;
+}
+
 void dram_init_banksize(void)
 {
 	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index ddf6b5f..12734a1 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -224,6 +224,7 @@
 #define CONFIG_SYS_MALLOC_LEN			(10 * 1024 * 1024)
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	800 /* 400 KB */
 #define CONFIG_OF_BOARD_SETUP
+#define CONFIG_MISC_INIT_R
 
 /* SPL */
 #include "imx6_spl.h"
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 3/3] arm: mx6: cm-fx6: switch to usb kbd polling via int queue
  2015-08-30 12:36 [U-Boot] [PATCH 0/3] cm-fx6 maintenance Nikita Kiryanov
  2015-08-30 12:36 ` [U-Boot] [PATCH 1/3] arm: mx6: cm-fx6: force host mode on usb controller Nikita Kiryanov
  2015-08-30 12:36 ` [U-Boot] [PATCH 2/3] arm: mx6: cm-fx6: print PCB revision Nikita Kiryanov
@ 2015-08-30 12:36 ` Nikita Kiryanov
  2015-08-30 13:34   ` Igor Grinberg
  2015-08-31 16:29 ` [U-Boot] [PATCH 0/3] cm-fx6 maintenance Stefano Babic
  3 siblings, 1 reply; 8+ messages in thread
From: Nikita Kiryanov @ 2015-08-30 12:36 UTC (permalink / raw)
  To: u-boot

CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE works better than
CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP (keyboards that previously didn't
work such as Microsoft Comfort Curve 1000 now do work, and it's also faster).

Switch to CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
---
 configs/cm_fx6_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
index 21c35e3..314eb1c 100644
--- a/configs/cm_fx6_defconfig
+++ b/configs/cm_fx6_defconfig
@@ -28,5 +28,5 @@ CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
-CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_SYS_PROMPT="CM-FX6 # "
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 1/3] arm: mx6: cm-fx6: force host mode on usb controller
  2015-08-30 12:36 ` [U-Boot] [PATCH 1/3] arm: mx6: cm-fx6: force host mode on usb controller Nikita Kiryanov
@ 2015-08-30 13:33   ` Igor Grinberg
  0 siblings, 0 replies; 8+ messages in thread
From: Igor Grinberg @ 2015-08-30 13:33 UTC (permalink / raw)
  To: u-boot



On 08/30/15 15:36, Nikita Kiryanov wrote:
> On some CM-FX6 modules U-Boot attempts to configure the usb0 controller in
> device mode, which renders it unavailable:
> 	USB0:   Port not available.
> and also causes usb stop to report an error
> 	EHCI failed to shut down host controller.
> 
> This happens mostly on MX6 Dual based modules, and is caused by the USBPHY_CTRL
> register reporting USBPHY_CTRL_OTG_ID to be 1, even when it is pulled down.
> Since we do not support device mode in cm-fx6 u-boot, force all controllers to
> be configured as hosts.
> 
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>

Acked-by: Igor Grinberg <grinberg@compulab.co.il>

> ---
>  board/compulab/cm_fx6/cm_fx6.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
> index def821c..668d221 100644
> --- a/board/compulab/cm_fx6/cm_fx6.c
> +++ b/board/compulab/cm_fx6/cm_fx6.c
> @@ -14,6 +14,7 @@
>  #include <miiphy.h>
>  #include <netdev.h>
>  #include <errno.h>
> +#include <usb.h>
>  #include <fdt_support.h>
>  #include <sata.h>
>  #include <splash.h>
> @@ -349,6 +350,11 @@ static int cm_fx6_setup_usb_otg(void)
>  	return gpio_direction_output(SB_FX6_USB_OTG_PWR, 0);
>  }
>  
> +int board_usb_phy_mode(int port)
> +{
> +	return USB_INIT_HOST;
> +}
> +
>  int board_ehci_hcd_init(int port)
>  {
>  	int ret;
> 

-- 
Regards,
Igor.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 2/3] arm: mx6: cm-fx6: print PCB revision
  2015-08-30 12:36 ` [U-Boot] [PATCH 2/3] arm: mx6: cm-fx6: print PCB revision Nikita Kiryanov
@ 2015-08-30 13:33   ` Igor Grinberg
  0 siblings, 0 replies; 8+ messages in thread
From: Igor Grinberg @ 2015-08-30 13:33 UTC (permalink / raw)
  To: u-boot



On 08/30/15 15:36, Nikita Kiryanov wrote:
> Print board revision for cm-fx6.
> 
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>

Acked-by: Igor Grinberg <grinberg@compulab.co.il>

> ---
>  board/compulab/cm_fx6/cm_fx6.c | 7 +++++++
>  include/configs/cm_fx6.h       | 1 +
>  2 files changed, 8 insertions(+)
> 
> diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
> index 668d221..3ad1216 100644
> --- a/board/compulab/cm_fx6/cm_fx6.c
> +++ b/board/compulab/cm_fx6/cm_fx6.c
> @@ -645,6 +645,13 @@ int checkboard(void)
>  	return 0;
>  }
>  
> +int misc_init_r(void)
> +{
> +	cl_print_pcb_info();
> +
> +	return 0;
> +}
> +
>  void dram_init_banksize(void)
>  {
>  	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
> diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
> index ddf6b5f..12734a1 100644
> --- a/include/configs/cm_fx6.h
> +++ b/include/configs/cm_fx6.h
> @@ -224,6 +224,7 @@
>  #define CONFIG_SYS_MALLOC_LEN			(10 * 1024 * 1024)
>  #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	800 /* 400 KB */
>  #define CONFIG_OF_BOARD_SETUP
> +#define CONFIG_MISC_INIT_R
>  
>  /* SPL */
>  #include "imx6_spl.h"
> 

-- 
Regards,
Igor.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 3/3] arm: mx6: cm-fx6: switch to usb kbd polling via int queue
  2015-08-30 12:36 ` [U-Boot] [PATCH 3/3] arm: mx6: cm-fx6: switch to usb kbd polling via int queue Nikita Kiryanov
@ 2015-08-30 13:34   ` Igor Grinberg
  0 siblings, 0 replies; 8+ messages in thread
From: Igor Grinberg @ 2015-08-30 13:34 UTC (permalink / raw)
  To: u-boot



On 08/30/15 15:36, Nikita Kiryanov wrote:
> CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE works better than
> CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP (keyboards that previously didn't
> work such as Microsoft Comfort Curve 1000 now do work, and it's also faster).
> 
> Switch to CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE.
> 
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>

Acked-by: Igor Grinberg <grinberg@compulab.co.il>

> ---
>  configs/cm_fx6_defconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
> index 21c35e3..314eb1c 100644
> --- a/configs/cm_fx6_defconfig
> +++ b/configs/cm_fx6_defconfig
> @@ -28,5 +28,5 @@ CONFIG_USB=y
>  CONFIG_USB_EHCI_HCD=y
>  CONFIG_USB_STORAGE=y
>  CONFIG_USB_KEYBOARD=y
> -CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
> +CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
>  CONFIG_SYS_PROMPT="CM-FX6 # "
> 

-- 
Regards,
Igor.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 0/3] cm-fx6 maintenance
  2015-08-30 12:36 [U-Boot] [PATCH 0/3] cm-fx6 maintenance Nikita Kiryanov
                   ` (2 preceding siblings ...)
  2015-08-30 12:36 ` [U-Boot] [PATCH 3/3] arm: mx6: cm-fx6: switch to usb kbd polling via int queue Nikita Kiryanov
@ 2015-08-31 16:29 ` Stefano Babic
  3 siblings, 0 replies; 8+ messages in thread
From: Stefano Babic @ 2015-08-31 16:29 UTC (permalink / raw)
  To: u-boot

Hi Nikita,

On 30/08/2015 14:36, Nikita Kiryanov wrote:
> This is a collection of small fixes and improvements to cm-fx6.
> 
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> 
> Nikita Kiryanov (3):
>   arm: mx6: cm-fx6: force host mode on usb controller
>   arm: mx6: cm-fx6: print PCB revision
>   arm: mx6: cm-fx6: switch to usb kbd polling via int queue
> 
>  board/compulab/cm_fx6/cm_fx6.c | 13 +++++++++++++
>  configs/cm_fx6_defconfig       |  2 +-
>  include/configs/cm_fx6.h       |  1 +
>  3 files changed, 15 insertions(+), 1 deletion(-)
> 

Put all three patches in my queue to be applied.

Best regards,
Stefano Babic

-- 
=====================================================================
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
=====================================================================

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-08-31 16:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-30 12:36 [U-Boot] [PATCH 0/3] cm-fx6 maintenance Nikita Kiryanov
2015-08-30 12:36 ` [U-Boot] [PATCH 1/3] arm: mx6: cm-fx6: force host mode on usb controller Nikita Kiryanov
2015-08-30 13:33   ` Igor Grinberg
2015-08-30 12:36 ` [U-Boot] [PATCH 2/3] arm: mx6: cm-fx6: print PCB revision Nikita Kiryanov
2015-08-30 13:33   ` Igor Grinberg
2015-08-30 12:36 ` [U-Boot] [PATCH 3/3] arm: mx6: cm-fx6: switch to usb kbd polling via int queue Nikita Kiryanov
2015-08-30 13:34   ` Igor Grinberg
2015-08-31 16:29 ` [U-Boot] [PATCH 0/3] cm-fx6 maintenance Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox