Skip to contentSkip to conversation

USB Host support for OMAP5 uEVM

PATCH In review Roger Quadros 3 participants 24 messages Feb 27, 2014 – Mar 13, 2014

Subsystems (10)
lore
Share & tools
lore
#0 lore raw

v9 cover USB Host support for OMAP5 uEVM

Hi,

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

It also does some cleanup with respect to DT clock binding for the mfd/omap-usb-host driver.

Please queue these for -next.

Lee,

I've folded some platform data dependent patches with mfd patches so that they don't break functionality when applied individually. You can safely pull in all MFD patches (1 to 6).

Tony & Benoit,

Can you please accept patches 7, 8 and 9?

Thanks.

Tested on:
- OMAP5 uEVM
- Pandaboard ES Rev. B1
- Beagleboard-XM Rev C2 (DT + Legacy)
- Beagleboard Rev C4 (DT + Legacy)

Changelog:

v9:
- Folded dependent platform data patches into MFD patches.

v8:
- Addressed review comments and split patch
"mfd: omap-usb-host: Get clocks based on hardware revision"
- Removed unnecessary usb host dummy clocks on OMAP3
- Removed unnecessary clock alias "ehci_logic_fck" for OMAP3
- Rebased on 3.14-rc3

v7:
- Rebased on 3.14-rc2
- Removed incompatible ids from DT files and examples

v6:
- Initialized clocks to -ENODEV and split patch 3.

v5:
- Expose all clocks in the DT binding document for mfd:omap-usb-host and mfd:omap-usb-tll

v4:
- Updated DT binding document for clock binding

v3:
- Rebased on top of 3.13-rc7

cheers,
-roger

---
Roger Quadros (9):
mfd: omap-usb-host: Get clocks based on hardware revision
mfd: omap-usb-host: Always fail on clk_get() error
mfd: omap-usb-host: Use proper clock name instead of alias
mfd: omap-usb-host: Use clock names as per function for reference
clocks
mfd: omap-usb-host: Update DT clock binding information
mfd: omap-usb-tll: Update DT clock binding information
ARM: OMAP2+: Remove legacy_init_ehci_clk()
ARM: dts: OMAP2+: Get rid of incompatible ids for USB host nodes
usb: omap: dts: Update DT binding example usage

 .../devicetree/bindings/mfd/omap-usb-host.txt      |  23 ++++
 .../devicetree/bindings/mfd/omap-usb-tll.txt       |  10 ++
 .../devicetree/bindings/usb/ehci-omap.txt          |   2 +-
 .../devicetree/bindings/usb/ohci-omap3.txt         |   2 +-
 arch/arm/boot/dts/omap3.dtsi                       |   4 +-
 arch/arm/boot/dts/omap4-panda-common.dtsi          |   8 +-
 arch/arm/boot/dts/omap4.dtsi                       |  10 +-
 arch/arm/boot/dts/omap5-uevm.dts                   |   8 +-
 arch/arm/boot/dts/omap5.dtsi                       |  10 +-
 arch/arm/mach-omap2/cclock3xxx_data.c              |   4 -
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c         |   6 --
 arch/arm/mach-omap2/pdata-quirks.c                 |  16 ---
 drivers/clk/ti/clk-3xxx.c                          |   4 -
 drivers/mfd/omap-usb-host.c                        | 116 ++++++++++++++-------
 14 files changed, 135 insertions(+), 88 deletions(-)
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH v9 1/9 mfd: omap-usb-host: Get clocks based on hardware revision

Not all revisions have all the clocks so get the necessary clocks based on hardware revision.

This should avoid un-necessary clk_get failure messages that were observed earlier.

Also remove the dummy USB host clocks from the OMAP3 clock data. These are no longer expected by the driver.

---
 arch/arm/mach-omap2/cclock3xxx_data.c |  4 ----
 drivers/clk/ti/clk-3xxx.c             |  4 ----
 drivers/mfd/omap-usb-host.c           | 43 ++++++++++++++++++++++++++---------
 3 files changed, 32 insertions(+), 19 deletions(-)
arch/arm/mach-omap2/cclock3xxx_data.c +0 -4
index 3b05aea..4299a55 100644
@@ -3495,10 +3495,6 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK(NULL,	"dss_tv_fck",	&dss_tv_fck),
 	CLK(NULL,	"dss_96m_fck",	&dss_96m_fck),
 	CLK(NULL,	"dss2_alwon_fck",	&dss2_alwon_fck),
-	CLK(NULL,	"utmi_p1_gfclk",	&dummy_ck),
-	CLK(NULL,	"utmi_p2_gfclk",	&dummy_ck),
-	CLK(NULL,	"xclk60mhsp1_ck",	&dummy_ck),
-	CLK(NULL,	"xclk60mhsp2_ck",	&dummy_ck),
 	CLK(NULL,	"init_60m_fclk",	&dummy_ck),
 	CLK(NULL,	"gpt1_fck",	&gpt1_fck),
 	CLK(NULL,	"aes2_ick",	&aes2_ick),
