devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] usb: tegra: modifying port reset based on instance number
@ 2012-12-14  6:59 Venu Byravarasu
  2012-12-14  6:59 ` [PATCH 1/2] arm: tegra: Add new DT property to USB node Venu Byravarasu
  2012-12-14  6:59 ` [PATCH 2/2] usb: host: tegra: Resetting PORT0 based on information received via DT Venu Byravarasu
  0 siblings, 2 replies; 9+ messages in thread
From: Venu Byravarasu @ 2012-12-14  6:59 UTC (permalink / raw)
  To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, rob-VoJi6FS/r0vR7s880joybQ,
	swarren-3lzwWm7+Weoh9ZMKESR00Q, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	sjg-F7+t8E8rja9g9hUCZPvPmw, olof-nZhT3qVonbNeoWH0uzbU5w
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Venu Byravarasu

Tegra USB host driver is using port instance number,
to handle some of the hardware issues on SOC e.g. reset PORT0
twice etc. As instance number based handling looks ugly,
added a new property to USB DT node for this purpose.
Modified host driver to make use of the information passed
through DT to reset the port second time.


Venu Byravarasu (2):
  arm: tegra: Add new DT property to USB node.
  usb: host: tegra: Resetting PORT0 based on information received via
    DT.

 .../bindings/usb/nvidia,tegra20-ehci.txt           |    2 ++
 arch/arm/boot/dts/tegra20.dtsi                     |    1 +
 drivers/usb/host/ehci-tegra.c                      |    6 +++++-
 3 files changed, 8 insertions(+), 1 deletions(-)

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

* [PATCH 1/2] arm: tegra: Add new DT property to USB node.
  2012-12-14  6:59 [PATCH 0/2] usb: tegra: modifying port reset based on instance number Venu Byravarasu
@ 2012-12-14  6:59 ` Venu Byravarasu
  2012-12-17 21:07   ` Stephen Warren
  2012-12-14  6:59 ` [PATCH 2/2] usb: host: tegra: Resetting PORT0 based on information received via DT Venu Byravarasu
  1 sibling, 1 reply; 9+ messages in thread
From: Venu Byravarasu @ 2012-12-14  6:59 UTC (permalink / raw)
  To: grant.likely, rob.herring, rob, swarren, linux, stern, gregkh,
	sjg, olof
  Cc: linux-kernel, devicetree-discuss, linux-doc, linux-tegra,
	linux-arm-kernel, linux-usb, Venu Byravarasu

As Tegra USB host driver is using instance number for resetting
PORT0 twice, adding a new DT property for handling this.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
---
 .../bindings/usb/nvidia,tegra20-ehci.txt           |    2 ++
 arch/arm/boot/dts/tegra20.dtsi                     |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt b/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt
index e9b005d..443a2b4 100644
--- a/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt
+++ b/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt
@@ -27,3 +27,5 @@ Optional properties:
     registers are accessed through the APB_MISC base address instead of
     the USB controller. Since this is a legacy issue it probably does not
     warrant a compatible string of its own.
+  - nvidia,needs-double-reset : boolean is to be set for some of the Tegra2
+    USB ports, which need reset twice due to hardware issues.
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index b8effa1..3ebbd0c 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -364,6 +364,7 @@
 		phy_type = "utmi";
 		nvidia,has-legacy-mode;
 		status = "disabled";
+		nvidia,needs-double-reset;
 	};
 
 	usb@c5004000 {
-- 
1.7.0.4

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

* [PATCH 2/2] usb: host: tegra: Resetting PORT0 based on information received via DT.
  2012-12-14  6:59 [PATCH 0/2] usb: tegra: modifying port reset based on instance number Venu Byravarasu
  2012-12-14  6:59 ` [PATCH 1/2] arm: tegra: Add new DT property to USB node Venu Byravarasu
