Skip to contentSkip to conversation

USB Host support for OMAP5 uEVM (for 3.14)

PATCH Superseded Roger Quadros 2 participants 7 messages Jan 7, 2014 – Jan 8, 2014

Subsystems (4)

v3 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

v3 cover USB Host support for OMAP5 uEVM (for 3.14)

Hi Benoit & Tony,

This patchset brings up USB Host ports and Ethernet port on the OMAP5 uEVM board.

It depends on the TI Clock DT conversion patches [1].

[1] - http://article.gmane.org/gmane.linux.ports.arm.kernel/289895

cheers,
-roger

Roger Quadros (4):
ARM: dts: OMAP5: Add 60MHz clock reference to USB Host module
ARM: dts: omap4-panda: Provide USB PHY clock
ARM: dts: omap5-uevm: Provide USB PHY clock
ARM: OMAP2+: Remove legacy_init_ehci_clk()

 arch/arm/boot/dts/omap4-panda-common.dtsi |  8 ++------
 arch/arm/boot/dts/omap5-uevm.dts          |  8 ++------
 arch/arm/boot/dts/omap5.dtsi              |  2 ++
 arch/arm/mach-omap2/pdata-quirks.c        | 16 ----------------
 4 files changed, 6 insertions(+), 28 deletions(-)
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH v3 1/4 ARM: dts: OMAP5: Add 60MHz clock reference to USB Host module

USB Host driver (drivers/mfd/omap-usb-host.c) expects the 60MHz reference clock to be named "init_60m_fclk". Provide this information.

---
 arch/arm/boot/dts/omap5.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/boot/dts/omap5.dtsi +2 -0