drivers/clk/ti/clk-3xxx.c +0 -4
index d323023..0d1750a 100644
@@ -130,10 +130,6 @@ static struct ti_dt_clk omap3xxx_clks[] = {
 	DT_CLK(NULL, "dss_tv_fck", "dss_tv_fck"),
 	DT_CLK(NULL, "dss_96m_fck", "dss_96m_fck"),
 	DT_CLK(NULL, "dss2_alwon_fck", "dss2_alwon_fck"),
-	DT_CLK(NULL, "utmi_p1_gfclk", "dummy_ck"),
-	DT_CLK(NULL, "utmi_p2_gfclk", "dummy_ck"),
-	DT_CLK(NULL, "xclk60mhsp1_ck", "dummy_ck"),
-	DT_CLK(NULL, "xclk60mhsp2_ck", "dummy_ck"),
 	DT_CLK(NULL, "init_60m_fclk", "dummy_ck"),
 	DT_CLK(NULL, "gpt1_fck", "gpt1_fck"),
 	DT_CLK(NULL, "aes2_ick", "aes2_ick"),
drivers/mfd/omap-usb-host.c +32 -11

67 lines not on this page · raw message

Signature · 1 line
1.8.3.2
Acked-by on v9 1/9
#2 lore raw

Re: [PATCH v9 1/9] mfd: omap-usb-host: Get clocks based on hardware revision

Quoted 14 lines

Not all revisions have all the clocks so get the necessary clocks based on hardware revision.

This should avoid un-necessary clk_get failure messages that were observed earlier.

Also remove the dummy USB host clocks from the OMAP3 clock data. These are no longer expected by the driver.

Quoted 5 lines
---
 arch/arm/mach-omap2/cclock3xxx_data.c |  4 ----
 drivers/clk/ti/clk-3xxx.c             |  4 ----
 drivers/mfd/omap-usb-host.c           | 43 ++++++++++++++++++++++++++---------
 3 files changed, 32 insertions(+), 19 deletions(-)

Patches starting to take shape. I know that I've reviewed this patch before, so if you've fixed-up all my previous comments you can have my Ack for the MFD changes:

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#3 lore raw

PATCH v9 2/9 mfd: omap-usb-host: Always fail on clk_get() error

In reply to Roger Quadros

Be more strict and always fail on clk_get() error.

CC Lee Jones <[email protected]>
CC Samuel Ortiz <[email protected]>
---
 drivers/mfd/omap-usb-host.c | 62 +++++++++++++++++++++++++++++----------------
 1 file changed, 40 insertions(+), 22 deletions(-)
drivers/mfd/omap-usb-host.c +40 -22
index c63bfdf..c31baa7 100644
@@ -695,7 +695,8 @@ static int usbhs_omap_probe(struct platform_device *pdev)
 							    "ehci_logic_fck");
 			if (IS_ERR(omap->ehci_logic_fck)) {
 				ret = PTR_ERR(omap->ehci_logic_fck);
-				dev_dbg(dev, "ehci_logic_fck failed:%d\n", ret);
+				dev_err(dev, "ehci_logic_fck failed:%d\n", ret);
+				goto err_mem;
 			}
 		}
 		goto initialize;
@@ -749,51 +750,68 @@ static int usbhs_omap_probe(struct platform_device *pdev)
 		 * them
 		 */
 		omap->utmi_clk[i] = devm_clk_get(dev, clkname);
-		if (IS_ERR(omap->utmi_clk[i]))
-			dev_dbg(dev, "Failed to get clock : %s : %ld\n",
-				clkname, PTR_ERR(omap->utmi_clk[i]));
+		if (IS_ERR(omap->utmi_clk[i])) {
+			ret = PTR_ERR(omap->utmi_clk[i]);
+			dev_err(dev, "Failed to get clock : %s : %d\n",
+				clkname, ret);
+			goto err_mem;
+		}
 
 		snprintf(clkname, sizeof(clkname),
 				"usb_host_hs_hsic480m_p%d_clk", i + 1);
 		omap->hsic480m_clk[i] = devm_clk_get(dev, clkname);
-		if (IS_ERR(omap->hsic480m_clk[i]))
-			dev_dbg(dev, "Failed to get clock : %s : %ld\n",
-				clkname, PTR_ERR(omap->hsic480m_clk[i]));
+		if (IS_ERR(omap->hsic480m_clk[i])) {
+			ret = PTR_ERR(omap->hsic480m_clk[i]);
+			dev_err(dev, "Failed to get clock : %s : %d\n",
+				clkname, ret);
+			goto err_mem;
+		}
 
 		snprintf(clkname, sizeof(clkname),
 				"usb_host_hs_hsic60m_p%d_clk", i + 1);
 		omap->hsic60m_clk[i] = devm_clk_get(dev, clkname);
