diff mbox

[U-Boot,v5,1/3] ARM: Tegra: FDT: Add USB EHCI function for T30/T114

Message ID 1371812748-490-1-git-send-email-jilin@nvidia.com
State Accepted
Delegated to: Tom Warren
Headers show

Commit Message

Jim Lin June 21, 2013, 11:05 a.m. UTC
Add DT node for USB EHCI function.
Add support for T30-Cardhu, T30-Beaver, T114-Dalmore boards.

Signed-off-by: Jim Lin <jilin@nvidia.com>
---
Changes in v2:
 - Remove PLL parameters from dt file
Changes in v3:
 - Change VBus GPIO from H.05 to DD.04 for Beaver board.
Changes in v4:
 - Change Beaver VBus GPIO to H.05 and value to 0 for polarity to be High.
   I don't have Beaver board. So this needs somebody to help test.
   Thanks.
 - Change Cardhu VBus GPIO value from 3 to 1 because only bit 0 is meaningful.
Changes in v5:
 - Move changes on fdtdec.h and fdtdec.c to patch 2/3
 - Modify PHY type to hsic for USB2 port

 arch/arm/dts/tegra114.dtsi            |   27 +++++++++++++++++++++++++++
 arch/arm/dts/tegra30.dtsi             |   27 +++++++++++++++++++++++++++
 board/nvidia/dts/tegra114-dalmore.dts |    7 +++++++
 board/nvidia/dts/tegra30-beaver.dts   |    6 ++++++
 board/nvidia/dts/tegra30-cardhu.dts   |    6 ++++++
 5 files changed, 73 insertions(+), 0 deletions(-)

Comments

Stephen Warren June 21, 2013, 4:20 p.m. UTC | #1
On 06/21/2013 05:05 AM, Jim Lin wrote:
> Add DT node for USB EHCI function.
> Add support for T30-Cardhu, T30-Beaver, T114-Dalmore boards.

> Changes in v5:
>  - Move changes on fdtdec.h and fdtdec.c to patch 2/3
>  - Modify PHY type to hsic for USB2 port

HSIC is an odd choice; ULPI is much more common. Still, this isn't a big
deal; this is simply a default value, so any board that enables USB2 can
simply set the property to "ulpi" if needed.

Missing from the changelog is the fact you fixed the VBUS GPIO values
for Cardhu and Beaver to be correct.

I'll try to test and do a final review of this soon.
Stephen Warren June 24, 2013, 7:36 p.m. UTC | #2
On 06/21/2013 05:05 AM, Jim Lin wrote:
> Add DT node for USB EHCI function.
> Add support for T30-Cardhu, T30-Beaver, T114-Dalmore boards.

The series,

Reviewed-by: Stephen Warren <swarren@nvidia.com>

Also, on Beaver, Cardhu-A04, and Dalmore, I tested downloading/booting a
kernel over a USB Ethernet dongle, so,

Tested-by: Stephen Warren <swarren@nvidia.com>
Marek Vasut June 25, 2013, 6:48 p.m. UTC | #3
Dear Stephen Warren,

> On 06/21/2013 05:05 AM, Jim Lin wrote:
> > Add DT node for USB EHCI function.
> > Add support for T30-Cardhu, T30-Beaver, T114-Dalmore boards.
> 
> The series,
> 
> Reviewed-by: Stephen Warren <swarren@nvidia.com>
> 
> Also, on Beaver, Cardhu-A04, and Dalmore, I tested downloading/booting a
> kernel over a USB Ethernet dongle, so,

I will apply this v5, OK?

Best regards,
Marek Vasut
Marek Vasut June 25, 2013, 8:04 p.m. UTC | #4
Dear Tom Warren,

> This is a Tegra change, Marek. I believe it's assigned to me in Patchwork.
> 
> I'll apply it to u-boot-tegra/next today or tomorrow.
> 
> Tom

This is also a USB change, but it doesn't touch anything vital, so be my guest. 
Thanks

Best regards,
Marek Vasut
Andreas Müller Nov. 13, 2013, 9:28 a.m. UTC | #5
On Fri, Jun 21, 2013 at 6:20 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 06/21/2013 05:05 AM, Jim Lin wrote:
>> Add DT node for USB EHCI function.
>> Add support for T30-Cardhu, T30-Beaver, T114-Dalmore boards.
>
>> Changes in v5:
>>  - Move changes on fdtdec.h and fdtdec.c to patch 2/3
>>  - Modify PHY type to hsic for USB2 port
>
> HSIC is an odd choice; ULPI is much more common. Still, this isn't a big
> deal; this is simply a default value, so any board that enables USB2 can
> simply set the property to "ulpi" if needed.
>
Long time ago but now I am working on a board support for tegra30
which has ASIX-eth on USB2-HSIC and don't get it to work. Checking the
code leads me to the question:

Is it possible that phy_type = "hsic" is not handled at all?

Andreas
Stephen Warren Nov. 13, 2013, 4:49 p.m. UTC | #6
On 11/13/2013 02:28 AM, Andreas Müller wrote:
> On Fri, Jun 21, 2013 at 6:20 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 06/21/2013 05:05 AM, Jim Lin wrote:
>>> Add DT node for USB EHCI function.
>>> Add support for T30-Cardhu, T30-Beaver, T114-Dalmore boards.
>>
>>> Changes in v5:
>>>  - Move changes on fdtdec.h and fdtdec.c to patch 2/3
>>>  - Modify PHY type to hsic for USB2 port
>>
>> HSIC is an odd choice; ULPI is much more common. Still, this isn't a big
>> deal; this is simply a default value, so any board that enables USB2 can
>> simply set the property to "ulpi" if needed.
>>
> Long time ago but now I am working on a board support for tegra30
> which has ASIX-eth on USB2-HSIC and don't get it to work. Checking the
> code leads me to the question:
> 
> Is it possible that phy_type = "hsic" is not handled at all?