@ 2012-12-14  6:59 ` Venu Byravarasu
  1 sibling, 0 replies; 9+ messages in thread
From: Venu Byravarasu @ 2012-12-14  6:59 UTC (permalink / raw)
  To: grant.likely, rob.herring, rob, swarren, linux, stern, gregkh,
	sjg, olof
  Cc: linux-kernel, devicetree-discuss, linux-doc, linux-tegra,
	linux-arm-kernel, linux-usb, Venu Byravarasu

Tegra USB host driver is using port instance number,
to handle some of the hardware issues on SOC e.g. reset PORT0
twice etc. As instance number based handling looks ugly,
making use of information passed through DT for achieving this.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
---
 drivers/usb/host/ehci-tegra.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index acf1755..55a9cde 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -43,6 +43,7 @@ struct tegra_ehci_hcd {
 	struct usb_phy *transceiver;
 	int host_resumed;
 	int port_resuming;
+	bool needs_double_reset;
 	enum tegra_usb_phy_port_speed port_speed;
 };
 
@@ -184,7 +185,7 @@ static int tegra_ehci_hub_control(
 	}
 
 	/* For USB1 port we need to issue Port Reset twice internally */
-	if (tegra->phy->instance == 0 &&
+	if (tegra->needs_double_reset &&
 	   (typeReq == SetPortFeature && wValue == USB_PORT_FEAT_RESET)) {
 		spin_unlock_irqrestore(&ehci->lock, flags);
 		return tegra_ehci_internal_port_reset(ehci, status_reg);
@@ -666,6 +667,9 @@ static int tegra_ehci_probe(struct platform_device *pdev)
 	clk_prepare_enable(tegra->emc_clk);
 	clk_set_rate(tegra->emc_clk, 400000000);
 
+	tegra->needs_double_reset = of_property_read_bool(pdev->dev.of_node,
+		"nvidia,needs-double-reset");
+
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (!res) {
 		dev_err(&pdev->dev, "Failed to get I/O memory\n");
-- 
1.7.0.4

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

* Re: [PATCH 1/2] arm: tegra: Add new DT property to USB node.
  2012-12-14  6:59 ` [PATCH 1/2] arm: tegra: Add new DT property to USB node Venu Byravarasu
@ 2012-12-17 21:07   ` Stephen Warren
       [not found]     ` <50CF89AF.3000308-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Stephen Warren @ 2012-12-17 21:07 UTC (permalink / raw)
  To: Venu Byravarasu, stern, gregkh, Felipe Balbi
  Cc: grant.likely, rob.herring, rob, linux, sjg, olof, linux-kernel,
	devicetree-discuss, linux-doc, linux-tegra, linux-arm-kernel,
	linux-usb

On 12/13/2012 11:59 PM, Venu Byravarasu wrote:
> As Tegra USB host driver is using instance number for resetting
> PORT0 twice, adding a new DT property for handling this.

Alan, Greg, Felip,e

This series looks fine to me.

