All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: tegra: modify Tegra30 USB2 default phy_type to UTMI
@ 2013-12-18  1:52 Eric Brower
       [not found] ` <1387331565-3994-1-git-send-email-ebrower-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Brower @ 2013-12-18  1:52 UTC (permalink / raw)
  To: swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Eric Brower

Modify Tegra30 default USB2 phy_type to UTMI; this matches
power-on-reset defaults and is expected to be the common case.

The current implementation is likely an incorrect
carry-over from Tegra20, where USB2 does default to ULPI.

Signed-off-by: Eric Brower <ebrower-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
No upstream Tegra30 dts files reference USB2, so this should be a
safe change; anyone using an out-of-tree dts with USB2, sparsely
populated from the Tegra30 dtsi, may have an issue.

 arch/arm/boot/dts/tegra30.dtsi | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index 2bd55cf..bedd379 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -669,7 +669,7 @@
 		compatible = "nvidia,tegra30-ehci", "usb-ehci";
 		reg = <0x7d004000 0x4000>;
 		interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
-		phy_type = "ulpi";
+		phy_type = "utmi";
 		clocks = <&tegra_car TEGRA30_CLK_USB2>;
 		nvidia,phy = <&phy2>;
 		status = "disabled";
@@ -677,12 +677,23 @@
 
 	phy2: usb-phy@7d004000 {
 		compatible = "nvidia,tegra30-usb-phy";
-		reg = <0x7d004000 0x4000>;
-		phy_type = "ulpi";
+		reg = <0x7d004000 0x4000 0x7d004000 0x4000>;
+		phy_type = "utmi";
 		clocks = <&tegra_car TEGRA30_CLK_USB2>,
 			 <&tegra_car TEGRA30_CLK_PLL_U>,
-			 <&tegra_car TEGRA30_CLK_CDEV2>;
-		clock-names = "reg", "pll_u", "ulpi-link";
+			 <&tegra_car TEGRA30_CLK_USBD>;
+		clock-names = "reg", "pll_u", "utmi-pads";
+		nvidia,hssync-start-delay = <9>;
+		nvidia,idle-wait-delay = <17>;
+		nvidia,elastic-limit = <16>;
+		nvidia,term-range-adj = <6>;
+		nvidia,xcvr-setup = <51>;
+		nvidia.xcvr-setup-use-fuses;
+		nvidia,xcvr-lsfslew = <2>;
+		nvidia,xcvr-lsrslew = <2>;
+		nvidia,xcvr-hsslew = <32>;
+		nvidia,hssquelch-level = <2>;
+		nvidia,hsdiscon-level = <5>;
 		status = "disabled";
 	};
 
-- 
1.8.1.5

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

* [PATCH 2/2] ARM: tegra: enable USB2 on Tegra30 Beaver
       [not found] ` <1387331565-3994-1-git-send-email-ebrower-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-12-18  1:52   ` Eric Brower
  2013-12-18 21:15   ` [PATCH 1/2] ARM: tegra: modify Tegra30 USB2 default phy_type to UTMI Stephen Warren
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Brower @ 2013-12-18  1:52 UTC (permalink / raw)
  To: swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Eric Brower

Enable USB2 on Beaver, exposed via the mini-PCIe connector.

Signed-off-by: Eric Brower <ebrower-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/tegra30-beaver.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/tegra30-beaver.dts b/arch/arm/boot/dts/tegra30-beaver.dts
index 08cad69..7aef3e1 100644
--- a/arch/arm/boot/dts/tegra30-beaver.dts
+++ b/arch/arm/boot/dts/tegra30-beaver.dts
@@ -328,6 +328,15 @@
 		non-removable;
 	};
 
+	usb@7d004000 {
+		status = "okay";
+	};
+
+	phy2: usb-phy@7d004000 {
+		vbus-supply = <&sys_3v3_reg>;
+		status = "okay";
+	};
+
 	usb@7d008000 {
 		status = "okay";
 	};
-- 
1.8.1.5

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