-		if (IS_ERR(omap->hsic60m_clk[i]))
-			dev_dbg(dev, "Failed to get clock : %s : %ld\n",
-				clkname, PTR_ERR(omap->hsic60m_clk[i]));
+		if (IS_ERR(omap->hsic60m_clk[i])) {
+			ret = PTR_ERR(omap->hsic60m_clk[i]);
+			dev_err(dev, "Failed to get clock : %s : %d\n",
+				clkname, ret);
+			goto err_mem;
+		}
 	}
 
 	if (is_ehci_phy_mode(pdata->port_mode[0])) {
 		ret = clk_set_parent(omap->utmi_p1_gfclk,
 					omap->xclk60mhsp1_ck);
-		if (ret != 0)
-			dev_dbg(dev, "xclk60mhsp1_ck set parent failed: %d\n",
-					ret);
+		if (ret != 0) {
+			dev_err(dev, "xclk60mhsp1_ck set parent failed: %d\n",
+				ret);
+			goto err_mem;
+		}
 	} else if (is_ehci_tll_mode(pdata->port_mode[0])) {
 		ret = clk_set_parent(omap->utmi_p1_gfclk,
 					omap->init_60m_fclk);
-		if (ret != 0)
-			dev_dbg(dev, "P0 init_60m_fclk set parent failed: %d\n",
-					ret);
+		if (ret != 0) {
+			dev_err(dev, "P0 init_60m_fclk set parent failed: %d\n",
+				ret);
+			goto err_mem;
+		}
 	}
 
 	if (is_ehci_phy_mode(pdata->port_mode[1])) {
 		ret = clk_set_parent(omap->utmi_p2_gfclk,
 					omap->xclk60mhsp2_ck);
-		if (ret != 0)
-			dev_dbg(dev, "xclk60mhsp2_ck set parent failed: %d\n",
-					ret);
+		if (ret != 0) {
+			dev_err(dev, "xclk60mhsp2_ck set parent failed: %d\n",
+				ret);
+			goto err_mem;
+		}
 	} else if (is_ehci_tll_mode(pdata->port_mode[1])) {
 		ret = clk_set_parent(omap->utmi_p2_gfclk,
 						omap->init_60m_fclk);
-		if (ret != 0)
-			dev_dbg(dev, "P1 init_60m_fclk set parent failed: %d\n",
-					ret);
+		if (ret != 0) {
+			dev_err(dev, "P1 init_60m_fclk set parent failed: %d\n",
+				ret);
+			goto err_mem;
+		}
 	}
 
 initialize:
Signature · 1 line
1.8.3.2
Acked-by on v9 2/9
#4 lore raw

Re: [PATCH v9 2/9] mfd: omap-usb-host: Always fail on clk_get() error

Quoted 8 lines

Be more strict and always fail on clk_get() error.

CC Lee Jones <[email protected]>
CC Samuel Ortiz <[email protected]>
---
 drivers/mfd/omap-usb-host.c | 62 +++++++++++++++++++++++++++++----------------
 1 file changed, 40 insertions(+), 22 deletions(-)

I like to principle of the patch assuming that the devices would be useless without their clocks.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#5 lore raw

PATCH v9 3/9 mfd: omap-usb-host: Use proper clock name instead of alias

In reply to Roger Quadros

Use the proper clock name 'usbhost_120m_fck' instead of the alias 'ehci_logic_fck'

Get rid of the 'ehci_logic_fck' alias from the OMAP3 hwmod data as well.

CC Paul Walmsley <[email protected]>
CC Lee Jones <[email protected]>
CC Samuel Ortiz <[email protected]>
---
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 6 ------
 drivers/mfd/omap-usb-host.c                | 5 +++--
 2 files changed, 3 insertions(+), 8 deletions(-)
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +0 -6
index 4c3b1e6..ad87f46 100644
@@ -1955,10 +1955,6 @@ static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
 	.sysc = &omap3xxx_usb_host_hs_sysc,
 };
 
-static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
-	  { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", },
-};
-
 static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
 	{ .name = "ohci-irq", .irq = 76 + OMAP_INTC_START, },
 	{ .name = "ehci-irq", .irq = 77 + OMAP_INTC_START, },
@@ -1981,8 +1977,6 @@ static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
 			.idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
 		},
 	},
