Skip to contentSkip to conversation

Fixed gpio polarity of gpio USB-phy reset.

PATCH In review Juergen Kilb 5 participants 6 messages Apr 14, 2011 – Apr 18, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fixed gpio polarity of gpio USB-phy reset.

With commit 19403165 a main part of ehci-omap.c moved to drivers/mfd/omap-usb-host.c created by commit 17cdd29d. Due to this reorganisation the polarity used to reset the external USB phy changed and USB host doesn't recognize any devices.

---
 drivers/mfd/omap-usb-host.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/mfd/omap-usb-host.c +4 -4
index 53450f4..491cac5 100644
@@ -719,14 +719,14 @@ static int usbhs_enable(struct device *dev)
 			gpio_request(pdata->ehci_data->reset_gpio_port[0],
 						"USB1 PHY reset");
 			gpio_direction_output
-				(pdata->ehci_data->reset_gpio_port[0], 1);
+				(pdata->ehci_data->reset_gpio_port[0], 0);
 		}
 
 		if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) {
 			gpio_request(pdata->ehci_data->reset_gpio_port[1],
 						"USB2 PHY reset");
 			gpio_direction_output
-				(pdata->ehci_data->reset_gpio_port[1], 1);
+				(pdata->ehci_data->reset_gpio_port[1], 0);
 		}
 
 		/* Hold the PHY in RESET for enough time till DIR is high */
@@ -906,11 +906,11 @@ static int usbhs_enable(struct device *dev)
 
 		if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0]))
 			gpio_set_value
-				(pdata->ehci_data->reset_gpio_port[0], 0);
+				(pdata->ehci_data->reset_gpio_port[0], 1);
 
 		if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1]))
 			gpio_set_value
-				(pdata->ehci_data->reset_gpio_port[1], 0);
+				(pdata->ehci_data->reset_gpio_port[1], 1);
 	}
 
 end_count:
Signature · 1 line
1.7.0.4
#1 lore raw

Hi Juergen,

Quoted 5 lines · Juergen Kilb

With commit 19403165 a main part of ehci-omap.c moved to drivers/mfd/omap-usb-host.c created by commit 17cdd29d. Due to this reorganisation the polarity used to reset the external USB phy changed and USB host doesn't recognize any devices.

If that fix is correct, it looks like it should make its way to 2.6.39. Felipe, are you ok with this fix ?

Cheers,
Samuel.

Quoted 43 lines
---
 drivers/mfd/omap-usb-host.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/mfd/omap-usb-host.c +4 -4
index 53450f4..491cac5 100644
@@ -719,14 +719,14 @@ static int usbhs_enable(struct device *dev)
 			gpio_request(pdata->ehci_data->reset_gpio_port[0],
 						"USB1 PHY reset");
 			gpio_direction_output
-				(pdata->ehci_data->reset_gpio_port[0], 1);
+				(pdata->ehci_data->reset_gpio_port[0], 0);
 		}
 
 		if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) {
 			gpio_request(pdata->ehci_data->reset_gpio_port[1],
 						"USB2 PHY reset");
 			gpio_direction_output
-				(pdata->ehci_data->reset_gpio_port[1], 1);
+				(pdata->ehci_data->reset_gpio_port[1], 0);
 		}
 
 		/* Hold the PHY in RESET for enough time till DIR is high */
@@ -906,11 +906,11 @@ static int usbhs_enable(struct device *dev)
 
 		if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0]))
 			gpio_set_value
-				(pdata->ehci_data->reset_gpio_port[0], 0);
+				(pdata->ehci_data->reset_gpio_port[0], 1);
 
 		if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1]))
 			gpio_set_value
-				(pdata->ehci_data->reset_gpio_port[1], 0);
+				(pdata->ehci_data->reset_gpio_port[1], 1);
 	}
 
 end_count:
Signature · 1 line
1.7.0.4
Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/
Acked-by on v1 1/1
#2 lore raw
In reply to Juergen Kilb
Quoted 7 lines · Juergen Kilb

With commit 19403165 a main part of ehci-omap.c moved to drivers/mfd/omap-usb-host.c created by commit 17cdd29d. Due to this reorganisation the polarity used to reset the external USB phy changed and USB host doesn't recognize any devices.

Judging by how ehci-omap.c was before moving the code:

Signature · 1 line
balbi
Tested-by
#3 lore raw
Quoted 7 lines · Felipe Balbi
Quoted 6 lines · Juergen Kilb

With commit 19403165 a main part of ehci-omap.c moved to drivers/mfd/omap-usb-host.c created by commit 17cdd29d. Due to this reorganisation the polarity used to reset the external USB phy changed and USB host doesn't recognize any devices.

Quoted 5 lines
Quoted 1 line

Judging by how ehci-omap.c was before moving the code:

This fixes the issue on Overo:

Steve

#4 lore raw
In reply to Juergen Kilb

Hello.

Quoted 2 lines · Juergen Kilb

With commit 19403165 a main part of ehci-omap.c moved to drivers/mfd/omap-usb-host.c created by commit 17cdd29d.

Pelase also specify the summaries of those commits -- for the human readers.

Quoted 5 lines

Due to this reorganisation the polarity used to reset the external USB phy changed and USB host doesn't recognize any devices.

WBR, Sergei

#5 lore raw
In reply to Juergen Kilb

Hi Juergen,

Quoted 5 lines · Juergen Kilb

With commit 19403165 a main part of ehci-omap.c moved to drivers/mfd/omap-usb-host.c created by commit 17cdd29d. Due to this reorganisation the polarity used to reset the external USB phy changed and USB host doesn't recognize any devices.

Patch applied to my for-linus branch, thanks a lot.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/