Skip to contentSkip to conversation

USB Host support for OMAP5 uEVM

PATCH Applied Roger Quadros 2 participants 21 messages Feb 12, 2014 – Feb 18, 2014

Subsystems (6)

v7 of 9 Applied Latest is v9 →

lore
Share & tools
lore
#0 lore raw

v7 cover USB Host support for OMAP5 uEVM

Hi Benoit, Tony & Lee,

This patchset brings up USB Host ports and Ethernet port on the OMAP5 uEVM board. Please queue these for -next.

Tested on:
- OMAP5 uEVM
- Pandaboard ES Rev. B1
- Beagleboard-XM Rev C2
- Beagleboard Rev C4.

Changelog:

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 (12):
mfd: omap-usb-host: Use resource managed clk_get()
mfd: omap-usb-host: Get clocks based on hardware revision
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: dts: omap4: Update omap-usb-host node
ARM: dts: omap5: Update omap-usb-host node
ARM: dts: omap4-panda: Provide USB PHY clock
ARM: dts: omap5-uevm: Provide USB PHY clock
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/pdata-quirks.c                 |  16 --
 drivers/mfd/omap-usb-host.c                        | 171 ++++++++++-----------
 11 files changed, 136 insertions(+), 128 deletions(-)
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH v7 1/12 mfd: omap-usb-host: Use resource managed clk_get()

Use devm_clk_get() instead of clk_get().

---
 drivers/mfd/omap-usb-host.c | 81 +++++++++------------------------------------
 1 file changed, 16 insertions(+), 65 deletions(-)
drivers/mfd/omap-usb-host.c +16 -65
index 90b630c..0c3c9a0 100644
@@ -674,46 +674,46 @@ static int usbhs_omap_probe(struct platform_device *pdev)
 
 	omap->ehci_logic_fck = ERR_PTR(-EINVAL);
 	if (need_logic_fck) {
-		omap->ehci_logic_fck = clk_get(dev, "ehci_logic_fck");
+		omap->ehci_logic_fck = devm_clk_get(dev, "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);
 		}
 	}
 
-	omap->utmi_p1_gfclk = clk_get(dev, "utmi_p1_gfclk");
+	omap->utmi_p1_gfclk = devm_clk_get(dev, "utmi_p1_gfclk");
 	if (IS_ERR(omap->utmi_p1_gfclk)) {
 		ret = PTR_ERR(omap->utmi_p1_gfclk);
 		dev_err(dev, "utmi_p1_gfclk failed error:%d\n", ret);
-		goto err_p1_gfclk;
+		goto err_mem;
 	}
 
-	omap->utmi_p2_gfclk = clk_get(dev, "utmi_p2_gfclk");
+	omap->utmi_p2_gfclk = devm_clk_get(dev, "utmi_p2_gfclk");
 	if (IS_ERR(omap->utmi_p2_gfclk)) {
 		ret = PTR_ERR(omap->utmi_p2_gfclk);
 		dev_err(dev, "utmi_p2_gfclk failed error:%d\n", ret);
-		goto err_p2_gfclk;
+		goto err_mem;
 	}
 
-	omap->xclk60mhsp1_ck = clk_get(dev, "xclk60mhsp1_ck");
+	omap->xclk60mhsp1_ck = devm_clk_get(dev, "xclk60mhsp1_ck");
 	if (IS_ERR(omap->xclk60mhsp1_ck)) {
 		ret = PTR_ERR(omap->xclk60mhsp1_ck);
 		dev_err(dev, "xclk60mhsp1_ck failed error:%d\n", ret);
-		goto err_xclk60mhsp1;
+		goto err_mem;
 	}
 
-	omap->xclk60mhsp2_ck = clk_get(dev, "xclk60mhsp2_ck");
+	omap->xclk60mhsp2_ck = devm_clk_get(dev, "xclk60mhsp2_ck");
 	if (IS_ERR(omap->xclk60mhsp2_ck)) {
 		ret = PTR_ERR(omap->xclk60mhsp2_ck);
 		dev_err(dev, "xclk60mhsp2_ck failed error:%d\n", ret);
-		goto err_xclk60mhsp2;
+		goto err_mem;
 	}
 
