Skip to contentSkip to conversation

mfd: omap-usb-tll: Fixes for USB TLL mode

PATCH Applied Tony Lindgren 3 participants 9 messages Apr 15, 2017 – Apr 24, 2017

Subsystems (2)
lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

v2 cover mfd: omap-usb-tll: Fixes for USB TLL mode

Hi

Here's v2 of this that move the enabling of ULPIAUTOIDLE bit into a separate patch as suggested by Roger Quadros <[email protected]>.

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(-)
Signature · 1 line
2.12.2
author maintainer
#1 lore raw

PATCH v2 1/2 mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode

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 <[email protected]>
Cc Keshava Munegowda <[email protected]>
Cc Marcel Partap <[email protected]>
Cc Michael Scott <[email protected]>
Cc Roger Quadros <[email protected]>
Cc Sebastian Reichel <[email protected]>
---
 drivers/mfd/omap-usb-tll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/omap-usb-tll.c +1 -1
@@ -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) {
 				/*
Signature · 1 line
2.12.2
Acked-by on v2 1/2
#2 lore raw

Re: [PATCH 1/2] mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode

Quoted 9 lines · Tony Lindgren

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.

Quoted 8 lines
Fixes 16fa3dc75c22 ("mfd: omap-usb-tll: HOST TLL platform driver")
Cc Felipe Balbi <[email protected]>
Cc Keshava Munegowda <[email protected]>
Cc Marcel Partap <[email protected]>
Cc Michael Scott <[email protected]>
Cc Roger Quadros <[email protected]>
Cc Sebastian Reichel <[email protected]>
Quoted 9 lines
---
 drivers/mfd/omap-usb-tll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

drivers/mfd/omap-usb-tll.c int omap_tll_init(struct usbhs_omap_platform_data *pdata) · line 384

Quoted 9 lines
drivers/mfd/omap-usb-tll.c +1 -1
@@ -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

Applied
#3 lore raw

Re: [PATCH 1/2] mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode

In reply to Tony Lindgren
Quoted 17 lines · Tony Lindgren

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 <[email protected]>
Cc Keshava Munegowda <[email protected]>
Cc Marcel Partap <[email protected]>
Cc Michael Scott <[email protected]>
Cc Roger Quadros <[email protected]>
Cc Sebastian Reichel <[email protected]>
Quoted 3 lines
---
 drivers/mfd/omap-usb-tll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Quoted 13 lines
drivers/mfd/omap-usb-tll.c +1 -1
@@ -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) {
 				/*
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
author maintainer
#4 lore raw

PATCH v2 2/2 mfd: omap-usb-tll: Configure ULPIAUTOIDLE

In reply to Tony Lindgren

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 <[email protected]>
Cc Keshava Munegowda <[email protected]>
Cc Marcel Partap <[email protected]>
Cc Michael Scott <[email protected]>
Cc Roger Quadros <[email protected]>
Cc Sebastian Reichel <[email protected]>
---
 drivers/mfd/omap-usb-tll.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/mfd/omap-usb-tll.c +3 -2
@@ -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) {
 				/*
Signature · 1 line
2.12.2
Acked-by on v2 2/2
#5 lore raw

Re: [PATCH 2/2] mfd: omap-usb-tll: Configure ULPIAUTOIDLE

Quoted 7 lines · Tony Lindgren

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.

Quoted 7 lines
Cc Felipe Balbi <[email protected]>
Cc Keshava Munegowda <[email protected]>
Cc Marcel Partap <[email protected]>
Cc Michael Scott <[email protected]>
Cc Roger Quadros <[email protected]>
Cc Sebastian Reichel <[email protected]>
Quoted 14 lines
---
 drivers/mfd/omap-usb-tll.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/mfd/omap-usb-tll.c +0 -2
@@ -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

drivers/mfd/omap-usb-tll.c int omap_tll_init(struct usbhs_omap_platform_data *pdata) · line 385

Quoted 10 lines
drivers/mfd/omap-usb-tll.c +3 -0
+				 * 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

Applied
#6 lore raw

Re: [PATCH 2/2] mfd: omap-usb-tll: Configure ULPIAUTOIDLE

In reply to Tony Lindgren
Quoted 14 lines · Tony Lindgren

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 <[email protected]>
Cc Keshava Munegowda <[email protected]>
Cc Marcel Partap <[email protected]>
Cc Michael Scott <[email protected]>
Cc Roger Quadros <[email protected]>
Cc Sebastian Reichel <[email protected]>
Quoted 3 lines
---
 drivers/mfd/omap-usb-tll.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Applied, thanks.

Quoted 19 lines
drivers/mfd/omap-usb-tll.c +3 -2
@@ -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) {
 				/*
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#7 lore raw
In reply to Tony Lindgren
Quoted 12 lines · Tony Lindgren

Hi

Here's v2 of this that move the enabling of ULPIAUTOIDLE bit into a separate patch as suggested by Roger Quadros <[email protected]>.

Both patches can wait for v4.12.

Regards,

Tony

Quoted 6 lines

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. :)

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
author maintainer
#8 lore raw
Quoted 4 lines · Lee Jones

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