* Re: [PATCH 1/2] ARM: tegra: modify Tegra30 USB2 default phy_type to UTMI
       [not found] ` <1387331565-3994-1-git-send-email-ebrower-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  2013-12-18  1:52   ` [PATCH 2/2] ARM: tegra: enable USB2 on Tegra30 Beaver Eric Brower
@ 2013-12-18 21:15   ` Stephen Warren
       [not found]     ` <52B21079.6030201-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Warren @ 2013-12-18 21:15 UTC (permalink / raw)
  To: Eric Brower
  Cc: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On 12/17/2013 06:52 PM, Eric Brower wrote:
> Modify Tegra30 default USB2 phy_type to UTMI; this matches
> power-on-reset defaults and is expected to be the common case.
> 
> The current implementation is likely an incorrect
> carry-over from Tegra20, where USB2 does default to ULPI.

> diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi

>  	phy2: usb-phy@7d004000 {
>  		compatible = "nvidia,tegra30-usb-phy";
> -		reg = <0x7d004000 0x4000>;
> -		phy_type = "ulpi";
> +		reg = <0x7d004000 0x4000 0x7d004000 0x4000>;

Are you sure the second entry in the reg property is correct here? In
Tegra20, the UTMI pad registers are in the USB1 (USBD) register space
for both USB controllers, and I would guess the same applies for all 3
controllers on Tegra30, since both USB1 and USB3 on Tegra30 already
point this reg entry at USBD's reg space, plus you've listed USBD as the
clock entry for utmi-pads, rather than USB2, which would be consistent
with the reg value.

Still, this patch does seem to work for me...

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

* Re: [PATCH 1/2] ARM: tegra: modify Tegra30 USB2 default phy_type to UTMI
       [not found]     ` <52B21079.6030201-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2013-12-20  2:03       ` Eric Brower
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Brower @ 2013-12-20  2:03 UTC (permalink / raw)
  To: Stephen Warren
  Cc: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On 12/18/2013 01:15 PM, Stephen Warren wrote:
> On 12/17/2013 06:52 PM, Eric Brower wrote:
>> Modify Tegra30 default USB2 phy_type to UTMI; this matches
>> power-on-reset defaults and is expected to be the common case.
>>
>> The current implementation is likely an incorrect
>> carry-over from Tegra20, where USB2 does default to ULPI.
>
>> diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
>
>>   	phy2: usb-phy@7d004000 {
>>   		compatible = "nvidia,tegra30-usb-phy";
>> -		reg = <0x7d004000 0x4000>;
>> -		phy_type = "ulpi";
>> +		reg = <0x7d004000 0x4000 0x7d004000 0x4000>;
>
> Are you sure the second entry in the reg property is correct here? In
> Tegra20, the UTMI pad registers are in the USB1 (USBD) register space
> for both USB controllers, and I would guess the same applies for all 3
> controllers on Tegra30, since both USB1 and USB3 on Tegra30 already
> point this reg entry at USBD's reg space, plus you've listed USBD as the
> clock entry for utmi-pads, rather than USB2, which would be consistent
> with the reg value.
>
> Still, this patch does seem to work for me...
>

The second entry in the reg property is indeed incorrect-- I'll send a 
new version of the series.

Though each controller has UTMIP BIAS pad registers, bias pad settings 
must be configured via USB1 only; the USB2 and USB3 BIAS pad registers 
are a no-connect-- this explains why it works as-is (USB1 configures 
bias pad settings), but is not correct for the dtsi.

Thanks for the catch!
Eric

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

end of thread, other threads:[~2013-12-20  2:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-18  1:52 [PATCH 1/2] ARM: tegra: modify Tegra30 USB2 default phy_type to UTMI Eric Brower
     [not found] ` <1387331565-3994-1-git-send-email-ebrower-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-12-18  1:52   ` [PATCH 2/2] ARM: tegra: enable USB2 on Tegra30 Beaver Eric Brower
2013-12-18 21:15   ` [PATCH 1/2] ARM: tegra: modify Tegra30 USB2 default phy_type to UTMI Stephen Warren
     [not found]     ` <52B21079.6030201-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-12-20  2:03       ` Eric Brower

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.