usb: tegra: modifying port reset based on instance number
Subsystems (4)
cover usb: tegra: modifying port reset based on instance number
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(-)
PATCH 1/2 arm: tegra: Add new DT property to USB node.
As Tegra USB host driver is using instance number for resetting PORT0 twice, adding a new DT property for handling this.
--- .../bindings/usb/nvidia,tegra20-ehci.txt | 2 ++ arch/arm/boot/dts/tegra20.dtsi | 1 + 2 files changed, 3 insertions(+), 0 deletions(-)
Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt +2 -0
@@ -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.
arch/arm/boot/dts/tegra20.dtsi +1 -0
@@ -364,6 +364,7 @@ phy_type = "utmi"; nvidia,has-legacy-mode; status = "disabled"; + nvidia,needs-double-reset; }; usb at c5004000 {
Signature · 1 line
1.7.0.4
Re: [PATCH 1/2] arm: tegra: Add new DT property to USB node.
Quoted 2 lines · Venu Byravarasu
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.
Greg KH
maintainerRe: [PATCH 1/2] arm: tegra: Add new DT property to USB node.
Quoted 8 lines · Stephen Warren
Quoted 2 lines · Venu Byravarasu
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.
Quoted 10 lines
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
Alan Stern
maintainerRe: [PATCH 1/2] arm: tegra: Add new DT property to USB node.
Quoted 2 lines · Greg KH
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
Re: [PATCH 1/2] arm: tegra: Add new DT property to USB node.
In reply to Stephen WarrenQuoted 8 lines · Stephen Warren
Quoted 2 lines · Venu Byravarasu
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.
Quoted 10 lines
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:
Greg KH
maintainerRe: [PATCH 1/2] arm: tegra: Add new DT property to USB node.
Quoted 21 lines · Alan Stern
Quoted 8 lines · Stephen Warren
Quoted 2 lines · Venu Byravarasu
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.
Quoted 10 lines
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.
Quoted 3 lines
Regarding the changes to
drivers/usb/host/ehci-tegra.c:Acked-by Alan Stern <[email protected]>
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
Stephen Warren
AppliedRe: [PATCH 1/2] arm: tegra: Add new DT property to USB node.
Quoted 22 lines · Greg KH
Quoted 21 lines · Alan Stern
Quoted 18 lines · Stephen Warren
Quoted 2 lines · Venu Byravarasu
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.
Quoted 6 lines
Quoted 3 lines
Regarding the changes to
drivers/usb/host/ehci-tegra.c:Acked-by Alan Stern <[email protected]>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.
PATCH 2/2 usb: host: tegra: Resetting PORT0 based on information received via DT.
In reply to Venu ByravarasuTegra 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.
--- drivers/usb/host/ehci-tegra.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/usb/host/ehci-tegra.c +5 -1
@@ -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" );
Signature · 1 line
1.7.0.4