I'd like to take all the Tegra-related USB patches through the Tegra
tree for 3.9 if possible (so I'm looking for your acks here). I believe
Venu plans to significantly clean up the EHCI/PHY driver split for
Tegra, rework the drivers, and add support for Tegra30 in addition to
Tegra20. Some of this requires changes to some Tegra board files and
device trees to maintain "git bisect" I don't know for sure yet, but I
believe that rework may also end up conflicting with other clock-related
rework that will show up for Tegra in 3.9. Are you OK with this? I'll
certainly look for your review/acks on the patches before picking them
up though.

Thanks.

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

* Re: [PATCH 1/2] arm: tegra: Add new DT property to USB node.
       [not found]     ` <50CF89AF.3000308-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2012-12-17 21:18       ` Greg KH
  2012-12-17 22:06         ` Alan Stern
  2012-12-17 22:04       ` Alan Stern
  1 sibling, 1 reply; 9+ messages in thread
From: Greg KH @ 2012-12-17 21:18 UTC (permalink / raw)
  To: Stephen Warren
  Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ, linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, Venu Byravarasu,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz, Felipe Balbi,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Mon, Dec 17, 2012 at 02:07:59PM -0700, Stephen Warren wrote:
> On 12/13/2012 11:59 PM, Venu Byravarasu wrote:
> > As Tegra USB host driver is using instance number for resetting
> > PORT0 twice, adding a new DT property for handling this.
> 
> Alan, Greg, Felip,e
> 
> This series looks fine to me.
> 
> I'd like to take all the Tegra-related USB patches through the Tegra
> tree for 3.9 if possible (so I'm looking for your acks here). I believe
> Venu plans to significantly clean up the EHCI/PHY driver split for
> Tegra, rework the drivers, and add support for Tegra30 in addition to
> Tegra20. Some of this requires changes to some Tegra board files and
> device trees to maintain "git bisect" I don't know for sure yet, but I
> believe that rework may also end up conflicting with other clock-related
> rework that will show up for Tegra in 3.9. Are you OK with this? I'll
> certainly look for your review/acks on the patches before picking them
> up though.

You can't pick anything up for 3.9 until after 3.8-rc1 is out, according
to the rules of linux-next, so please wait until that kernel is out
before doing anything.  Given the timing of 3.8-rc1, and my current
vacation schedule, I'm not going to be able to do _any_ code review for
the rest of the year, sorry.

After that, I'll be glad to review this.

greg k-h

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

* Re: [PATCH 1/2] arm: tegra: Add new DT property to USB node.
       [not found]     ` <50CF89AF.3000308-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  2012-12-17 21:18       ` Greg KH
@ 2012-12-17 22:04       ` Alan Stern
       [not found]         ` <Pine.LNX.4.44L0.1212171704060.1409-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
  1 sibling, 1 reply; 9+ messages in thread
From: Alan Stern @ 2012-12-17 22:04 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Venu Byravarasu, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	Felipe Balbi, grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, rob-VoJi6FS/r0vR7s880joybQ,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, sjg-F7+t8E8rja9g9hUCZPvPmw,
	olof-nZhT3qVonbNeoWH0uzbU5w, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

On Mon, 17 Dec 2012, Stephen Warren wrote:

> On 12/13/2012 11:59 PM, Venu Byravarasu wrote:
> > As Tegra USB host driver is using instance number for resetting
> > PORT0 twice, adding a new DT property for handling this.
> 
> Alan, Greg, Felip,e
> 
> This series looks fine to me.
> 
> I'd like to take all the Tegra-related USB patches through the Tegra
> tree for 3.9 if possible (so I'm looking for your acks here). I believe
> Venu plans to significantly clean up the EHCI/PHY driver split for
> Tegra, rework the drivers, and add support for Tegra30 in addition to
> Tegra20. Some of this requires changes to some Tegra board files and
> device trees to maintain "git bisect" I don't know for sure yet, but I
> believe that rework may also end up conflicting with other clock-related
> rework that will show up for Tegra in 3.9. Are you OK with this? I'll
> certainly look for your review/acks on the patches before picking them
> up though.

Regarding the changes to drivers/usb/host/ehci-tegra.c:

Acked-by: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/2] arm: tegra: Add new DT property to USB node.
  2012-12-17 21:18       ` Greg KH
@ 2012-12-17 22:06         ` Alan Stern
  0 siblings, 0 replies; 9+ messages in thread
From: Alan Stern @ 2012-12-17 22:06 UTC (permalink / raw)
  To: Greg KH
  Cc: Stephen Warren, Venu Byravarasu, Felipe Balbi, grant.likely,
	rob.herring, rob, linux, sjg, olof, linux-kernel,
	devicetree-discuss, linux-doc, linux-tegra, linux-arm-kernel,
	linux-usb

On Mon, 17 Dec 2012, Greg KH wrote:

> You can't pick anything up for 3.9 until after 3.8-rc1 is out, according
> to the rules of linux-next

Well, you can accept a submission and store it in a private tree until 
then.  You just can't put it in any tree that feeds into linux-next.

Alan Stern

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

* Re: [PATCH 1/2] arm: tegra: Add new DT property to USB node.
       [not found]         ` <Pine.LNX.4.44L0.1212171704060.1409-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
@ 2013-01-12  0:14           ` Greg KH
  2013-01-12  0:43             ` Stephen Warren
  0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2013-01-12  0:14 UTC (permalink / raw)
  To: Alan Stern
  Cc: Stephen Warren, Venu Byravarasu, Felipe Balbi,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, rob-VoJi6FS/r0vR7s880joybQ,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, sjg-F7+t8E8rja9g9hUCZPvPmw,
	olof-nZhT3qVonbNeoWH0uzbU5w, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

On Mon, Dec 17, 2012 at 05:04:41PM -0500, Alan Stern wrote:
> On Mon, 17 Dec 2012, Stephen Warren wrote:
> 
> > On 12/13/2012 11:59 PM, Venu Byravarasu wrote:
> > > As Tegra USB host driver is using instance number for resetting
> > > PORT0 twice, adding a new DT property for handling this.
> > 
> > Alan, Greg, Felip,e
> > 
> > This series looks fine to me.
> > 
> > I'd like to take all the Tegra-related USB patches through the Tegra
> > tree for 3.9 if possible (so I'm looking for your acks here). I believe
> > Venu plans to significantly clean up the EHCI/PHY driver split for
> > Tegra, rework the drivers, and add support for Tegra30 in addition to
> > Tegra20. Some of this requires changes to some Tegra board files and
> > device trees to maintain "git bisect" I don't know for sure yet, but I
> > believe that rework may also end up conflicting with other clock-related
> > rework that will show up for Tegra in 3.9. Are you OK with this? I'll
> > certainly look for your review/acks on the patches before picking them
> > up though.
> 
> Regarding the changes to drivers/usb/host/ehci-tegra.c:
> 
> Acked-by: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>

That's fine with me as well, feel free to think that I have now dropped
all tegra-related patches from my queue, you can take them all :)

thanks,

greg k-h

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

* Re: [PATCH 1/2] arm: tegra: Add new DT property to USB node.
  2013-01-12  0:14           ` Greg KH
@ 2013-01-12  0:43             ` Stephen Warren
  0 siblings, 0 replies; 9+ messages in thread
From: Stephen Warren @ 2013-01-12  0:43 UTC (permalink / raw)
  To: Greg KH
  Cc: Alan Stern, Venu Byravarasu, Felipe Balbi, grant.likely,
	rob.herring, rob, linux, sjg, olof, linux-kernel,
	devicetree-discuss, linux-doc, linux-tegra, linux-arm-kernel,
	linux-usb

On 01/11/2013 05:14 PM, Greg KH wrote:
> On Mon, Dec 17, 2012 at 05:04:41PM -0500, Alan Stern wrote:
>> On Mon, 17 Dec 2012, Stephen Warren wrote:
>>
>>> On 12/13/2012 11:59 PM, Venu Byravarasu wrote:
>>>> As Tegra USB host driver is using instance number for resetting
>>>> PORT0 twice, adding a new DT property for handling this.
>>>
>>> Alan, Greg, Felip,e
>>>
>>> This series looks fine to me.
>>>
>>> I'd like to take all the Tegra-related USB patches through the Tegra
>>> tree for 3.9 if possible (so I'm looking for your acks here). I believe
>>> Venu plans to significantly clean up the EHCI/PHY driver split for
>>> Tegra, rework the drivers, and add support for Tegra30 in addition to
>>> Tegra20. Some of this requires changes to some Tegra board files and
>>> device trees to maintain "git bisect" I don't know for sure yet, but I
>>> believe that rework may also end up conflicting with other clock-related
>>> rework that will show up for Tegra in 3.9. Are you OK with this? I'll
>>> certainly look for your review/acks on the patches before picking them
>>> up though.
>>
>> Regarding the changes to drivers/usb/host/ehci-tegra.c:
>>
>> Acked-by: Alan Stern <stern@rowland.harvard.edu>
> 
> That's fine with me as well, feel free to think that I have now dropped
> all tegra-related patches from my queue, you can take them all :)

Thanks, applied to Tegra's for-3.9/usb branch.


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

end of thread, other threads:[~2013-01-12  0:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-14  6:59 [PATCH 0/2] usb: tegra: modifying port reset based on instance number Venu Byravarasu
2012-12-14  6:59 ` [PATCH 1/2] arm: tegra: Add new DT property to USB node Venu Byravarasu
2012-12-17 21:07   ` Stephen Warren
     [not found]     ` <50CF89AF.3000308-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-12-17 21:18       ` Greg KH
2012-12-17 22:06         ` Alan Stern
2012-12-17 22:04       ` Alan Stern
     [not found]         ` <Pine.LNX.4.44L0.1212171704060.1409-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2013-01-12  0:14           ` Greg KH
2013-01-12  0:43             ` Stephen Warren
2012-12-14  6:59 ` [PATCH 2/2] usb: host: tegra: Resetting PORT0 based on information received via DT Venu Byravarasu

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