linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 0/2] mfd: omap-usb-tll: Fixes for USB TLL mode
@ 2017-04-15 17:05 Tony Lindgren
  2017-04-15 17:05 ` [PATCH 1/2] mfd: omap-usb-tll: Fix inverted bit use " Tony Lindgren
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Tony Lindgren @ 2017-04-15 17:05 UTC (permalink / raw)
  To: Lee Jones, Samuel Ortiz; +Cc: linux-kernel, linux-omap

Hi

Here's v2 of this that move the enabling of ULPIAUTOIDLE bit into a
separate patch as suggested by Roger Quadros <rogerq@ti.com>.

Both patches can wait for v4.12.

Regards,

Tony


Tony Lindgren (2):
  mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode
  mfd: omap-usb-tll: Configure ULPIAUTOIDLE

 drivers/mfd/omap-usb-tll.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

-- 
2.12.2

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

* [PATCH 1/2] mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode
  2017-04-15 17:05 [PATCHv2 0/2] mfd: omap-usb-tll: Fixes for USB TLL mode Tony Lindgren
@ 2017-04-15 17:05 ` Tony Lindgren
  2017-04-18  8:30   ` Roger Quadros
  2017-04-24 11:40   ` Lee Jones
  2017-04-15 17:05 ` [PATCH 2/2] mfd: omap-usb-tll: Configure ULPIAUTOIDLE Tony Lindgren
  2017-04-24 11:43 ` [PATCHv2 0/2] mfd: omap-usb-tll: Fixes for USB TLL mode Lee Jones
  2 siblings, 2 replies; 9+ messages in thread
From: Tony Lindgren @ 2017-04-15 17:05 UTC (permalink / raw)
  To: Lee Jones, Samuel Ortiz
  Cc: linux-kernel, linux-omap, Felipe Balbi, Keshava Munegowda,
	Marcel Partap, Michael Scott, Roger Quadros, Sebastian Reichel

Commit 16fa3dc75c22 ("mfd: omap-usb-tll: HOST TLL platform driver")
added support for USB TLL, but uses OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF
bit the wrong way. The comments in the code are correct, but the inverted
use of OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF causes the register to be
enabled instead of disabled unlike what the comments say.

Without this change the Wrigley 3G LTE modem on droid 4 EHCI bus can
be only pinged few times before it stops responding.

Fixes: 16fa3dc75c22 ("mfd: omap-usb-tll: HOST TLL platform driver")
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Keshava Munegowda <keshava_mgowda@ti.com>
Cc: Marcel Partap <mpartap@gmx.net>
Cc: Michael Scott <michael.scott@linaro.org>
Cc: Roger Quadros <rogerq@ti.com>
Cc: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/mfd/omap-usb-tll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
--- a/drivers/mfd/omap-usb-tll.c
+++ b/drivers/mfd/omap-usb-tll.c
@@ -377,8 +377,8 @@ int omap_tll_init(struct usbhs_omap_platform_data *pdata)
 				 * and use SDR Mode
 				 */
 				reg &= ~(OMAP_TLL_CHANNEL_CONF_UTMIAUTOIDLE
-					| OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF
 					| OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE);