-	omap->init_60m_fclk = clk_get(dev, "init_60m_fclk");
+	omap->init_60m_fclk = devm_clk_get(dev, "init_60m_fclk");
 	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);
-		goto err_init60m;
+		goto err_mem;
 	}
 
 	for (i = 0; i < omap->nports; i++) {
@@ -727,21 +727,21 @@ static int usbhs_omap_probe(struct platform_device *pdev)
 		 * platforms have all clocks and we can function without
 		 * them
 		 */
-		omap->utmi_clk[i] = clk_get(dev, clkname);
+		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]));
 
 		snprintf(clkname, sizeof(clkname),
 				"usb_host_hs_hsic480m_p%d_clk", i + 1);
-		omap->hsic480m_clk[i] = clk_get(dev, clkname);
+		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]));
 
 		snprintf(clkname, sizeof(clkname),
 				"usb_host_hs_hsic60m_p%d_clk", i + 1);
-		omap->hsic60m_clk[i] = clk_get(dev, clkname);
+		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]));
@@ -784,7 +784,7 @@ static int usbhs_omap_probe(struct platform_device *pdev)
 
 		if (ret) {
 			dev_err(dev, "Failed to create DT children: %d\n", ret);
-			goto err_alloc;
+			goto err_mem;
 		}
 
 	} else {
@@ -792,40 +792,12 @@ static int usbhs_omap_probe(struct platform_device *pdev)
 		if (ret) {
 			dev_err(dev, "omap_usbhs_alloc_children failed: %d\n",
 						ret);
-			goto err_alloc;
+			goto err_mem;
 		}
 	}
 
 	return 0;
 
-err_alloc:
-	for (i = 0; i < omap->nports; i++) {
-		if (!IS_ERR(omap->utmi_clk[i]))
-			clk_put(omap->utmi_clk[i]);
-		if (!IS_ERR(omap->hsic60m_clk[i]))
-			clk_put(omap->hsic60m_clk[i]);
-		if (!IS_ERR(omap->hsic480m_clk[i]))
-			clk_put(omap->hsic480m_clk[i]);
-	}
-
-	clk_put(omap->init_60m_fclk);
-
-err_init60m:
-	clk_put(omap->xclk60mhsp2_ck);
-
-err_xclk60mhsp2:
-	clk_put(omap->xclk60mhsp1_ck);
-
-err_xclk60mhsp1:
-	clk_put(omap->utmi_p2_gfclk);
-
-err_p2_gfclk:
-	clk_put(omap->utmi_p1_gfclk);
-
-err_p1_gfclk:
-	if (!IS_ERR(omap->ehci_logic_fck))
-		clk_put(omap->ehci_logic_fck);
-
 err_mem:
 	pm_runtime_disable(dev);
 
@@ -847,27 +819,6 @@ static int usbhs_omap_remove_child(struct device *dev, void *data)
  */
 static int usbhs_omap_remove(struct platform_device *pdev)
 {
-	struct usbhs_hcd_omap *omap = platform_get_drvdata(pdev);
-	int i;
-
-	for (i = 0; i < omap->nports; i++) {
-		if (!IS_ERR(omap->utmi_clk[i]))
-			clk_put(omap->utmi_clk[i]);
-		if (!IS_ERR(omap->hsic60m_clk[i]))
-			clk_put(omap->hsic60m_clk[i]);
-		if (!IS_ERR(omap->hsic480m_clk[i]))
-			clk_put(omap->hsic480m_clk[i]);
-	}
-
-	clk_put(omap->init_60m_fclk);
-	clk_put(omap->utmi_p1_gfclk);
-	clk_put(omap->utmi_p2_gfclk);
-	clk_put(omap->xclk60mhsp2_ck);
-	clk_put(omap->xclk60mhsp1_ck);
-
-	if (!IS_ERR(omap->ehci_logic_fck))
-		clk_put(omap->ehci_logic_fck);
-
 	pm_runtime_disable(&pdev->dev);
 
 	/* remove children */
Signature · 1 line
1.8.3.2
Applied
#2 lore raw

Re: [PATCH v7 01/12] mfd: omap-usb-host: Use resource managed clk_get()

Quoted 9 lines

Use devm_clk_get() instead of clk_get().

---
 drivers/mfd/omap-usb-host.c | 81 +++++++++------------------------------------
 1 file changed, 16 insertions(+), 65 deletions(-)

Applied, thanks.

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 v7 2/12 mfd: omap-usb-host: Get clocks based on hardware revision

In reply to Roger Quadros

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.

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 | 92 +++++++++++++++++++++++++++++++--------------
 1 file changed, 64 insertions(+), 28 deletions(-)
drivers/mfd/omap-usb-host.c +64 -28
index 0c3c9a0..60a3bed 100644
@@ -665,22 +665,41 @@ static int usbhs_omap_probe(struct platform_device *pdev)
 		goto err_mem;
 	}
 
