linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] usb: dwc3: core: enable phy suspend quirk on non-FPGA
@ 2014-11-06 17:36 Felipe Balbi
  2014-11-06 17:36 ` [PATCH 2/2] arm: boot: dts: am4372: enable dwc3 suspend PHY quirk Felipe Balbi
  0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2014-11-06 17:36 UTC (permalink / raw)
  To: linux-arm-kernel

as it turns out, at least AM437x silicon (non-FPGA)
needs to enable PHY suspend quirk. So let's allow
for PHY suspend quirk to be used with non-FPGA
builds too.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/dwc3/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 8ae42b8..25ddc39 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -404,7 +404,7 @@ static void dwc3_phy_setup(struct dwc3 *dwc)
 	if (dwc->tx_de_emphasis_quirk)
 		reg |= DWC3_GUSB3PIPECTL_TX_DEEPH(dwc->tx_de_emphasis);
 
-	if (dwc->dis_u3_susphy_quirk && dwc->is_fpga)
+	if (dwc->dis_u3_susphy_quirk)
 		reg &= ~DWC3_GUSB3PIPECTL_SUSPHY;
 
 	dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg);
@@ -422,7 +422,7 @@ static void dwc3_phy_setup(struct dwc3 *dwc)
 	if (dwc->revision > DWC3_REVISION_194A)
 		reg |= DWC3_GUSB2PHYCFG_SUSPHY;
 
-	if (dwc->dis_u2_susphy_quirk && dwc->is_fpga)
+	if (dwc->dis_u2_susphy_quirk)
 		reg &= ~DWC3_GUSB2PHYCFG_SUSPHY;
 
 	dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
-- 
2.1.0.GIT

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

* [PATCH 2/2] arm: boot: dts: am4372: enable dwc3 suspend PHY quirk
  2014-11-06 17:36 [PATCH 1/2] usb: dwc3: core: enable phy suspend quirk on non-FPGA Felipe Balbi
@ 2014-11-06 17:36 ` Felipe Balbi
  2014-11-10 23:11   ` Tony Lindgren
  0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2014-11-06 17:36 UTC (permalink / raw)
  To: linux-arm-kernel

Whenever Suspend PHY bit is set on AM437x devices,
USB will not work due to Set EP Configuration command
always failing.

This was only found after a recent commit 2164a47 (usb:
dwc3: set SUSPHY bit for all cores, which will be merged
for v3.19) added a missing *required* step to dwc3
initialization. Synopsys Databook requires that we enable
Suspend PHY bit after initialization but that, unfortunately,
breaks AM437x.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/boot/dts/am4372.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index 46660ff..e19068d 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -817,6 +817,8 @@
 				maximum-speed = "high-speed";
 				dr_mode = "otg";
 				status = "disabled";
+				snps,dis_u3_susphy_quirk;
+				snps,dis_u2_susphy_quirk;
 			};
 		};
 
@@ -839,6 +841,8 @@
 				maximum-speed = "high-speed";
 				dr_mode = "otg";
 				status = "disabled";
+				snps,dis_u3_susphy_quirk;
+				snps,dis_u2_susphy_quirk;
 			};
 		};
 
-- 
2.1.0.GIT

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

* [PATCH 2/2] arm: boot: dts: am4372: enable dwc3 suspend PHY quirk
  2014-11-06 17:36 ` [PATCH 2/2] arm: boot: dts: am4372: enable dwc3 suspend PHY quirk Felipe Balbi
@ 2014-11-10 23:11   ` Tony Lindgren
  0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2014-11-10 23:11 UTC (permalink / raw)
  To: linux-arm-kernel

* Felipe Balbi <balbi@ti.com> [141106 09:40]:
> Whenever Suspend PHY bit is set on AM437x devices,
> USB will not work due to Set EP Configuration command
> always failing.
> 
> This was only found after a recent commit 2164a47 (usb:
> dwc3: set SUSPHY bit for all cores, which will be merged
> for v3.19) added a missing *required* step to dwc3
> initialization. Synopsys Databook requires that we enable
> Suspend PHY bit after initialization but that, unfortunately,
> breaks AM437x.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>

This should be safe to queue along with the related USB
changes:

Acked-by: Tony Lindgren <tony@atomide.com>

> ---
>  arch/arm/boot/dts/am4372.dtsi | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
> index 46660ff..e19068d 100644
> --- a/arch/arm/boot/dts/am4372.dtsi
> +++ b/arch/arm/boot/dts/am4372.dtsi
> @@ -817,6 +817,8 @@
>  				maximum-speed = "high-speed";
>  				dr_mode = "otg";
>  				status = "disabled";
> +				snps,dis_u3_susphy_quirk;
> +				snps,dis_u2_susphy_quirk;
>  			};
>  		};
>  
> @@ -839,6 +841,8 @@
>  				maximum-speed = "high-speed";
>  				dr_mode = "otg";
>  				status = "disabled";
> +				snps,dis_u3_susphy_quirk;
> +				snps,dis_u2_susphy_quirk;
>  			};
>  		};
>  
> -- 
> 2.1.0.GIT
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

end of thread, other threads:[~2014-11-10 23:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-06 17:36 [PATCH 1/2] usb: dwc3: core: enable phy suspend quirk on non-FPGA Felipe Balbi
2014-11-06 17:36 ` [PATCH 2/2] arm: boot: dts: am4372: enable dwc3 suspend PHY quirk Felipe Balbi
2014-11-10 23:11   ` 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).