+				reg |= OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF;
 			} else if (pdata->port_mode[i] ==
 					OMAP_EHCI_PORT_MODE_HSIC) {
 				/*
-- 
2.12.2

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

* [PATCH 2/2] mfd: omap-usb-tll: Configure ULPIAUTOIDLE
  2017-04-15 17:05 [PATCHv2 0/2] mfd: omap-usb-tll: Fixes for USB TLL mode Tony Lindgren
  2017-04-15 17:05 ` [PATCH 1/2] mfd: omap-usb-tll: Fix inverted bit use " Tony Lindgren
@ 2017-04-15 17:05 ` Tony Lindgren
  2017-04-18  8:31   ` Roger Quadros
  2017-04-24 11:41   ` Lee Jones
  2017-04-24 11:43 ` [PATCHv2 0/2] mfd: omap-usb-tll: Fixes for USB TLL mode Lee Jones
  2 siblings, 2 replies; 9+ messages in thread
From: Tony Lindgren @ 2017-04-15 17:05 UTC (permalink / raw)
  To: Lee Jones, Samuel Ortiz
  Cc: linux-kernel, linux-omap, Felipe Balbi, Keshava Munegowda,
	Marcel Partap, Michael Scott, Roger Quadros, Sebastian Reichel

The idle mode needs to be only disabled for UTMIAUTOIDLE while
ULPIAUTOIDLE can be enabled.

This matches the TLL_CHANNEL_CONF_i register configuration for ehci-tll
in the Motorola Linux kernel tree for Wrigley 3G LTE modem on droid 4
and the modem still stays responsive.

Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Keshava Munegowda <keshava_mgowda@ti.com>
Cc: Marcel Partap <mpartap@gmx.net>
Cc: Michael Scott <michael.scott@linaro.org>
Cc: Roger Quadros <rogerq@ti.com>
Cc: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/mfd/omap-usb-tll.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
--- a/drivers/mfd/omap-usb-tll.c
+++ b/drivers/mfd/omap-usb-tll.c
@@ -373,12 +373,13 @@ int omap_tll_init(struct usbhs_omap_platform_data *pdata)
 			} else if (pdata->port_mode[i] ==
 					OMAP_EHCI_PORT_MODE_TLL) {
 				/*
-				 * Disable AutoIdle, BitStuffing
-				 * and use SDR Mode
+				 * Disable UTMI AutoIdle, BitStuffing
+				 * and use SDR Mode. Enable ULPI AutoIdle.
 				 */
 				reg &= ~(OMAP_TLL_CHANNEL_CONF_UTMIAUTOIDLE
 					| OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE);
 				reg |= OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF;
+				reg |= OMAP_TLL_CHANNEL_CONF_ULPI_ULPIAUTOIDLE;
 			} else if (pdata->port_mode[i] ==
 					OMAP_EHCI_PORT_MODE_HSIC) {
 				/*
-- 
2.12.2

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

* Re: [PATCH 1/2] mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode
  2017-04-15 17:05 ` [PATCH 1/2] mfd: omap-usb-tll: Fix inverted bit use " Tony Lindgren
@ 2017-04-18  8:30   ` Roger Quadros
  2017-04-24 11:40   ` Lee Jones
  1 sibling, 0 replies; 9+ messages in thread
From: Roger Quadros @ 2017-04-18  8:30 UTC (permalink / raw)
  To: Tony Lindgren, Lee Jones, Samuel Ortiz
  Cc: linux-kernel, linux-omap, Felipe Balbi, Marcel Partap,
	Michael Scott, Sebastian Reichel

On 15/04/17 20:05, Tony Lindgren wrote:
> Commit 16fa3dc75c22 ("mfd: omap-usb-tll: HOST TLL platform driver")
> added support for USB TLL, but uses OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF
> bit the wrong way. The comments in the code are correct, but the inverted
> use of OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF causes the register to be
> enabled instead of disabled unlike what the comments say.
> 
> Without this change the Wrigley 3G LTE modem on droid 4 EHCI bus can
> be only pinged few times before it stops responding.
> 
> Fixes: 16fa3dc75c22 ("mfd: omap-usb-tll: HOST TLL platform driver")
> Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
> Cc: Keshava Munegowda <keshava_mgowda@ti.com>
> Cc: Marcel Partap <mpartap@gmx.net>
> Cc: Michael Scott <michael.scott@linaro.org>
> Cc: Roger Quadros <rogerq@ti.com>
> Cc: Sebastian Reichel <sre@kernel.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Acked-by: Roger Quadros <rogerq@ti.com>

> ---
>  drivers/mfd/omap-usb-tll.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
> --- a/drivers/mfd/omap-usb-tll.c
> +++ b/drivers/mfd/omap-usb-tll.c
> @@ -377,8 +377,8 @@ int omap_tll_init(struct usbhs_omap_platform_data *pdata)
>  				 * and use SDR Mode
>  				 */
>  				reg &= ~(OMAP_TLL_CHANNEL_CONF_UTMIAUTOIDLE
> -					| OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF
>  					| OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE);
> +				reg |= OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF;
>  			} else if (pdata->port_mode[i] ==
>  					OMAP_EHCI_PORT_MODE_HSIC) {
>  				/*
> 

cheers,
-roger

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

* Re: [PATCH 2/2] mfd: omap-usb-tll: Configure ULPIAUTOIDLE
  2017-04-15 17:05 ` [PATCH 2/2] mfd: omap-usb-tll: Configure ULPIAUTOIDLE Tony Lindgren
@ 2017-04-18  8:31   ` Roger Quadros
  2017-04-24 11:41   ` Lee Jones
  1 sibling, 0 replies; 9+ messages in thread
From: Roger Quadros @ 2017-04-18  8:31 UTC (permalink / raw)
  To: Tony Lindgren, Lee Jones, Samuel Ortiz
  Cc: linux-kernel, linux-omap, Felipe Balbi, Marcel Partap,
	Michael Scott, Sebastian Reichel

On 15/04/17 20:05, Tony Lindgren wrote:
> The idle mode needs to be only disabled for UTMIAUTOIDLE while
> ULPIAUTOIDLE can be enabled.
> 
> This matches the TLL_CHANNEL_CONF_i register configuration for ehci-tll
> in the Motorola Linux kernel tree for Wrigley 3G LTE modem on droid 4
> and the modem still stays responsive.
> 
> Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
> Cc: Keshava Munegowda <keshava_mgowda@ti.com>
> Cc: Marcel Partap <mpartap@gmx.net>
> Cc: Michael Scott <michael.scott@linaro.org>
> Cc: Roger Quadros <rogerq@ti.com>
> Cc: Sebastian Reichel <sre@kernel.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Acked-by: Roger Quadros <rogerq@ti.com>

> ---
>  drivers/mfd/omap-usb-tll.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
> --- a/drivers/mfd/omap-usb-tll.c
> +++ b/drivers/mfd/omap-usb-tll.c
> @@ -373,12 +373,13 @@ int omap_tll_init(struct usbhs_omap_platform_data *pdata)
>  			} else if (pdata->port_mode[i] ==
>  					OMAP_EHCI_PORT_MODE_TLL) {
>  				/*
> -				 * Disable AutoIdle, BitStuffing
> -				 * and use SDR Mode
> +				 * Disable UTMI AutoIdle, BitStuffing
> +				 * and use SDR Mode. Enable ULPI AutoIdle.
>  				 */
>  				reg &= ~(OMAP_TLL_CHANNEL_CONF_UTMIAUTOIDLE
>  					| OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE);
>  				reg |= OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF;
> +				reg |= OMAP_TLL_CHANNEL_CONF_ULPI_ULPIAUTOIDLE;
>  			} else if (pdata->port_mode[i] ==
>  					OMAP_EHCI_PORT_MODE_HSIC) {
>  				/*
> 

cheers,
-roger

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

* Re: [PATCH 1/2] mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode
  2017-04-15 17:05 ` [PATCH 1/2] mfd: omap-usb-tll: Fix inverted bit use " Tony Lindgren
  2017-04-18  8:30   ` Roger Quadros
@ 2017-04-24 11:40   ` Lee Jones
  1 sibling, 0 replies; 9+ messages in thread
From: Lee Jones @ 2017-04-24 11:40 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Samuel Ortiz, linux-kernel, linux-omap, Felipe Balbi,
	Keshava Munegowda, Marcel Partap, Michael Scott, Roger Quadros,
	Sebastian Reichel

On Sat, 15 Apr 2017, Tony Lindgren wrote:

> Commit 16fa3dc75c22 ("mfd: omap-usb-tll: HOST TLL platform driver")
> added support for USB TLL, but uses OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF
> bit the wrong way. The comments in the code are correct, but the inverted
> use of OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF causes the register to be
> enabled instead of disabled unlike what the comments say.
> 
> Without this change the Wrigley 3G LTE modem on droid 4 EHCI bus can
> be only pinged few times before it stops responding.
> 
> Fixes: 16fa3dc75c22 ("mfd: omap-usb-tll: HOST TLL platform driver")
> Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
> Cc: Keshava Munegowda <keshava_mgowda@ti.com>
> Cc: Marcel Partap <mpartap@gmx.net>
> Cc: Michael Scott <michael.scott@linaro.org>
> Cc: Roger Quadros <rogerq@ti.com>
> Cc: Sebastian Reichel <sre@kernel.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  drivers/mfd/omap-usb-tll.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

> diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
> --- a/drivers/mfd/omap-usb-tll.c
> +++ b/drivers/mfd/omap-usb-tll.c
> @@ -377,8 +377,8 @@ int omap_tll_init(struct usbhs_omap_platform_data *pdata)
>  				 * and use SDR Mode
>  				 */
>  				reg &= ~(OMAP_TLL_CHANNEL_CONF_UTMIAUTOIDLE
> -					| OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF
>  					| OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE);
> +				reg |= OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF;
>  			} else if (pdata->port_mode[i] ==
>  					OMAP_EHCI_PORT_MODE_HSIC) {
>  				/*

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 2/2] mfd: omap-usb-tll: Configure ULPIAUTOIDLE
  2017-04-15 17:05 ` [PATCH 2/2] mfd: omap-usb-tll: Configure ULPIAUTOIDLE Tony Lindgren
  2017-04-18  8:31   ` Roger Quadros
@ 2017-04-24 11:41   ` Lee Jones
  1 sibling, 0 replies; 9+ messages in thread
From: Lee Jones @ 2017-04-24 11:41 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Samuel Ortiz, linux-kernel, linux-omap, Felipe Balbi,
	Keshava Munegowda, Marcel Partap, Michael Scott, Roger Quadros,
	Sebastian Reichel

On Sat, 15 Apr 2017, Tony Lindgren wrote:

> The idle mode needs to be only disabled for UTMIAUTOIDLE while
> ULPIAUTOIDLE can be enabled.
> 
> This matches the TLL_CHANNEL_CONF_i register configuration for ehci-tll
> in the Motorola Linux kernel tree for Wrigley 3G LTE modem on droid 4
> and the modem still stays responsive.
> 
> Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
> Cc: Keshava Munegowda <keshava_mgowda@ti.com>
> Cc: Marcel Partap <mpartap@gmx.net>
> Cc: Michael Scott <michael.scott@linaro.org>
> Cc: Roger Quadros <rogerq@ti.com>
> Cc: Sebastian Reichel <sre@kernel.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  drivers/mfd/omap-usb-tll.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
> --- a/drivers/mfd/omap-usb-tll.c
> +++ b/drivers/mfd/omap-usb-tll.c
> @@ -373,12 +373,13 @@ int omap_tll_init(struct usbhs_omap_platform_data *pdata)
>  			} else if (pdata->port_mode[i] ==
>  					OMAP_EHCI_PORT_MODE_TLL) {
>  				/*
> -				 * Disable AutoIdle, BitStuffing
> -				 * and use SDR Mode
> +				 * Disable UTMI AutoIdle, BitStuffing
> +				 * and use SDR Mode. Enable ULPI AutoIdle.
>  				 */
>  				reg &= ~(OMAP_TLL_CHANNEL_CONF_UTMIAUTOIDLE
>  					| OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE);
>  				reg |= OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF;
> +				reg |= OMAP_TLL_CHANNEL_CONF_ULPI_ULPIAUTOIDLE;
>  			} else if (pdata->port_mode[i] ==
>  					OMAP_EHCI_PORT_MODE_HSIC) {
>  				/*

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCHv2 0/2] mfd: omap-usb-tll: Fixes for USB TLL mode
  2017-04-15 17:05 [PATCHv2 0/2] mfd: omap-usb-tll: Fixes for USB TLL mode Tony Lindgren
  2017-04-15 17:05 ` [PATCH 1/2] mfd: omap-usb-tll: Fix inverted bit use " Tony Lindgren
  2017-04-15 17:05 ` [PATCH 2/2] mfd: omap-usb-tll: Configure ULPIAUTOIDLE Tony Lindgren
@ 2017-04-24 11:43 ` Lee Jones
  2017-04-24 14:15   ` Tony Lindgren
  2 siblings, 1 reply; 9+ messages in thread
From: Lee Jones @ 2017-04-24 11:43 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Samuel Ortiz, linux-kernel, linux-omap

On Sat, 15 Apr 2017, Tony Lindgren wrote:

> Hi
> 
> Here's v2 of this that move the enabling of ULPIAUTOIDLE bit into a
> separate patch as suggested by Roger Quadros <rogerq@ti.com>.
> 
> Both patches can wait for v4.12.
> 
> Regards,
> 
> Tony
> 
> 
> Tony Lindgren (2):
>   mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode
>   mfd: omap-usb-tll: Configure ULPIAUTOIDLE
> 
>  drivers/mfd/omap-usb-tll.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

FYI: I don't know where you're getting Sam's email from, but I assume
that after being MFD-free for several years now, I'm assuming he's
lost interest in the subsystem.  Might be about time to stop CC'ing
him. :)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCHv2 0/2] mfd: omap-usb-tll: Fixes for USB TLL mode
  2017-04-24 11:43 ` [PATCHv2 0/2] mfd: omap-usb-tll: Fixes for USB TLL mode Lee Jones
@ 2017-04-24 14:15   ` Tony Lindgren
  0 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2017-04-24 14:15 UTC (permalink / raw)
  To: Lee Jones; +Cc: Samuel Ortiz, linux-kernel, linux-omap

* Lee Jones <lee.jones@linaro.org> [170424 04:46]:
> FYI: I don't know where you're getting Sam's email from, but I assume
> that after being MFD-free for several years now, I'm assuming he's
> lost interest in the subsystem.  Might be about time to stop CC'ing
> him. :)

OK fine with me, I'll stop spamming him then next time.

Tony

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

end of thread, other threads:[~2017-04-24 14:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-15 17:05 [PATCHv2 0/2] mfd: omap-usb-tll: Fixes for USB TLL mode Tony Lindgren
2017-04-15 17:05 ` [PATCH 1/2] mfd: omap-usb-tll: Fix inverted bit use " Tony Lindgren
2017-04-18  8:30   ` Roger Quadros
2017-04-24 11:40   ` Lee Jones
2017-04-15 17:05 ` [PATCH 2/2] mfd: omap-usb-tll: Configure ULPIAUTOIDLE Tony Lindgren
2017-04-18  8:31   ` Roger Quadros
2017-04-24 11:41   ` Lee Jones
2017-04-24 11:43 ` [PATCHv2 0/2] mfd: omap-usb-tll: Fixes for USB TLL mode Lee Jones
2017-04-24 14:15   ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).