index 2f12a47..e0ab379 100644
@@ -765,6 +765,8 @@
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ranges;
+			clocks = <&l3init_60m_fclk>;
+			clock-names = "init_60m_fclk";
 
 			usbhsohci: ohci at 4a064800 {
 				compatible = "ti,ohci-omap3", "usb-ohci";
Signature · 1 line
1.8.3.2
#2 lore raw

Re: [PATCH v3 1/4] ARM: dts: OMAP5: Add 60MHz clock reference to USB Host module

Quoted 14 lines · Roger Quadros

USB Host driver (drivers/mfd/omap-usb-host.c) expects the 60MHz reference clock to be named "init_60m_fclk". Provide this information.

---
 arch/arm/boot/dts/omap5.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/boot/dts/omap5.dtsi +0 -0
index 2f12a47..e0ab379 100644

arch/arm/boot/dts/omap5.dtsi line 772

Quoted 8 lines
arch/arm/boot/dts/omap5.dtsi +2 -0
@@ -765,6 +765,8 @@
                        #address-cells = <1>;
                        #size-cells = <1>;
                        ranges;
+                       clocks = <&l3init_60m_fclk>;
+                       clock-names = "init_60m_fclk";
 
                        usbhsohci: ohci at 4a064800 {
                                compatible = "ti,ohci-omap3", "usb-ohci";

The bindings/mfd/omap-usb-host.txt file doesn't document any clocks. Please create another patch to document the clock names in this binding before you start putting them into the dtsi file. So far the clock names are an implementation detail of Linux as they are not part of the binding, and with your patch it becomes part of the ABI.

Arnd

#3 lore raw

Re: [PATCH v3 1/4] ARM: dts: OMAP5: Add 60MHz clock reference to USB Host module

Quoted 21 lines · Arnd Bergmann
Quoted 20 lines · Roger Quadros

USB Host driver (drivers/mfd/omap-usb-host.c) expects the 60MHz reference clock to be named "init_60m_fclk". Provide this information.

---
 arch/arm/boot/dts/omap5.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/boot/dts/omap5.dtsi +2 -0
index 2f12a47..e0ab379 100644
@@ -765,6 +765,8 @@
                        #address-cells = <1>;
                        #size-cells = <1>;
                        ranges;
+                       clocks = <&l3init_60m_fclk>;
+                       clock-names = "init_60m_fclk";
 
Quoted 9 lines

arch/arm/boot/dts/omap5.dtsi line 772

Quoted 2 lines
arch/arm/boot/dts/omap5.dtsi +0 -0
                        usbhsohci: ohci at 4a064800 {
                                compatible = "ti,ohci-omap3", "usb-ohci";

The bindings/mfd/omap-usb-host.txt file doesn't document any clocks. Please create another patch to document the clock names in this binding before you start putting them into the dtsi file. So far the clock names are an implementation detail of Linux as they are not part of the binding, and with your patch it becomes part of the ABI.

Right. I'll re-post the series.

cheers,
-roger

#4 lore raw

PATCH v3 2/4 ARM: dts: omap4-panda: Provide USB PHY clock

In reply to Roger Quadros

The USB PHY gets its clock from AUXCLK3. Provide this information.

---
 arch/arm/boot/dts/omap4-panda-common.dtsi | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
arch/arm/boot/dts/omap4-panda-common.dtsi +2 -6
index 88c6a05..50b72966 100644
@@ -83,12 +83,8 @@
 		compatible = "usb-nop-xceiv";
 		reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>;   /* gpio_62 */
 		vcc-supply = <&hsusb1_power>;
-	/**
-	 * FIXME:
-	 * put the right clock phandle here when available
-	 *	clocks = <&auxclk3>;
-	 *	clock-names = "main_clk";
-	 */
+		clocks = <&auxclk3_ck>;
+		clock-names = "main_clk";
 		clock-frequency = <19200000>;
 	};
 
Signature · 1 line
1.8.3.2
#5 lore raw

PATCH v3 3/4 ARM: dts: omap5-uevm: Provide USB PHY clock

In reply to Roger Quadros

The HS USB 2 PHY gets its clock from AUXCLK1. Provide this information.

---
 arch/arm/boot/dts/omap5-uevm.dts | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
arch/arm/boot/dts/omap5-uevm.dts +2 -6
index 002fa70..3b99ec2 100644
@@ -31,12 +31,8 @@
 	hsusb2_phy: hsusb2_phy {
 		compatible = "usb-nop-xceiv";
 		reset-gpios = <&gpio3 16 GPIO_ACTIVE_LOW>; /* gpio3_80 HUB_NRESET */
-	/**
-	  * FIXME
-	  * Put the right clock phandle here when available
-	  *	clocks = <&auxclk1>;
-	  *	clock-names = "main_clk";
-	  */
+		clocks = <&auxclk1_ck>;
+		clock-names = "main_clk";
 		clock-frequency = <19200000>;
 	};
 
Signature · 1 line
1.8.3.2
#6 lore raw

PATCH v3 4/4 ARM: OMAP2+: Remove legacy_init_ehci_clk()

In reply to Roger Quadros

The necessary clock phandle for the EHCI clock is now provided via device tree so we no longer need this legacy method.

---
 arch/arm/mach-omap2/pdata-quirks.c | 16 ----------------
 1 file changed, 16 deletions(-)
arch/arm/mach-omap2/pdata-quirks.c +0 -16
index 39f020c..6a4e2d1 100644
@@ -26,20 +26,6 @@ struct pdata_init {
 	void (*fn)(void);
 };
 
-/*
- * Create alias for USB host PHY clock.
- * Remove this when clock phandle can be provided via DT
- */
-static void __init __used legacy_init_ehci_clk(char *clkname)
-{
-	int ret;
-
-	ret = clk_add_alias("main_clk", NULL, clkname, NULL);
-	if (ret)
-		pr_err("%s:Failed to add main_clk alias to %s :%d\n",
-		       __func__, clkname, ret);
-}
-
 #if IS_ENABLED(CONFIG_WL12XX)
 
 static struct wl12xx_platform_data wl12xx __initdata;
@@ -105,7 +91,6 @@ static void __init omap4_sdp_legacy_init(void)
 static void __init omap4_panda_legacy_init(void)
 {
 	omap4_panda_display_init_of();
-	legacy_init_ehci_clk("auxclk3_ck");
 	legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 53);
 }
 #endif
@@ -113,7 +98,6 @@ static void __init omap4_panda_legacy_init(void)
 #ifdef CONFIG_SOC_OMAP5
 static void __init omap5_uevm_legacy_init(void)
 {
-	legacy_init_ehci_clk("auxclk1_ck");
 }
 #endif
 
Signature · 1 line
1.8.3.2