-	need_logic_fck = false;
+	/* Set all clocks as invalid to begin with */
+	omap->ehci_logic_fck = omap->init_60m_fclk = ERR_PTR(-ENODEV);
+	omap->utmi_p1_gfclk = omap->utmi_p2_gfclk = ERR_PTR(-ENODEV);
+	omap->xclk60mhsp1_ck = omap->xclk60mhsp2_ck = ERR_PTR(-ENODEV);
+
 	for (i = 0; i < omap->nports; i++) {
-		if (is_ehci_phy_mode(i) || is_ehci_tll_mode(i) ||
-			is_ehci_hsic_mode(i))
-				need_logic_fck |= true;
+		omap->utmi_clk[i] = ERR_PTR(-ENODEV);
+		omap->hsic480m_clk[i] = ERR_PTR(-ENODEV);
+		omap->hsic60m_clk[i] = ERR_PTR(-ENODEV);
 	}
 
-	omap->ehci_logic_fck = ERR_PTR(-EINVAL);
-	if (need_logic_fck) {
-		omap->ehci_logic_fck = devm_clk_get(dev, "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);
+	/* for OMAP3 i.e. USBHS REV1 */
+	if (omap->usbhs_rev == OMAP_USBHS_REV1) {
+		need_logic_fck = false;
+		for (i = 0; i < omap->nports; i++) {
+			if (is_ehci_phy_mode(pdata->port_mode[i]) ||
+			    is_ehci_tll_mode(pdata->port_mode[i]) ||
+			    is_ehci_hsic_mode(pdata->port_mode[i]))
+
+				need_logic_fck |= true;
+		}
+
+		if (need_logic_fck) {
+			omap->ehci_logic_fck = clk_get(dev, "usbhost_120m_fck");
+			if (IS_ERR(omap->ehci_logic_fck)) {
+				ret = PTR_ERR(omap->ehci_logic_fck);
+				dev_err(dev, "usbhost_120m_fck failed:%d\n",
+					ret);
+				goto err_mem;
+			}
 		}
+		goto initialize;
 	}
 
+	/* for OMAP4+ i.e. USBHS REV2+ */
 	omap->utmi_p1_gfclk = devm_clk_get(dev, "utmi_p1_gfclk");
 	if (IS_ERR(omap->utmi_p1_gfclk)) {
 		ret = PTR_ERR(omap->utmi_p1_gfclk);
@@ -728,54 +747,71 @@ 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])) {
-		/* for OMAP3, clk_set_parent fails */
 		ret = clk_set_parent(omap->utmi_p1_gfclk,
 					omap->xclk60mhsp1_ck);
-		if (ret != 0)
-			dev_dbg(dev, "xclk60mhsp1_ck set parent failed: %d\n",
+		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",
+		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",
+		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",
+		if (ret != 0) {
+			dev_err(dev, "P1 init_60m_fclk set parent failed: %d\n",
 					ret);
+			goto err_mem;
+		}
 	}
 
+initialize:
 	omap_usbhs_init(dev);
 
 	if (dev->of_node) {
Signature · 1 line
1.8.3.2
#4 lore raw

Re: [PATCH v7 02/12] mfd: omap-usb-host: Get clocks based on hardware revision

Quoted 7 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.

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

It might have been clearer if you'd broken these two pieces of functionality changes into two different patches. In future it would be preferred.

Quoted 12 lines
CC Lee Jones <[email protected]>
CC Samuel Ortiz <[email protected]>
---
 drivers/mfd/omap-usb-host.c | 92 +++++++++++++++++++++++++++++++--------------
 1 file changed, 64 insertions(+), 28 deletions(-)
drivers/mfd/omap-usb-host.c +0 -0
index 0c3c9a0..60a3bed 100644

drivers/mfd/omap-usb-host.c static int usbhs_omap_probe(struct platform_device *pdev) · line 672

Quoted 9 lines
drivers/mfd/omap-usb-host.c +5 -1
@@ -665,22 +665,41 @@ static int usbhs_omap_probe(struct platform_device *pdev)
 		goto err_mem;
 	}
 
-	need_logic_fck = false;
+	/* Set all clocks as invalid to begin with */
+	omap->ehci_logic_fck = omap->init_60m_fclk = ERR_PTR(-ENODEV);
+	omap->utmi_p1_gfclk = omap->utmi_p2_gfclk = ERR_PTR(-ENODEV);
+	omap->xclk60mhsp1_ck = omap->xclk60mhsp2_ck = ERR_PTR(-ENODEV);
+

For readability you should probably do these one per line.

drivers/mfd/omap-usb-host.c static int usbhs_omap_probe(struct platform_device *pdev) · line 677

Quoted 12 lines
drivers/mfd/omap-usb-host.c +3 -6
 	for (i = 0; i < omap->nports; i++) {
-		if (is_ehci_phy_mode(i) || is_ehci_tll_mode(i) ||
-			is_ehci_hsic_mode(i))
-				need_logic_fck |= true;
+		omap->utmi_clk[i] = ERR_PTR(-ENODEV);
+		omap->hsic480m_clk[i] = ERR_PTR(-ENODEV);
+		omap->hsic60m_clk[i] = ERR_PTR(-ENODEV);
 	}
 
-	omap->ehci_logic_fck = ERR_PTR(-EINVAL);
-	if (need_logic_fck) {
-		omap->ehci_logic_fck = devm_clk_get(dev, "ehci_logic_fck");

Has this clock been renamed, or is it no longer required?

Perhaps you should be explicit in the commit log as to which clocks you're removing.

Quoted 6 lines
drivers/mfd/omap-usb-host.c +3 -3
-		if (IS_ERR(omap->ehci_logic_fck)) {
-			ret = PTR_ERR(omap->ehci_logic_fck);
-			dev_dbg(dev, "ehci_logic_fck failed:%d\n", ret);
+	/* for OMAP3 i.e. USBHS REV1 */
+	if (omap->usbhs_rev == OMAP_USBHS_REV1) {
+		need_logic_fck = false;

drivers/mfd/omap-usb-host.c static int usbhs_omap_probe(struct platform_device *pdev) · line 691

Quoted 10 lines
drivers/mfd/omap-usb-host.c +10 -0
+		for (i = 0; i < omap->nports; i++) {
+			if (is_ehci_phy_mode(pdata->port_mode[i]) ||
+			    is_ehci_tll_mode(pdata->port_mode[i]) ||
+			    is_ehci_hsic_mode(pdata->port_mode[i]))
+
+				need_logic_fck |= true;
+		}
+
+		if (need_logic_fck) {
+			omap->ehci_logic_fck = clk_get(dev, "usbhost_120m_fck");

devm_clk_get()?

<snip>

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

Re: [PATCH v7 02/12] mfd: omap-usb-host: Get clocks based on hardware revision

Quoted 11 lines · Lee Jones
Quoted 7 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.

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

It might have been clearer if you'd broken these two pieces of functionality changes into two different patches. In future it would be preferred.

OK.

Quoted 16 lines
Quoted 16 lines
CC Lee Jones <[email protected]>
CC Samuel Ortiz <[email protected]>
---
 drivers/mfd/omap-usb-host.c | 92 +++++++++++++++++++++++++++++++--------------
 1 file changed, 64 insertions(+), 28 deletions(-)
drivers/mfd/omap-usb-host.c +0 -0
index 0c3c9a0..60a3bed 100644
@@ -665,22 +665,41 @@ static int usbhs_omap_probe(struct platform_device *pdev)
 		goto err_mem;
 	}
 
Quoted 8 lines

drivers/mfd/omap-usb-host.c static int usbhs_omap_probe(struct platform_device *pdev) · line 672

Quoted 6 lines
drivers/mfd/omap-usb-host.c +5 -1
-	need_logic_fck = false;
+	/* Set all clocks as invalid to begin with */
+	omap->ehci_logic_fck = omap->init_60m_fclk = ERR_PTR(-ENODEV);
+	omap->utmi_p1_gfclk = omap->utmi_p2_gfclk = ERR_PTR(-ENODEV);
+	omap->xclk60mhsp1_ck = omap->xclk60mhsp2_ck = ERR_PTR(-ENODEV);
+

For readability you should probably do these one per line.

OK.

Quoted 10 lines
Quoted 10 lines
drivers/mfd/omap-usb-host.c +3 -3
 	for (i = 0; i < omap->nports; i++) {
-		if (is_ehci_phy_mode(i) || is_ehci_tll_mode(i) ||
-			is_ehci_hsic_mode(i))
-				need_logic_fck |= true;
+		omap->utmi_clk[i] = ERR_PTR(-ENODEV);
+		omap->hsic480m_clk[i] = ERR_PTR(-ENODEV);
+		omap->hsic60m_clk[i] = ERR_PTR(-ENODEV);
 	}
 
Quoted 5 lines

drivers/mfd/omap-usb-host.c static int usbhs_omap_probe(struct platform_device *pdev) · line 677

Quoted 3 lines
drivers/mfd/omap-usb-host.c +0 -3
-	omap->ehci_logic_fck = ERR_PTR(-EINVAL);
-	if (need_logic_fck) {
-		omap->ehci_logic_fck = devm_clk_get(dev, "ehci_logic_fck");

Has this clock been renamed, or is it no longer required?

It is only for OMAP3 and it's actual name is "usbhost_120m_fck". "ehci_logic_fck" is just an alias.

Quoted 14 lines

Perhaps you should be explicit in the commit log as to which clocks you're removing.

Quoted 10 lines
drivers/mfd/omap-usb-host.c +7 -3
-		if (IS_ERR(omap->ehci_logic_fck)) {
-			ret = PTR_ERR(omap->ehci_logic_fck);
-			dev_dbg(dev, "ehci_logic_fck failed:%d\n", ret);
+	/* for OMAP3 i.e. USBHS REV1 */
+	if (omap->usbhs_rev == OMAP_USBHS_REV1) {
+		need_logic_fck = false;
+		for (i = 0; i < omap->nports; i++) {
+			if (is_ehci_phy_mode(pdata->port_mode[i]) ||
+			    is_ehci_tll_mode(pdata->port_mode[i]) ||
+			    is_ehci_hsic_mode(pdata->port_mode[i]))
Quoted 8 lines

drivers/mfd/omap-usb-host.c static int usbhs_omap_probe(struct platform_device *pdev) · line 691

Quoted 6 lines
drivers/mfd/omap-usb-host.c +6 -0
+
+				need_logic_fck |= true;
+		}
+
+		if (need_logic_fck) {
+			omap->ehci_logic_fck = clk_get(dev, "usbhost_120m_fck");

devm_clk_get()?

Indeed.

cheers,
-roger

#6 lore raw

PATCH v7 3/12 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.

CC Lee Jones <[email protected]>
CC Samuel Ortiz <[email protected]>
---
 drivers/mfd/omap-usb-host.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mfd/omap-usb-host.c +3 -3
index 60a3bed..ce620a8 100644
@@ -714,21 +714,21 @@ 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);
 		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);
 		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);
Signature · 1 line
1.8.3.2
#7 lore raw

Re: [PATCH v7 03/12] mfd: omap-usb-host: Use clock names as per function for reference clocks

Quoted 14 lines

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

CC Lee Jones <[email protected]>
CC Samuel Ortiz <[email protected]>
---
 drivers/mfd/omap-usb-host.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mfd/omap-usb-host.c +0 -0
index 60a3bed..ce620a8 100644

drivers/mfd/omap-usb-host.c static int usbhs_omap_probe(struct platform_device *pdev) · line 717

Quoted 5 lines
drivers/mfd/omap-usb-host.c +1 -1
@@ -714,21 +714,21 @@ 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");

You can't do that. These changes will have to be in the same patch as the core change i.e. where they are initialised.

Quoted 19 lines
drivers/mfd/omap-usb-host.c +2 -2
 	if (IS_ERR(omap->xclk60mhsp1_ck)) {
 		ret = PTR_ERR(omap->xclk60mhsp1_ck);
 		dev_err(dev, "xclk60mhsp1_ck 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);
 		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);
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#8 lore raw

Re: [PATCH v7 03/12] mfd: omap-usb-host: Use clock names as per function for reference clocks

Quoted 17 lines · Lee Jones
Quoted 17 lines

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

CC Lee Jones <[email protected]>
CC Samuel Ortiz <[email protected]>
---
 drivers/mfd/omap-usb-host.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mfd/omap-usb-host.c +0 -0
index 60a3bed..ce620a8 100644
@@ -714,21 +714,21 @@ static int usbhs_omap_probe(struct platform_device *pdev)
 		goto err_mem;
 	}
 
Quoted 5 lines

drivers/mfd/omap-usb-host.c static int usbhs_omap_probe(struct platform_device *pdev) · line 717

Quoted 2 lines
drivers/mfd/omap-usb-host.c +1 -1
-	omap->xclk60mhsp1_ck = devm_clk_get(dev, "xclk60mhsp1_ck");
+	omap->xclk60mhsp1_ck = devm_clk_get(dev, "refclk_60m_ext_p1");

You can't do that. These changes will have to be in the same patch as the core change i.e. where they are initialised.

I'm not touching them anywhere in this series. When core changes are you referring to?

Quoted 15 lines
Quoted 15 lines
drivers/mfd/omap-usb-host.c +1 -1
 	if (IS_ERR(omap->xclk60mhsp1_ck)) {
 		ret = PTR_ERR(omap->xclk60mhsp1_ck);
 		dev_err(dev, "xclk60mhsp1_ck 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);
 		goto err_mem;
 	}
 
Quoted 6 lines

drivers/mfd/omap-usb-host.c static int usbhs_omap_probe(struct platform_device *pdev) · line 734

Quoted 5 lines
drivers/mfd/omap-usb-host.c +1 -1
-	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);

--
cheers,
-roger

#9 lore raw

Re: [PATCH v7 03/12] mfd: omap-usb-host: Use clock names as per function for reference clocks

Quoted 17 lines
Quoted 17 lines
Quoted 17 lines

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

CC Lee Jones <[email protected]>
CC Samuel Ortiz <[email protected]>
---
 drivers/mfd/omap-usb-host.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mfd/omap-usb-host.c +0 -0
index 60a3bed..ce620a8 100644
@@ -714,21 +714,21 @@ static int usbhs_omap_probe(struct platform_device *pdev)
 		goto err_mem;
 	}
 
Quoted 8 lines
Quoted 5 lines

drivers/mfd/omap-usb-host.c static int usbhs_omap_probe(struct platform_device *pdev) · line 717

Quoted 2 lines
drivers/mfd/omap-usb-host.c +1 -1
-	omap->xclk60mhsp1_ck = devm_clk_get(dev, "xclk60mhsp1_ck");
+	omap->xclk60mhsp1_ck = devm_clk_get(dev, "refclk_60m_ext_p1");

You can't do that. These changes will have to be in the same patch as the core change i.e. where they are initialised.

I'm not touching them anywhere in this series. When core changes are you referring to?

The ones in:
arch/arm/mach-omap2/cclock3xxx_data.c

Quoted 21 lines
Quoted 20 lines
Quoted 19 lines
drivers/mfd/omap-usb-host.c +2 -2
 	if (IS_ERR(omap->xclk60mhsp1_ck)) {
 		ret = PTR_ERR(omap->xclk60mhsp1_ck);
 		dev_err(dev, "xclk60mhsp1_ck 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);
 		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);
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#10 lore raw

Re: [PATCH v7 03/12] mfd: omap-usb-host: Use clock names as per function for reference clocks

Quoted 23 lines · Lee Jones
Quoted 23 lines
Quoted 22 lines
Quoted 14 lines

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

CC Lee Jones <[email protected]>
CC Samuel Ortiz <[email protected]>
---
 drivers/mfd/omap-usb-host.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mfd/omap-usb-host.c +0 -0
index 60a3bed..ce620a8 100644

drivers/mfd/omap-usb-host.c static int usbhs_omap_probe(struct platform_device *pdev) · line 717

Quoted 5 lines
drivers/mfd/omap-usb-host.c +1 -1
@@ -714,21 +714,21 @@ 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");

You can't do that. These changes will have to be in the same patch as the core change i.e. where they are initialised.

Quoted 5 lines
Quoted 2 lines

I'm not touching them anywhere in this series. When core changes are you referring to?

The ones in:
arch/arm/mach-omap2/cclock3xxx_data.c

OK, right. They are now no longer needed so I'll get rid of them.
In fact that change should either be in a separate patch or combined with PATCH 2 in this series. What do you suggest?

cheers,
-roger

Quoted 23 lines
Quoted 22 lines
Quoted 21 lines
Quoted 20 lines
drivers/mfd/omap-usb-host.c +2 -2
 	if (IS_ERR(omap->xclk60mhsp1_ck)) {
 		ret = PTR_ERR(omap->xclk60mhsp1_ck);
 		dev_err(dev, "xclk60mhsp1_ck 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);
 		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);
#11 lore raw

Re: [PATCH v7 03/12] mfd: omap-usb-host: Use clock names as per function for reference clocks

Quoted 26 lines
Quoted 26 lines
Quoted 25 lines
Quoted 17 lines
Quoted 17 lines

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

CC Lee Jones <[email protected]>
CC Samuel Ortiz <[email protected]>
---
 drivers/mfd/omap-usb-host.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mfd/omap-usb-host.c +0 -0
index 60a3bed..ce620a8 100644
@@ -714,21 +714,21 @@ static int usbhs_omap_probe(struct platform_device *pdev)
 		goto err_mem;
 	}
 
Quoted 5 lines

drivers/mfd/omap-usb-host.c static int usbhs_omap_probe(struct platform_device *pdev) · line 717

Quoted 2 lines
drivers/mfd/omap-usb-host.c +1 -1
-	omap->xclk60mhsp1_ck = devm_clk_get(dev, "xclk60mhsp1_ck");
+	omap->xclk60mhsp1_ck = devm_clk_get(dev, "refclk_60m_ext_p1");

You can't do that. These changes will have to be in the same patch as the core change i.e. where they are initialised.

I'm not touching them anywhere in this series. When core changes are you referring to?

Quoted 6 lines
Quoted 2 lines

The ones in:
arch/arm/mach-omap2/cclock3xxx_data.c

OK, right. They are now no longer needed so I'll get rid of them.
In fact that change should either be in a separate patch or combined with PATCH 2 in this series. What do you suggest?

A separate patch will do fine.

Quoted 23 lines
Quoted 22 lines
Quoted 21 lines
Quoted 20 lines
Quoted 19 lines
drivers/mfd/omap-usb-host.c +2 -2
 	if (IS_ERR(omap->xclk60mhsp1_ck)) {
 		ret = PTR_ERR(omap->xclk60mhsp1_ck);
 		dev_err(dev, "xclk60mhsp1_ck 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);
 		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);
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#12 lore raw

PATCH v7 4/12 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
#13 lore raw

PATCH v7 5/12 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
#14 lore raw

PATCH v7 6/12 ARM: dts: omap4: Update omap-usb-host node

In reply to Roger Quadros

The omap-usb-host driver expects a certain name for internal and external reference clocks. Provide these clocks.

---
 arch/arm/boot/dts/omap4.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
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";
Signature · 1 line
1.8.3.2
#15 lore raw

PATCH v7 7/12 ARM: dts: omap5: Update omap-usb-host node

In reply to Roger Quadros

The omap-usb-host driver expects a certain name for internal and external reference clocks. Provide these clocks.

---
 arch/arm/boot/dts/omap5.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
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";
Signature · 1 line
1.8.3.2
#16 lore raw

PATCH v7 8/12 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
#17 lore raw

PATCH v7 9/12 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
#18 lore raw

PATCH v7 10/12 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 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
#19 lore raw

PATCH v7 11/12 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.

---
 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
#20 lore raw

PATCH v7 12/12 usb: omap: dts: Update DT binding example usage

In reply to Roger Quadros

Remove non-compatible id from examples.

---
 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