Almost certainly. I don't believe any of the boards we currently support
in upstream U-Boot or the Linux kernel actually use/support HSIC, so
it's quite unlikely that the driver support for HSIC is present.
diff mbox

Patch

diff --git a/arch/arm/dts/tegra114.dtsi b/arch/arm/dts/tegra114.dtsi
index f86d18d..626cc3c 100644
--- a/arch/arm/dts/tegra114.dtsi
+++ b/arch/arm/dts/tegra114.dtsi
@@ -216,4 +216,31 @@ 
 		clocks = <&tegra_car 15>;
 		status = "disable";
 	};
+
+	usb@7d000000 {
+		compatible = "nvidia,tegra114-ehci";
+		reg = <0x7d000000 0x4000>;
+		interrupts = <52>;
+		phy_type = "utmi";
+		clocks = <&tegra_car 22>;	/* PERIPH_ID_USBD */
+		status = "disabled";
+	};
+
+	usb@7d004000 {
+		compatible = "nvidia,tegra114-ehci";
+		reg = <0x7d004000 0x4000>;
+		interrupts = <53>;
+		phy_type = "hsic";
+		clocks = <&tegra_car 58>;	/* PERIPH_ID_USB2 */
+		status = "disabled";
+	};
+
+	usb@7d008000 {
+		compatible = "nvidia,tegra114-ehci";
+		reg = <0x7d008000 0x4000>;
+		interrupts = <129>;
+		phy_type = "utmi";
+		clocks = <&tegra_car 59>;	/* PERIPH_ID_USB3 */
+		status = "disabled";
+	};
 };
diff --git a/arch/arm/dts/tegra30.dtsi b/arch/arm/dts/tegra30.dtsi
index ccf154f..fee1c36 100644
--- a/arch/arm/dts/tegra30.dtsi
+++ b/arch/arm/dts/tegra30.dtsi
@@ -216,4 +216,31 @@ 
 		clocks = <&tegra_car 15>;
 		status = "disabled";
 	};
+
+	usb@7d000000 {
+		compatible = "nvidia,tegra30-ehci";
+		reg = <0x7d000000 0x4000>;
+		interrupts = <52>;
+		phy_type = "utmi";
+		clocks = <&tegra_car 22>;	/* PERIPH_ID_USBD */
+		status = "disabled";
+	};
+
+	usb@7d004000 {
+		compatible = "nvidia,tegra30-ehci";
+		reg = <0x7d004000 0x4000>;
+		interrupts = <53>;
+		phy_type = "hsic";
+		clocks = <&tegra_car 58>;	/* PERIPH_ID_USB2 */
+		status = "disabled";
+	};
+
+	usb@7d008000 {
+		compatible = "nvidia,tegra30-ehci";
+		reg = <0x7d008000 0x4000>;
+		interrupts = <129>;
+		phy_type = "utmi";
+		clocks = <&tegra_car 59>;	/* PERIPH_ID_USB3 */
+		status = "disabled";
+	};
 };
diff --git a/board/nvidia/dts/tegra114-dalmore.dts b/board/nvidia/dts/tegra114-dalmore.dts
index 86e9459..435c01e 100644
--- a/board/nvidia/dts/tegra114-dalmore.dts
+++ b/board/nvidia/dts/tegra114-dalmore.dts
@@ -14,6 +14,7 @@ 
 		i2c4 = "/i2c@7000c700";
 		sdhci0 = "/sdhci@78000600";
 		sdhci1 = "/sdhci@78000400";
+		usb0 = "/usb@7d008000";
 	};
 
 	memory {
@@ -61,4 +62,10 @@ 
 		bus-width = <8>;
 		status = "okay";
 	};
+
+	usb@7d008000 {
+		/* SPDIF_IN: USB_VBUS_EN1 */
+		nvidia,vbus-gpio = <&gpio 86 0>;
+		status = "okay";
+	};
 };
diff --git a/board/nvidia/dts/tegra30-beaver.dts b/board/nvidia/dts/tegra30-beaver.dts
index 836169f..a7cc93e 100644
--- a/board/nvidia/dts/tegra30-beaver.dts
+++ b/board/nvidia/dts/tegra30-beaver.dts
@@ -14,6 +14,7 @@ 
 		i2c4 = "/i2c@7000c700";
 		sdhci0 = "/sdhci@78000600";
 		sdhci1 = "/sdhci@78000000";
+		usb0 = "/usb@7d008000";
 	};
 
 	memory {
@@ -68,4 +69,9 @@ 
 		status = "okay";
 		bus-width = <8>;
 	};
+
+	usb@7d008000 {
+		nvidia,vbus-gpio = <&gpio 236 0>; /* PDD4 */
+		status = "okay";
+	};
 };
diff --git a/board/nvidia/dts/tegra30-cardhu.dts b/board/nvidia/dts/tegra30-cardhu.dts
index 4d22b48..ea2cf76 100644
--- a/board/nvidia/dts/tegra30-cardhu.dts
+++ b/board/nvidia/dts/tegra30-cardhu.dts
@@ -14,6 +14,7 @@ 
 		i2c4 = "/i2c@7000c700";
 		sdhci0 = "/sdhci@78000600";
 		sdhci1 = "/sdhci@78000000";
+		usb0 = "/usb@7d008000";
 	};
 
 	memory {
@@ -63,4 +64,9 @@ 
 		status = "okay";
 		bus-width = <8>;
 	};
+
+	usb@7d008000 {
+		nvidia,vbus-gpio = <&gpio 236 0>;	/* PDD4 */
+		status = "okay";
+	};
 };