-	.opt_clks	= omap3xxx_usb_host_hs_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks),
 
 	/*
 	 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
drivers/mfd/omap-usb-host.c +3 -2
index c31baa7..865c276 100644
@@ -692,10 +692,11 @@ static int usbhs_omap_probe(struct platform_device *pdev)
 
 		if (need_logic_fck) {
 			omap->ehci_logic_fck = devm_clk_get(dev,
-							    "ehci_logic_fck");
+							    "usbhost_120m_fck");
 			if (IS_ERR(omap->ehci_logic_fck)) {
 				ret = PTR_ERR(omap->ehci_logic_fck);
-				dev_err(dev, "ehci_logic_fck failed:%d\n", ret);
+				dev_err(dev, "usbhost_120m_fck failed:%d\n",
+					ret);
 				goto err_mem;
 			}
 		}
Signature · 1 line
1.8.3.2
Acked-by on v9 3/9
#6 lore raw

Re: [PATCH v9 3/9] mfd: omap-usb-host: Use proper clock name instead of alias

Quoted 6 lines

Use the proper clock name 'usbhost_120m_fck' instead of the alias 'ehci_logic_fck'

Get rid of the 'ehci_logic_fck' alias from the OMAP3 hwmod data as well.

Quoted 8 lines
CC Paul Walmsley <[email protected]>
CC Lee Jones <[email protected]>
CC Samuel Ortiz <[email protected]>
---
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 6 ------
 drivers/mfd/omap-usb-host.c                | 5 +++--
 2 files changed, 3 insertions(+), 8 deletions(-)

So long as the platform guys are okay with the semantic change, the MFD diff looks okay to me. For the MFD changes:

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#7 lore raw

PATCH v9 4/9 mfd: omap-usb-host: Use clock names as per function for reference clocks

In reply to Roger Quadros

Use a meaningful name for the reference clocks so that it indicates the function.

Update the OMAP4+ USB Host node as well to be in sync with the changes.

CC Beno?t Cousson <[email protected]>
CC Lee Jones <[email protected]>
CC Samuel Ortiz <[email protected]>
---
 arch/arm/boot/dts/omap4.dtsi |  6 ++++++
 arch/arm/boot/dts/omap5.dtsi |  6 ++++++
 drivers/mfd/omap-usb-host.c  | 12 ++++++------
 3 files changed, 18 insertions(+), 6 deletions(-)
arch/arm/boot/dts/omap4.dtsi +6 -0
index d3f8a6e..39a05ce 100644
@@ -697,6 +697,12 @@
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ranges;
+			clocks = <&init_60m_fclk>,
+				 <&xclk60mhsp1_ck>,
+				 <&xclk60mhsp2_ck>;
+			clock-names = "refclk_60m_int",
+				      "refclk_60m_ext_p1",
+				      "refclk_60m_ext_p2";
 
 			usbhsohci: ohci at 4a064800 {
 				compatible = "ti,ohci-omap3", "usb-ohci";
arch/arm/boot/dts/omap5.dtsi +6 -0
index a72813a..d4dae48 100644
@@ -775,6 +775,12 @@
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ranges;
+			clocks = <&l3init_60m_fclk>,
+				 <&xclk60mhsp1_ck>,
+				 <&xclk60mhsp2_ck>;
+			clock-names = "refclk_60m_int",
+				      "refclk_60m_ext_p1",
+				      "refclk_60m_ext_p2";
 
 			usbhsohci: ohci at 4a064800 {
 				compatible = "ti,ohci-omap3", "usb-ohci";
drivers/mfd/omap-usb-host.c +6 -6
index 865c276..651e249 100644
@@ -718,24 +718,24 @@ static int usbhs_omap_probe(struct platform_device *pdev)
 		goto err_mem;
 	}
 
-	omap->xclk60mhsp1_ck = devm_clk_get(dev, "xclk60mhsp1_ck");
+	omap->xclk60mhsp1_ck = devm_clk_get(dev, "refclk_60m_ext_p1");
 	if (IS_ERR(omap->xclk60mhsp1_ck)) {
 		ret = PTR_ERR(omap->xclk60mhsp1_ck);
-		dev_err(dev, "xclk60mhsp1_ck failed error:%d\n", ret);
+		dev_err(dev, "refclk_60m_ext_p1 failed error:%d\n", ret);
 		goto err_mem;
 	}
 
-	omap->xclk60mhsp2_ck = devm_clk_get(dev, "xclk60mhsp2_ck");
+	omap->xclk60mhsp2_ck = devm_clk_get(dev, "refclk_60m_ext_p2");
 	if (IS_ERR(omap->xclk60mhsp2_ck)) {
 		ret = PTR_ERR(omap->xclk60mhsp2_ck);
-		dev_err(dev, "xclk60mhsp2_ck failed error:%d\n", ret);
+		dev_err(dev, "refclk_60m_ext_p2 failed error:%d\n", ret);
 		goto err_mem;
 	}
 
-	omap->init_60m_fclk = devm_clk_get(dev, "init_60m_fclk");
+	omap->init_60m_fclk = devm_clk_get(dev, "refclk_60m_int");
 	if (IS_ERR(omap->init_60m_fclk)) {
 		ret = PTR_ERR(omap->init_60m_fclk);
-		dev_err(dev, "init_60m_fclk failed error:%d\n", ret);
+		dev_err(dev, "refclk_60m_int failed error:%d\n", ret);
 		goto err_mem;
 	}
 
Signature · 1 line
1.8.3.2
Acked-by on v9 4/9
#8 lore raw

Re: [PATCH v9 4/9] mfd: omap-usb-host: Use clock names as per function for reference clocks

Quoted 8 lines

Use a meaningful name for the reference clocks so that it indicates the function.

Update the OMAP4+ USB Host node as well to be in sync with the changes.

CC Beno?t Cousson <[email protected]>
CC Lee Jones <[email protected]>
CC Samuel Ortiz <[email protected]>
Quoted 5 lines
---
 arch/arm/boot/dts/omap4.dtsi |  6 ++++++
 arch/arm/boot/dts/omap5.dtsi |  6 ++++++
 drivers/mfd/omap-usb-host.c  | 12 ++++++------
 3 files changed, 18 insertions(+), 6 deletions(-)

The code looks fine and I queried the name change semantics before and was satisfied with your answer, so as long as this patch has been tested and nothing is broken:

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#9 lore raw

PATCH v9 5/9 mfd: omap-usb-host: Update DT clock binding information

In reply to Roger Quadros

The omap-usb-host driver expects certained named clocks. Add this information to the DT binding document.

CC Lee Jones <[email protected]>
CC Samuel Ortiz <[email protected]>
---
 .../devicetree/bindings/mfd/omap-usb-host.txt      | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
Documentation/devicetree/bindings/mfd/omap-usb-host.txt +23 -0
index b381fa6..4721b2d 100644
@@ -32,6 +32,29 @@ Optional properties:
 - single-ulpi-bypass: Must be present if the controller contains a single
   ULPI bypass control bit. e.g. OMAP3 silicon <= ES2.1
 
+- clocks: a list of phandles and clock-specifier pairs, one for each entry in
+  clock-names.
+
+- clock-names: should include:
+  For OMAP3
+  * "usbhost_120m_fck" - 120MHz Functional clock.
+
+  For OMAP4+
+  * "refclk_60m_int" - 60MHz internal reference clock for UTMI clock mux
+  * "refclk_60m_ext_p1" - 60MHz external ref. clock for Port 1's UTMI clock mux.
+  * "refclk_60m_ext_p2" - 60MHz external ref. clock for Port 2's UTMI clock mux
+  * "utmi_p1_gfclk" - Port 1 UTMI clock mux.
+  * "utmi_p2_gfclk" - Port 2 UTMI clock mux.
+  * "usb_host_hs_utmi_p1_clk" - Port 1 UTMI clock gate.
+  * "usb_host_hs_utmi_p2_clk" - Port 2 UTMI clock gate.
+  * "usb_host_hs_utmi_p3_clk" - Port 3 UTMI clock gate.
+  * "usb_host_hs_hsic480m_p1_clk" - Port 1 480MHz HSIC clock gate.
+  * "usb_host_hs_hsic480m_p2_clk" - Port 2 480MHz HSIC clock gate.
+  * "usb_host_hs_hsic480m_p3_clk" - Port 3 480MHz HSIC clock gate.
+  * "usb_host_hs_hsic60m_p1_clk" - Port 1 60MHz HSIC clock gate.
+  * "usb_host_hs_hsic60m_p2_clk" - Port 2 60MHz HSIC clock gate.
+  * "usb_host_hs_hsic60m_p3_clk" - Port 3 60MHz HSIC clock gate.
+
 Required properties if child node exists:
 
 - #address-cells: Must be 1
Signature · 1 line
1.8.3.2
#10 lore raw

PATCH v9 6/9 mfd: omap-usb-tll: Update DT clock binding information

In reply to Roger Quadros

The omap-usb-tll driver needs one clock for each TLL channel. Add this information to the DT binding document.

CC Lee Jones <[email protected]>
CC Samuel Ortiz <[email protected]>
---
 Documentation/devicetree/bindings/mfd/omap-usb-tll.txt | 10 ++++++++++
 1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/mfd/omap-usb-tll.txt +10 -0
index 62fe697..c58d704 100644
@@ -7,6 +7,16 @@ Required properties:
 - interrupts : should contain the TLL module's interrupt
 - ti,hwmod : must contain "usb_tll_hs"
 
+Optional properties:
+
+- clocks: a list of phandles and clock-specifier pairs, one for each entry in
+  clock-names.
+
+- clock-names: should include:
+  * "usb_tll_hs_usb_ch0_clk" - USB TLL channel 0 clock
+  * "usb_tll_hs_usb_ch1_clk" - USB TLL channel 1 clock
+  * "usb_tll_hs_usb_ch2_clk" - USB TLL channel 2 clock
+
 Example:
 
 	usbhstll: usbhstll at 4a062000 {
Signature · 1 line
1.8.3.2
#11 lore raw

PATCH v9 7/9 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.

Update the omap4-panda and omap5-uevm board DTS to provide the necessary EHCI PHY clock information.

---
 arch/arm/boot/dts/omap4-panda-common.dtsi |  8 ++------
 arch/arm/boot/dts/omap5-uevm.dts          |  8 ++------
 arch/arm/mach-omap2/pdata-quirks.c        | 16 ----------------
 3 files changed, 4 insertions(+), 28 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>;
 	};
 
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>;
 	};
 
arch/arm/mach-omap2/pdata-quirks.c +0 -16
index 3d5b24d..f1ecd86 100644
@@ -31,20 +31,6 @@ struct pdata_init {
 struct of_dev_auxdata omap_auxdata_lookup[];
 static struct twl4030_gpio_platform_data twl_gpio_auxdata;
 
-/*
- * 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;
@@ -182,7 +168,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
@@ -190,7 +175,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
#12 lore raw

PATCH v9 8/9 ARM: dts: OMAP2+: Get rid of incompatible ids for USB host nodes

In reply to Roger Quadros

The OMAP EHCI and OHCI controllers are not compatible with drivers other than "ti,ehci-omap" and "ti,ohci-omap3" respectively, so get rid of the incompatible ids.

CC Alan Stern <[email protected]>
CC Nishant Menon <[email protected]>
CC Kevin Hilman <[email protected]>
---
 arch/arm/boot/dts/omap3.dtsi | 4 ++--
 arch/arm/boot/dts/omap4.dtsi | 4 ++--
 arch/arm/boot/dts/omap5.dtsi | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/omap3.dtsi +2 -2
index a5fc83b..8e7de9e 100644
@@ -634,14 +634,14 @@
 			ranges;
 
 			usbhsohci: ohci at 48064400 {
-				compatible = "ti,ohci-omap3", "usb-ohci";
+				compatible = "ti,ohci-omap3";
 				reg = <0x48064400 0x400>;
 				interrupt-parent = <&intc>;
 				interrupts = <76>;
 			};
 
 			usbhsehci: ehci at 48064800 {
-				compatible = "ti,ehci-omap", "usb-ehci";
+				compatible = "ti,ehci-omap";
 				reg = <0x48064800 0x400>;
 				interrupt-parent = <&intc>;
 				interrupts = <77>;
arch/arm/boot/dts/omap4.dtsi +2 -2
index 39a05ce..ff1b057 100644
@@ -705,14 +705,14 @@
 				      "refclk_60m_ext_p2";
 
 			usbhsohci: ohci at 4a064800 {
-				compatible = "ti,ohci-omap3", "usb-ohci";
+				compatible = "ti,ohci-omap3";
 				reg = <0x4a064800 0x400>;
 				interrupt-parent = <&gic>;
 				interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
 			};
 
 			usbhsehci: ehci at 4a064c00 {
-				compatible = "ti,ehci-omap", "usb-ehci";
+				compatible = "ti,ehci-omap";
 				reg = <0x4a064c00 0x400>;
 				interrupt-parent = <&gic>;
 				interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
arch/arm/boot/dts/omap5.dtsi +2 -2
index d4dae48..f65aa65 100644
@@ -783,14 +783,14 @@
 				      "refclk_60m_ext_p2";
 
 			usbhsohci: ohci at 4a064800 {
-				compatible = "ti,ohci-omap3", "usb-ohci";
+				compatible = "ti,ohci-omap3";
 				reg = <0x4a064800 0x400>;
 				interrupt-parent = <&gic>;
 				interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
 			};
 
 			usbhsehci: ehci at 4a064c00 {
-				compatible = "ti,ehci-omap", "usb-ehci";
+				compatible = "ti,ehci-omap";
 				reg = <0x4a064c00 0x400>;
 				interrupt-parent = <&gic>;
 				interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
1.8.3.2
#13 lore raw

PATCH v9 9/9 usb: omap: dts: Update DT binding example usage

In reply to Roger Quadros

Remove non-compatible id from examples.

CC Alan Stern <[email protected]>
CC Nishant Menon <[email protected]>
CC Kevin Hilman <[email protected]>
---
 Documentation/devicetree/bindings/usb/ehci-omap.txt  | 2 +-
 Documentation/devicetree/bindings/usb/ohci-omap3.txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/usb/ehci-omap.txt +1 -1
index 485a9a1..3dc231c 100644
@@ -21,7 +21,7 @@ Documentation/devicetree/bindings/mfd/omap-usb-host.txt
 Example for OMAP4:
 
 usbhsehci: ehci at 4a064c00 {
-	compatible = "ti,ehci-omap", "usb-ehci";
+	compatible = "ti,ehci-omap";
 	reg = <0x4a064c00 0x400>;
 	interrupts = <0 77 0x4>;
 };
Documentation/devicetree/bindings/usb/ohci-omap3.txt +1 -1
index 14ab428..ce8c47cff 100644
@@ -9,7 +9,7 @@ Required properties:
 Example for OMAP4:
 
 usbhsohci: ohci at 4a064800 {
-	compatible = "ti,ohci-omap3", "usb-ohci";
+	compatible = "ti,ohci-omap3";
 	reg = <0x4a064800 0x400>;
 	interrupts = <0 76 0x4>;
 };
Signature · 1 line
1.8.3.2
maintainer
#14 lore raw
In reply to Roger Quadros
Quoted 12 lines · Roger Quadros

Hi,

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

It also does some cleanup with respect to DT clock binding for the mfd/omap-usb-host driver.

Please queue these for -next.

Lee,

Quoted 7 lines

I've folded some platform data dependent patches with mfd patches so that they don't break functionality when applied individually. You can safely pull in all MFD patches (1 to 6).

Tony & Benoit,

Can you please accept patches 7, 8 and 9?

Are 7, 8 and 9 safe to queue separately from the MFD changes or do they need to wait for the MFD changes to get merged first?

Regards,

Tony

#15 lore raw

Hi Tony,

Quoted 17 lines · Tony Lindgren
Quoted 16 lines · Roger Quadros

Hi,

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

It also does some cleanup with respect to DT clock binding for the mfd/omap-usb-host driver.

Please queue these for -next.

Lee,

I've folded some platform data dependent patches with mfd patches so that they don't break functionality when applied individually. You can safely pull in all MFD patches (1 to 6).

Quoted 8 lines
Quoted 3 lines

Tony & Benoit,

Can you please accept patches 7, 8 and 9?

Are 7, 8 and 9 safe to queue separately from the MFD changes or do they need to wait for the MFD changes to get merged first?

They are safe to queue separately.

cheers,
-roger

maintainer
#16 lore raw
Quoted 22 lines · Roger Quadros

Hi Tony,

Quoted 19 lines · Tony Lindgren
Quoted 18 lines · Roger Quadros

Hi,

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

It also does some cleanup with respect to DT clock binding for the mfd/omap-usb-host driver.

Please queue these for -next.

Lee,

I've folded some platform data dependent patches with mfd patches so that they don't break functionality when applied individually. You can safely pull in all MFD patches (1 to 6).

Tony & Benoit,

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Can you please accept patches 7, 8 and 9?

Are 7, 8 and 9 safe to queue separately from the MFD changes or do they need to wait for the MFD changes to get merged first?

They are safe to queue separately.

OK thanks applying 7, 8 and 9 into omap-for-v3.15/dt.

Regards,

Tony

#17 lore raw
In reply to Roger Quadros

Hi Lee,

Quoted 12 lines · Roger Quadros

Hi,

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

It also does some cleanup with respect to DT clock binding for the mfd/omap-usb-host driver.

Please queue these for -next.

Lee,

Quoted 7 lines

I've folded some platform data dependent patches with mfd patches so that they don't break functionality when applied individually. You can safely pull in all MFD patches (1 to 6).

Tony & Benoit,

Can you please accept patches 7, 8 and 9?

Tony has already picked up 7,8 and 9 through omap-soc tree.

Since you acked most patches except 5 and 6, are you fine if Tony takes all the patches 1 to 4 in this series via omap-soc tree?

What about patches 5 and 6?

cheers,
-roger

Quoted 70 lines

Thanks.

Tested on:
- OMAP5 uEVM
- Pandaboard ES Rev. B1
- Beagleboard-XM Rev C2 (DT + Legacy)
- Beagleboard Rev C4 (DT + Legacy)

Changelog:

v9:
- Folded dependent platform data patches into MFD patches.

v8:
- Addressed review comments and split patch
"mfd: omap-usb-host: Get clocks based on hardware revision"
- Removed unnecessary usb host dummy clocks on OMAP3
- Removed unnecessary clock alias "ehci_logic_fck" for OMAP3
- Rebased on 3.14-rc3

v7:
- Rebased on 3.14-rc2
- Removed incompatible ids from DT files and examples

v6:
- Initialized clocks to -ENODEV and split patch 3.

v5:
- Expose all clocks in the DT binding document for mfd:omap-usb-host and mfd:omap-usb-tll

v4:
- Updated DT binding document for clock binding

v3:
- Rebased on top of 3.13-rc7

cheers,
-roger

---
Roger Quadros (9):
mfd: omap-usb-host: Get clocks based on hardware revision
mfd: omap-usb-host: Always fail on clk_get() error
mfd: omap-usb-host: Use proper clock name instead of alias
mfd: omap-usb-host: Use clock names as per function for reference
clocks
mfd: omap-usb-host: Update DT clock binding information
mfd: omap-usb-tll: Update DT clock binding information
ARM: OMAP2+: Remove legacy_init_ehci_clk()
ARM: dts: OMAP2+: Get rid of incompatible ids for USB host nodes
usb: omap: dts: Update DT binding example usage

 .../devicetree/bindings/mfd/omap-usb-host.txt      |  23 ++++
 .../devicetree/bindings/mfd/omap-usb-tll.txt       |  10 ++
 .../devicetree/bindings/usb/ehci-omap.txt          |   2 +-
 .../devicetree/bindings/usb/ohci-omap3.txt         |   2 +-
 arch/arm/boot/dts/omap3.dtsi                       |   4 +-
 arch/arm/boot/dts/omap4-panda-common.dtsi          |   8 +-
 arch/arm/boot/dts/omap4.dtsi                       |  10 +-
 arch/arm/boot/dts/omap5-uevm.dts                   |   8 +-
 arch/arm/boot/dts/omap5.dtsi                       |  10 +-
 arch/arm/mach-omap2/cclock3xxx_data.c              |   4 -
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c         |   6 --
 arch/arm/mach-omap2/pdata-quirks.c                 |  16 ---
 drivers/clk/ti/clk-3xxx.c                          |   4 -
 drivers/mfd/omap-usb-host.c                        | 116 ++++++++++++++-------
 14 files changed, 135 insertions(+), 88 deletions(-)
#18 lore raw
Quoted 18 lines
Quoted 18 lines

Hi,

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

It also does some cleanup with respect to DT clock binding for the mfd/omap-usb-host driver.

Please queue these for -next.

Lee,

I've folded some platform data dependent patches with mfd patches so that they don't break functionality when applied individually. You can safely pull in all MFD patches (1 to 6).

Tony & Benoit,

Quoted 8 lines
Quoted 1 line

Can you please accept patches 7, 8 and 9?

Tony has already picked up 7,8 and 9 through omap-soc tree.

Since you acked most patches except 5 and 6, are you fine if Tony takes all the patches 1 to 4 in this series via omap-soc tree?

What about patches 5 and 6?

Any patches which are orthogonal can just be sucked into whichever tree they belong in. If there are inter-subsystem dependencies I'd prefer to take them and issue a immutable branch pull-request to the other maintainers.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#19 lore raw
Quoted 25 lines · Lee Jones
Quoted 25 lines
Quoted 12 lines

Hi,

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

It also does some cleanup with respect to DT clock binding for the mfd/omap-usb-host driver.

Please queue these for -next.

Lee,

Quoted 7 lines

I've folded some platform data dependent patches with mfd patches so that they don't break functionality when applied individually. You can safely pull in all MFD patches (1 to 6).

Tony & Benoit,

Can you please accept patches 7, 8 and 9?

Tony has already picked up 7,8 and 9 through omap-soc tree.

Since you acked most patches except 5 and 6, are you fine if Tony takes all the patches 1 to 4 in this series via omap-soc tree?

Quoted 7 lines
Quoted 1 line

What about patches 5 and 6?

Any patches which are orthogonal can just be sucked into whichever tree they belong in. If there are inter-subsystem dependencies I'd prefer to take them and issue a immutable branch pull-request to the other maintainers.

Awesome. That would be great, thanks.

cheers,
-roger

#20 lore raw
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Quoted 11 lines

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

It also does some cleanup with respect to DT clock binding for the mfd/omap-usb-host driver.

Please queue these for -next.

Lee,

Quoted 7 lines

I've folded some platform data dependent patches with mfd patches so that they don't break functionality when applied individually. You can safely pull in all MFD patches (1 to 6).

Tony & Benoit,

Can you please accept patches 7, 8 and 9?

Tony has already picked up 7,8 and 9 through omap-soc tree.

Since you acked most patches except 5 and 6, are you fine if Tony takes all the patches 1 to 4 in this series via omap-soc tree?

Quoted 8 lines
Quoted 7 lines
Quoted 1 line

What about patches 5 and 6?

Any patches which are orthogonal can just be sucked into whichever tree they belong in. If there are inter-subsystem dependencies I'd prefer to take them and issue a immutable branch pull-request to the other maintainers.

Awesome. That would be great, thanks.

That does mean I need a) all of the Maintainer Acks and b) you to tell me which ones need to go through a single tree.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#21 lore raw
Quoted 31 lines · Lee Jones
Quoted 31 lines
Quoted 31 lines
Quoted 17 lines
Quoted 17 lines

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

It also does some cleanup with respect to DT clock binding for the mfd/omap-usb-host driver.

Please queue these for -next.

Lee,

I've folded some platform data dependent patches with mfd patches so that they don't break functionality when applied individually. You can safely pull in all MFD patches (1 to 6).

Tony & Benoit,

Quoted 8 lines
Quoted 1 line

Can you please accept patches 7, 8 and 9?

Tony has already picked up 7,8 and 9 through omap-soc tree.

Since you acked most patches except 5 and 6, are you fine if Tony takes all the patches 1 to 4 in this series via omap-soc tree?

What about patches 5 and 6?

Any patches which are orthogonal can just be sucked into whichever tree they belong in. If there are inter-subsystem dependencies I'd prefer to take them and issue a immutable branch pull-request to the other maintainers.

Quoted 5 lines
Quoted 1 line

Awesome. That would be great, thanks.

That does mean I need a) all of the Maintainer Acks and b) you to tell me which ones need to go through a single tree.

You need to take patches 1 to 6 in the MFD tree. Out of these, patches 1 to 4 need to be shared with Tony as an immutable branch.

Tony, could you please Ack patches 1 to 4? Thanks.

cheers,
-roger

maintainer Acked-by
#22 lore raw
Quoted 34 lines · Roger Quadros
Quoted 33 lines · Lee Jones
Quoted 32 lines
Quoted 24 lines
Quoted 24 lines
Quoted 11 lines

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

It also does some cleanup with respect to DT clock binding for the mfd/omap-usb-host driver.

Please queue these for -next.

Lee,

Quoted 7 lines

I've folded some platform data dependent patches with mfd patches so that they don't break functionality when applied individually. You can safely pull in all MFD patches (1 to 6).

Tony & Benoit,

Can you please accept patches 7, 8 and 9?

Tony has already picked up 7,8 and 9 through omap-soc tree.

Since you acked most patches except 5 and 6, are you fine if Tony takes all the patches 1 to 4 in this series via omap-soc tree?

Quoted 7 lines
Quoted 1 line

What about patches 5 and 6?

Any patches which are orthogonal can just be sucked into whichever tree they belong in. If there are inter-subsystem dependencies I'd prefer to take them and issue a immutable branch pull-request to the other maintainers.

Awesome. That would be great, thanks.

Quoted 8 lines
Quoted 3 lines

That does mean I need a) all of the Maintainer Acks and b) you to tell me which ones need to go through a single tree.

You need to take patches 1 to 6 in the MFD tree. Out of these, patches 1 to 4 need to be shared with Tony as an immutable branch.

Tony, could you please Ack patches 1 to 4? Thanks.

Changes in 1 to 6 look OK to me, so for those please feel free to add:

#23 lore raw
Quoted 11 lines
Quoted 7 lines
Quoted 2 lines

That does mean I need a) all of the Maintainer Acks and b) you to tell me which ones need to go through a single tree.

You need to take patches 1 to 6 in the MFD tree. Out of these, patches 1 to 4 need to be shared with Tony as an immutable branch.

Tony, could you please Ack patches 1 to 4? Thanks.

Changes in 1 to 6 look OK to me, so for those please feel free to add:

The following changes since commit 0414855fdc4a40da05221fc6062cccbc0c30f169:

Linux 3.14-rc5 (2014-03-02 18:56:16 -0800)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-omap

for you to fetch changes up to 2e1b365cea4a0a750b8ffd4bc6ca5e9e8020f53e:

mfd: omap-usb-tll: Update DT clock binding information (2014-03-13 22:27:17 +0000)

----------------------------------------------------------------
Colin Ian King (1):
mfd: omap-usb-tll: Fix cppcheck sizeof warning

Roger Quadros (7):
mfd: omap-usb-host: Use resource managed clk_get()
mfd: omap-usb-host: Get clocks based on hardware revision
mfd: omap-usb-host: Always fail on clk_get() error
mfd: omap-usb-host: Use proper clock name instead of alias
mfd: omap-usb-host: Use clock names as per function for reference clocks
mfd: omap-usb-host: Update DT clock binding information
mfd: omap-usb-tll: Update DT clock binding information

 Documentation/devicetree/bindings/mfd/omap-usb-host.txt |  23 ++++++++++++++
 Documentation/devicetree/bindings/mfd/omap-usb-tll.txt  |  10 ++++++
 arch/arm/boot/dts/omap4.dtsi                            |   6 ++++
 arch/arm/boot/dts/omap5.dtsi                            |   6 ++++
 arch/arm/mach-omap2/cclock3xxx_data.c                   |   4 ---
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c              |   6 ----
 drivers/clk/ti/clk-3xxx.c                               |   4 ---
 drivers/mfd/omap-usb-host.c                             | 189 +++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------
 drivers/mfd/omap-usb-tll.c                              |   2 +-
 9 files changed, 136 insertions(+), 114 deletions(-)
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog