linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/7] Add support for USB cluster(PHY muxer) on the Armada 375
@ 2014-11-13 11:47 Gregory CLEMENT
  2014-11-13 11:47 ` [PATCH v4 1/7] phy: Use PTR_ERR_OR_ZERO to fix warning raised by coccinelle Gregory CLEMENT
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Gregory CLEMENT @ 2014-11-13 11:47 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory CLEMENT
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Lior Amsalem, Tawfik Bayouk, Nadav Haklai, Mark Rutland,
	devicetree, Grant Likely, Rob Herring, linux-kernel

Hi,

this is the forth version of a series adding support for the USB
cluster which is on the Armada 375 SoC. We can mainly see this device
as a PHY muxer.

Since the last version I no more use a global variable and store it
now in the platform data as suggested by Kishon. I also add a new
patch adding myself as maintainer of this driver.

While I ran coccicheck on my code I also found some possible
improvement in the phy driver: it was done in the 1st patch.

The second patch was a patch initially submitted by Andrew. This patch
added the mvebu-phy.txt but fell through a crack when adding the
driver. I join this patch on my series in order to be able to add the
new binding for the USB cluster of the Armada 375.

This was done in the third patch.

The forth patch was the addition of the phys driver itself.

The fifth and sixth patches are updating the device tree files related
to the Armada 375 using the new biding.

The seventh patch add myself as maintainer of this driver.

Thanks,

Gregory

Changelog:
v3 -> v4:

 - No more use a global variable to store the data related to the usb
cluster and put them in the platform data instead.

 - Add more check on the NULL pointer in the driver to make it more
 robust.

 - Add a new patch to dd myself as maintainer of this driver.

v2 -> v3:

 - Added Kishon acked-by on the 5th patch.

 - Used include/dt-bindings/phy/phy.h instead of creating a new one in
   the forth patch.

v1 -> v2:

- Add a patch fixing the use of PTR_ERR_OR_ZERO.

- Add the patch adding the DT binding documentation for Marvell MVEBU
SATA phy from Andrew Lunn

- Move the DT binding documentation of the Armada 375 USB cluster into
  the phy-mvebu.txt file.

- Made the armada375_usb_phy_xlate more robust" if there is a phy_put
  and then a phy_get".

Andrew Lunn (1):
  Phy: DT binding documentation for Marvell MVEBU SATA phy.

Gregory CLEMENT (6):
  phy: Use PTR_ERR_OR_ZERO to fix warning raised by coccinelle
  Phy: DT binding documentation for the Armada 375 USB cluster binding
  phy: add support for USB cluster on the Armada 375 SoC
  ARM: mvebu: add Device Tree description of USB cluster controller on
    Armada 375
  ARM: mvebu: add PHY support to the dts for the USB controllers on
    Armada 375
  MAINTAINERS: add entry for the Armada 375 USB cluster PHY driver

 Documentation/devicetree/bindings/ata/marvell.txt  |   6 +
 .../devicetree/bindings/phy/phy-mvebu.txt          |  43 ++++++
 MAINTAINERS                                        |   6 +
 arch/arm/boot/dts/armada-375.dtsi                  |  11 ++
 drivers/phy/Kconfig                                |   6 +
 drivers/phy/Makefile                               |   1 +
 drivers/phy/phy-armada375-usb2.c                   | 158 +++++++++++++++++++++
 drivers/phy/phy-berlin-sata.c                      |   5 +-
 drivers/phy/phy-hix5hd2-sata.c                     |   5 +-
 drivers/phy/phy-miphy365x.c                        |   5 +-
 drivers/phy/phy-stih41x-usb.c                      |   5 +-
 include/dt-bindings/phy/phy.h                      |   1 +
 12 files changed, 236 insertions(+), 16 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-mvebu.txt
 create mode 100644 drivers/phy/phy-armada375-usb2.c

-- 
1.9.1


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

* [PATCH v4 1/7] phy: Use PTR_ERR_OR_ZERO to fix warning raised by coccinelle
  2014-11-13 11:47 [PATCH v4 0/7] Add support for USB cluster(PHY muxer) on the Armada 375 Gregory CLEMENT
@ 2014-11-13 11:47 ` Gregory CLEMENT
  2014-11-13 11:47 ` [PATCH v4 2/7] Phy: DT binding documentation for Marvell MVEBU SATA phy Gregory CLEMENT
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Gregory CLEMENT @ 2014-11-13 11:47 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory CLEMENT
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Lior Amsalem, Tawfik Bayouk, Nadav Haklai, Mark Rutland,
	devicetree, Grant Likely, Rob Herring, linux-kernel

Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: coccinelle/api/ptr_ret.cocci

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 drivers/phy/phy-berlin-sata.c  | 5 +----
 drivers/phy/phy-hix5hd2-sata.c | 5 +----
 drivers/phy/phy-miphy365x.c    | 5 +----
 drivers/phy/phy-stih41x-usb.c  | 5 +----
 4 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/drivers/phy/phy-berlin-sata.c b/drivers/phy/phy-berlin-sata.c
index 69ced52d72aa..86602c0ffb42 100644
--- a/drivers/phy/phy-berlin-sata.c
+++ b/drivers/phy/phy-berlin-sata.c
@@ -258,10 +258,7 @@ static int phy_berlin_sata_probe(struct platform_device *pdev)
 
 	phy_provider =
 		devm_of_phy_provider_register(dev, phy_berlin_sata_phy_xlate);
-	if (IS_ERR(phy_provider))
-		return PTR_ERR(phy_provider);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(phy_provider);
 }
 
 static const struct of_device_id phy_berlin_sata_of_match[] = {
diff --git a/drivers/phy/phy-hix5hd2-sata.c b/drivers/phy/phy-hix5hd2-sata.c
index d5d978085c6d..62bc30ae0534 100644
--- a/drivers/phy/phy-hix5hd2-sata.c
+++ b/drivers/phy/phy-hix5hd2-sata.c
@@ -164,10 +164,7 @@ static int hix5hd2_sata_phy_probe(struct platform_device *pdev)
 
 	phy_set_drvdata(phy, priv);
 	phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
-	if (IS_ERR(phy_provider))
-		return PTR_ERR(phy_provider);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(phy_provider);
 }
 
 static const struct of_device_id hix5hd2_sata_phy_of_match[] = {
diff --git a/drivers/phy/phy-miphy365x.c b/drivers/phy/phy-miphy365x.c
index 801afaf2d449..d2796a454f95 100644
--- a/drivers/phy/phy-miphy365x.c
+++ b/drivers/phy/phy-miphy365x.c
@@ -610,10 +610,7 @@ static int miphy365x_probe(struct platform_device *pdev)
 	}
 
 	provider = devm_of_phy_provider_register(&pdev->dev, miphy365x_xlate);
-	if (IS_ERR(provider))
-		return PTR_ERR(provider);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(provider);
 }
 
 static const struct of_device_id miphy365x_of_match[] = {
diff --git a/drivers/phy/phy-stih41x-usb.c b/drivers/phy/phy-stih41x-usb.c
index 9f16cb8e01f4..20c630c2f295 100644
--- a/drivers/phy/phy-stih41x-usb.c
+++ b/drivers/phy/phy-stih41x-usb.c
@@ -160,10 +160,7 @@ static int stih41x_usb_phy_probe(struct platform_device *pdev)
 	phy_set_drvdata(phy, phy_dev);
 
 	phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
-	if (IS_ERR(phy_provider))
-		return PTR_ERR(phy_provider);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(phy_provider);
 }
 
 static const struct of_device_id stih41x_usb_phy_of_match[] = {
-- 
1.9.1


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

* [PATCH v4 2/7] Phy: DT binding documentation for Marvell MVEBU SATA phy.
  2014-11-13 11:47 [PATCH v4 0/7] Add support for USB cluster(PHY muxer) on the Armada 375 Gregory CLEMENT
  2014-11-13 11:47 ` [PATCH v4 1/7] phy: Use PTR_ERR_OR_ZERO to fix warning raised by coccinelle Gregory CLEMENT
@ 2014-11-13 11:47 ` Gregory CLEMENT
  2014-11-13 11:47 ` [PATCH v4 3/7] Phy: DT binding documentation for the Armada 375 USB cluster binding Gregory CLEMENT
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Gregory CLEMENT @ 2014-11-13 11:47 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory CLEMENT
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Lior Amsalem, Tawfik Bayouk, Nadav Haklai, Mark Rutland,
	devicetree, Grant Likely, Rob Herring, linux-kernel

From: Andrew Lunn <andrew@lunn.ch>

Describe the binding for the Marvell MVEBU SATA phy. This driver
can be used at least with Kirkwood, Dove and maybe others.
Additionally, update the SATA binding with the properties to link
to the phy nodes.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 Documentation/devicetree/bindings/ata/marvell.txt  |  6 ++++++
 .../devicetree/bindings/phy/phy-mvebu.txt          | 22 ++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-mvebu.txt

diff --git a/Documentation/devicetree/bindings/ata/marvell.txt b/Documentation/devicetree/bindings/ata/marvell.txt
index 1c8351604d38..b460edd12766 100644
--- a/Documentation/devicetree/bindings/ata/marvell.txt
+++ b/Documentation/devicetree/bindings/ata/marvell.txt
@@ -6,11 +6,17 @@ Required Properties:
 - interrupts    : Interrupt controller is using
 - nr-ports      : Number of SATA ports in use.
 
+Optional Properties:
+- phys		: List of phandles to sata phys
+- phy-names	: Should be "0", "1", etc, one number per phandle
+
 Example:
 
 	sata@80000 {
 		compatible = "marvell,orion-sata";
 		reg = <0x80000 0x5000>;
 		interrupts = <21>;
+		phys = <&sata_phy0>, <&sata_phy1>;
+		phy-names = "0", "1";
 		nr-ports = <2>;
 	}
diff --git a/Documentation/devicetree/bindings/phy/phy-mvebu.txt b/Documentation/devicetree/bindings/phy/phy-mvebu.txt
new file mode 100644
index 000000000000..6cb3364aeafb
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/phy-mvebu.txt
@@ -0,0 +1,22 @@
+* Marvell MVEBU SATA PHY
+
+Power control for the SATA phy found on Marvell MVEBU SoCs.
+
+This document extends the binding described in phy-bindings.txt
+
+Required properties :
+
+ - reg		   : Offset and length of the register set for the SATA device
+ - compatible	   : Should be "marvell,mvebu-sata-phy"
+ - clocks	   : phandle of clock and specifier that supplies the device
+ - clock-names	   : Should be "sata"
+
+Example:
+		sata-phy@84000 {
+			compatible = "marvell,mvebu-sata-phy";
+			reg = <0x84000 0x0334>;
+			clocks = <&gate_clk 15>;
+			clock-names = "sata";
+			#phy-cells = <0>;
+			status = "ok";
+		};
-- 
1.9.1


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

* [PATCH v4 3/7] Phy: DT binding documentation for the Armada 375 USB cluster binding
  2014-11-13 11:47 [PATCH v4 0/7] Add support for USB cluster(PHY muxer) on the Armada 375 Gregory CLEMENT
  2014-11-13 11:47 ` [PATCH v4 1/7] phy: Use PTR_ERR_OR_ZERO to fix warning raised by coccinelle Gregory CLEMENT
  2014-11-13 11:47 ` [PATCH v4 2/7] Phy: DT binding documentation for Marvell MVEBU SATA phy Gregory CLEMENT
@ 2014-11-13 11:47 ` Gregory CLEMENT
  2014-11-13 11:47 ` [PATCH v4 4/7] phy: add support for USB cluster on the Armada 375 SoC Gregory CLEMENT
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Gregory CLEMENT @ 2014-11-13 11:47 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory CLEMENT
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Lior Amsalem, Tawfik Bayouk, Nadav Haklai, Mark Rutland,
	devicetree, Grant Likely, Rob Herring, linux-kernel

Armada 375 comes with an USB2 host and device controller and an USB3
controller. The USB cluster control register allows to manage common
features of both USB controllers. This commit adds the Device Tree
binding documentation for this piece of hardware.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 Documentation/devicetree/bindings/phy/phy-mvebu.txt | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/phy-mvebu.txt b/Documentation/devicetree/bindings/phy/phy-mvebu.txt
index 6cb3364aeafb..f95b6260a3b3 100644
--- a/Documentation/devicetree/bindings/phy/phy-mvebu.txt
+++ b/Documentation/devicetree/bindings/phy/phy-mvebu.txt
@@ -20,3 +20,24 @@ Example:
 			#phy-cells = <0>;
 			status = "ok";
 		};
+
+Armada 375 USB cluster
+----------------------
+
+Armada 375 comes with an USB2 host and device controller and an USB3
+controller. The USB cluster control register allows to manage common
+features of both USB controllers.
+
+Required properties:
+
+- compatible: "marvell,armada-375-usb-cluster"
+- reg: Should contain usb cluster register location and length.
+- #phy-cells : from the generic phy bindings, must be 1. Possible
+values are 1 (USB2), 2 (USB3).
+
+Example:
+		usbcluster: usb-cluster@18400 {
+			compatible = "marvell,armada-375-usb-cluster";
+			reg = <0x18400 0x4>;
+			#phy-cells = <1>
+		};
-- 
1.9.1


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

* [PATCH v4 4/7] phy: add support for USB cluster on the Armada 375 SoC
  2014-11-13 11:47 [PATCH v4 0/7] Add support for USB cluster(PHY muxer) on the Armada 375 Gregory CLEMENT
                   ` (2 preceding siblings ...)
  2014-11-13 11:47 ` [PATCH v4 3/7] Phy: DT binding documentation for the Armada 375 USB cluster binding Gregory CLEMENT
@ 2014-11-13 11:47 ` Gregory CLEMENT
  2014-11-13 13:06   ` Thomas Petazzoni
  2014-11-13 11:47 ` [PATCH v4 5/7] ARM: mvebu: add Device Tree description of USB cluster controller on Armada 375 Gregory CLEMENT
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Gregory CLEMENT @ 2014-11-13 11:47 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory CLEMENT
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Lior Amsalem, Tawfik Bayouk, Nadav Haklai, Mark Rutland,
	devicetree, Grant Likely, Rob Herring, linux-kernel

The Armada 375 SoC comes with an USB2 host and device controller and
an USB3 controller. The USB cluster control register allows to manage
common features of both USB controllers.

This commit adds a driver integrated in the generic PHY framework to
control this USB cluster feature.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 drivers/phy/Kconfig              |   6 ++
 drivers/phy/Makefile             |   1 +
 drivers/phy/phy-armada375-usb2.c | 158 +++++++++++++++++++++++++++++++++++++++
 include/dt-bindings/phy/phy.h    |   1 +
 4 files changed, 166 insertions(+)
 create mode 100644 drivers/phy/phy-armada375-usb2.c

diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index 2a436e607f99..625adb0abd43 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -21,6 +21,12 @@ config PHY_BERLIN_SATA
 	select GENERIC_PHY
 	help
 	  Enable this to support the SATA PHY on Marvell Berlin SoCs.
+config ARMADA375_USBCLUSTER_PHY
+	def_bool y
+	depends on MACH_ARMADA_375 || COMPILE_TEST
+	depends on OF
+	select GENERIC_PHY
+
 
 config PHY_EXYNOS_MIPI_VIDEO
 	tristate "S5P/EXYNOS SoC series MIPI CSI-2/DSI PHY driver"
diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile
index c4590fce082f..26b5633f378a 100644
--- a/drivers/phy/Makefile
+++ b/drivers/phy/Makefile
@@ -4,6 +4,7 @@
 
 obj-$(CONFIG_GENERIC_PHY)		+= phy-core.o
 obj-$(CONFIG_PHY_BERLIN_SATA)		+= phy-berlin-sata.o
+obj-$(CONFIG_ARMADA375_USBCLUSTER_PHY)	+= phy-armada375-usb2.o
 obj-$(CONFIG_BCM_KONA_USB2_PHY)		+= phy-bcm-kona-usb2.o
 obj-$(CONFIG_PHY_EXYNOS_DP_VIDEO)	+= phy-exynos-dp-video.o
 obj-$(CONFIG_PHY_EXYNOS_MIPI_VIDEO)	+= phy-exynos-mipi-video.o
diff --git a/drivers/phy/phy-armada375-usb2.c b/drivers/phy/phy-armada375-usb2.c
new file mode 100644
index 000000000000..111a38f89397
--- /dev/null
+++ b/drivers/phy/phy-armada375-usb2.c
@@ -0,0 +1,158 @@
+/*
+ * USB cluster support for Armada 375 platform.
+ *
+ * Copyright (C) 2014 Marvell
+ *
+ * Gregory CLEMENT <gregory.clement@free-electrons.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2 or later. This program is licensed "as is"
+ * without any warranty of any kind, whether express or implied.
+ *
+ * Armada 375 comes with an USB2 host and device controller and an
+ * USB3 controller. The USB cluster control register allows to manage
+ * common features of both USB controllers.
+ */
+
+#include <dt-bindings/phy/phy.h>
+#include <linux/init.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/of_address.h>
+#include <linux/phy/phy.h>
+#include <linux/platform_device.h>
+
+#define USB2_PHY_CONFIG_DISABLE BIT(0)
+
+struct armada375_cluster_phy {
+	struct phy *phy;
+	void __iomem *reg;
+	bool use_usb3;
+	int phy_provided;
+};
+
+static int armada375_usb_phy_init(struct phy *phy)
+{
+	struct armada375_cluster_phy *cluster_phy;
+	u32 reg;
+
+	cluster_phy = dev_get_drvdata(phy->dev.parent);
+	if (!cluster_phy)
+		return -ENOMEM;
+
+	reg = readl(cluster_phy->reg);
+	if (cluster_phy->use_usb3)
+		reg |= USB2_PHY_CONFIG_DISABLE;
+	else
+		reg &= ~USB2_PHY_CONFIG_DISABLE;
+	writel(reg, cluster_phy->reg);
+
+	return 0;
+}
+
+static struct phy_ops armada375_usb_phy_ops = {
+	.init = armada375_usb_phy_init,
+	.owner = THIS_MODULE,
+};
+
+/*
+ * Only one controller can use this PHY. We shouldn't have the case
+ * when two controllers want to use this PHY. But if this case occurs
+ * then we provide a phy to the first one and return an error for the
+ * next one. This error has also to be an error returned by
+ * devm_phy_optional_get() so different from ENODEV for USB2. In the
+ * USB3 case it still optional and we use ENODEV.
+ */
+static struct phy *armada375_usb_phy_xlate(struct device *dev,
+					struct of_phandle_args *args)
+{
+	struct armada375_cluster_phy *cluster_phy = dev_get_drvdata(dev);
+
+	if (!cluster_phy)
+		return  ERR_PTR(-ENODEV);
+
+	/*
+	 * Either the phy had never been requested and then the first
+	 * usb claiming it can get it, or it had already been
+	 * requested in this case, we only allow to use it with the
+	 * same configuration.
+	 */
+	if (WARN_ON((cluster_phy->phy_provided != PHY_NONE) &&
+			(cluster_phy->phy_provided != args->args[0]))) {
+		dev_err(dev, "This PHY has already been provided!\n");
+		dev_err(dev, "Check your device tree, only one controller can use it\n.");
+		if (args->args[0] == PHY_TYPE_USB2)
+			return ERR_PTR(-EBUSY);
+		else
+			return ERR_PTR(-ENODEV);
+	}
+
+	if (args->args[0] == PHY_TYPE_USB2)
+		cluster_phy->use_usb3 = false;
+	else if (args->args[0] == PHY_TYPE_USB3)
+		cluster_phy->use_usb3 = true;
+	else {
+		dev_err(dev, "Invalid PHY mode\n");
+		return ERR_PTR(-ENODEV);
+	}
+
+	/* Store which phy mode is used for next test */
+	cluster_phy->phy_provided = args->args[0];
+
+	return cluster_phy->phy;
+}
+
+static int armada375_usb_phy_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	struct phy *phy;
+	struct phy_provider *phy_provider;
+	void __iomem *usb_cluster_base;
+	struct resource *res;
+	struct armada375_cluster_phy *cluster_phy;
+
+	cluster_phy = devm_kzalloc(dev, sizeof(*cluster_phy), GFP_KERNEL);
+	if (!cluster_phy)
+		return  -ENOMEM;
+
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	usb_cluster_base = devm_ioremap_resource(&pdev->dev, res);
+	if (!usb_cluster_base)
+		return -ENOMEM;
+
+	phy = devm_phy_create(dev, NULL, &armada375_usb_phy_ops, NULL);
+	if (IS_ERR(phy)) {
+		dev_err(dev, "failed to create PHY\n");
+		return PTR_ERR(phy);
+	}
+
+	cluster_phy->phy = phy;
+	cluster_phy->reg = usb_cluster_base;
+
+	dev_set_drvdata(dev, cluster_phy);
+
+	phy_provider = devm_of_phy_provider_register(&pdev->dev,
+						     armada375_usb_phy_xlate);
+	return PTR_ERR_OR_ZERO(phy_provider);
+}
+
+static const struct of_device_id of_usb_cluster_table[] = {
+	{ .compatible = "marvell,armada-375-usb-cluster", },
+	{ /* end of list */ },
+};
+MODULE_DEVICE_TABLE(of, of_usb_cluster_table);
+
+static struct platform_driver armada375_usb_phy_driver = {
+	.probe	= armada375_usb_phy_probe,
+	.driver = {
+		.of_match_table	= of_usb_cluster_table,
+		.name  = "armada-375-usb-cluster",
+		.owner = THIS_MODULE,
+	}
+};
+module_platform_driver(armada375_usb_phy_driver);
+
+MODULE_DESCRIPTION("Armada 375 USB cluster driver");
+MODULE_AUTHOR("Gregory CLEMENT <gregory.clement@free-electrons.com>");
+MODULE_LICENSE("GPL");
diff --git a/include/dt-bindings/phy/phy.h b/include/dt-bindings/phy/phy.h
index e8c6a3f04b85..6c901930eb3e 100644
--- a/include/dt-bindings/phy/phy.h
+++ b/include/dt-bindings/phy/phy.h
@@ -10,6 +10,7 @@
 #ifndef _DT_BINDINGS_PHY
 #define _DT_BINDINGS_PHY
 
+#define PHY_NONE		0
 #define PHY_TYPE_SATA		1
 #define PHY_TYPE_PCIE		2
 #define PHY_TYPE_USB2		3
-- 
1.9.1


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

* [PATCH v4 5/7] ARM: mvebu: add Device Tree description of USB cluster controller on Armada 375
  2014-11-13 11:47 [PATCH v4 0/7] Add support for USB cluster(PHY muxer) on the Armada 375 Gregory CLEMENT
                   ` (3 preceding siblings ...)
  2014-11-13 11:47 ` [PATCH v4 4/7] phy: add support for USB cluster on the Armada 375 SoC Gregory CLEMENT
@ 2014-11-13 11:47 ` Gregory CLEMENT
  2014-11-13 11:47 ` [PATCH v4 6/7] ARM: mvebu: add PHY support to the dts for the USB controllers " Gregory CLEMENT
  2014-11-13 11:47 ` [PATCH v4 7/7] MAINTAINERS: add entry for the Armada 375 USB cluster PHY driver Gregory CLEMENT
  6 siblings, 0 replies; 17+ messages in thread
From: Gregory CLEMENT @ 2014-11-13 11:47 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory CLEMENT
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Lior Amsalem, Tawfik Bayouk, Nadav Haklai, Mark Rutland,
	devicetree, Grant Likely, Rob Herring, linux-kernel

On Armada 375, the USB cluster allows to control the cluster composed
of the USB2 and USB3 host controllers.

Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 arch/arm/boot/dts/armada-375.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
index de6571445cef..8f45cf5d2a50 100644
--- a/arch/arm/boot/dts/armada-375.dtsi
+++ b/arch/arm/boot/dts/armada-375.dtsi
@@ -342,6 +342,12 @@
 				#clock-cells = <1>;
 			};
 
+			usbcluster: usb-cluster@18400 {
+				compatible = "marvell,armada-375-usb-cluster";
+				reg = <0x18400 0x4>;
+				#phy-cells = <1>;
+			};
+
 			mbusc: mbus-controller@20000 {
 				compatible = "marvell,mbus-controller";
 				reg = <0x20000 0x100>, <0x20180 0x20>;
-- 
1.9.1


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

* [PATCH v4 6/7] ARM: mvebu: add PHY support to the dts for the USB controllers on Armada 375
  2014-11-13 11:47 [PATCH v4 0/7] Add support for USB cluster(PHY muxer) on the Armada 375 Gregory CLEMENT
                   ` (4 preceding siblings ...)
  2014-11-13 11:47 ` [PATCH v4 5/7] ARM: mvebu: add Device Tree description of USB cluster controller on Armada 375 Gregory CLEMENT
@ 2014-11-13 11:47 ` Gregory CLEMENT
  2014-11-22  2:08   ` Jason Cooper
  2014-11-13 11:47 ` [PATCH v4 7/7] MAINTAINERS: add entry for the Armada 375 USB cluster PHY driver Gregory CLEMENT
  6 siblings, 1 reply; 17+ messages in thread
From: Gregory CLEMENT @ 2014-11-13 11:47 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory CLEMENT
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Lior Amsalem, Tawfik Bayouk, Nadav Haklai, Mark Rutland,
	devicetree, Grant Likely, Rob Herring, linux-kernel

Now that the USB cluster node has been added, use it as a PHY provider
for the USB controller linked to it: the first EHCI and the xHCI.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 arch/arm/boot/dts/armada-375.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
index 8f45cf5d2a50..f344ec420c95 100644
--- a/arch/arm/boot/dts/armada-375.dtsi
+++ b/arch/arm/boot/dts/armada-375.dtsi
@@ -14,6 +14,7 @@
 #include "skeleton.dtsi"
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/phy/phy.h>
 
 #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
 
@@ -396,6 +397,8 @@
 				reg = <0x50000 0x500>;
 				interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&gateclk 18>;
+				phys = <&usbcluster PHY_TYPE_USB2>;
+				phy-names = "usb";
 				status = "disabled";
 			};
 
@@ -412,6 +415,8 @@
 				reg = <0x58000 0x20000>,<0x5b880 0x80>;
 				interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&gateclk 16>;
+				phys = <&usbcluster PHY_TYPE_USB3>;
+				phy-names = "usb";
 				status = "disabled";
 			};
 
-- 
1.9.1


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

* [PATCH v4 7/7] MAINTAINERS: add entry for the Armada 375 USB cluster PHY driver
  2014-11-13 11:47 [PATCH v4 0/7] Add support for USB cluster(PHY muxer) on the Armada 375 Gregory CLEMENT
                   ` (5 preceding siblings ...)
  2014-11-13 11:47 ` [PATCH v4 6/7] ARM: mvebu: add PHY support to the dts for the USB controllers " Gregory CLEMENT
@ 2014-11-13 11:47 ` Gregory CLEMENT
  2014-11-26  3:53   ` Jason Cooper
  6 siblings, 1 reply; 17+ messages in thread
From: Gregory CLEMENT @ 2014-11-13 11:47 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory CLEMENT
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Lior Amsalem, Tawfik Bayouk, Nadav Haklai, Mark Rutland,
	devicetree, Grant Likely, Rob Herring, linux-kernel

Add MAINTAINERS add entry for the Armada 375 USB cluster PHY driver.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 MAINTAINERS | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index ea4d0058fd1b..ea35fa243502 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1571,6 +1571,12 @@ S:	Maintained
 F:	arch/arm64/
 F:	Documentation/arm64/
 
+ARMADA 375 USB PHY DRIVER
+M:	Gregory Clement <gregory.clement@free-electrons.com>
+L:	linux-kernel@vger.kernel.org
+S:	Maintained
+F:	drivers/phy/phy-armada375-usb2.c
+
 AS3645A LED FLASH CONTROLLER DRIVER
 M:	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
 L:	linux-media@vger.kernel.org
-- 
1.9.1


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

* Re: [PATCH v4 4/7] phy: add support for USB cluster on the Armada 375 SoC
  2014-11-13 11:47 ` [PATCH v4 4/7] phy: add support for USB cluster on the Armada 375 SoC Gregory CLEMENT
@ 2014-11-13 13:06   ` Thomas Petazzoni
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2014-11-13 13:06 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Kishon Vijay Abraham I, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Ezequiel Garcia, linux-arm-kernel,
	Lior Amsalem, Tawfik Bayouk, Nadav Haklai, Mark Rutland,
	devicetree, Grant Likely, Rob Herring, linux-kernel

Dear Gregory CLEMENT,

On Thu, 13 Nov 2014 12:47:46 +0100, Gregory CLEMENT wrote:
> The Armada 375 SoC comes with an USB2 host and device controller and
> an USB3 controller. The USB cluster control register allows to manage
> common features of both USB controllers.
> 
> This commit adds a driver integrated in the generic PHY framework to
> control this USB cluster feature.
> 
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  drivers/phy/Kconfig              |   6 ++
>  drivers/phy/Makefile             |   1 +
>  drivers/phy/phy-armada375-usb2.c | 158 +++++++++++++++++++++++++++++++++++++++
>  include/dt-bindings/phy/phy.h    |   1 +
>  4 files changed, 166 insertions(+)
>  create mode 100644 drivers/phy/phy-armada375-usb2.c
> 
> diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
> index 2a436e607f99..625adb0abd43 100644
> --- a/drivers/phy/Kconfig
> +++ b/drivers/phy/Kconfig
> @@ -21,6 +21,12 @@ config PHY_BERLIN_SATA
>  	select GENERIC_PHY
>  	help
>  	  Enable this to support the SATA PHY on Marvell Berlin SoCs.
> +config ARMADA375_USBCLUSTER_PHY

Missing new line here.

> +	def_bool y
> +	depends on MACH_ARMADA_375 || COMPILE_TEST
> +	depends on OF
> +	select GENERIC_PHY
> +
>  

One too many new line.


> +	cluster_phy = dev_get_drvdata(phy->dev.parent);
> +	if (!cluster_phy)
> +		return -ENOMEM;

Is ENOMEM really the appropriate error code here?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* Re: [PATCH v4 6/7] ARM: mvebu: add PHY support to the dts for the USB controllers on Armada 375
  2014-11-13 11:47 ` [PATCH v4 6/7] ARM: mvebu: add PHY support to the dts for the USB controllers " Gregory CLEMENT
@ 2014-11-22  2:08   ` Jason Cooper
  2014-11-22  9:20     ` Gregory CLEMENT
  0 siblings, 1 reply; 17+ messages in thread
From: Jason Cooper @ 2014-11-22  2:08 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Kishon Vijay Abraham I, Andrew Lunn, Sebastian Hesselbarth,
	Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Lior Amsalem, Tawfik Bayouk, Nadav Haklai, Mark Rutland,
	devicetree, Grant Likely, Rob Herring, linux-kernel

On Thu, Nov 13, 2014 at 12:47:48PM +0100, Gregory CLEMENT wrote:
> Now that the USB cluster node has been added, use it as a PHY provider
> for the USB controller linked to it: the first EHCI and the xHCI.
> 
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> ---
>  arch/arm/boot/dts/armada-375.dtsi | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
> index 8f45cf5d2a50..f344ec420c95 100644
> --- a/arch/arm/boot/dts/armada-375.dtsi
> +++ b/arch/arm/boot/dts/armada-375.dtsi
> @@ -14,6 +14,7 @@
>  #include "skeleton.dtsi"
>  #include <dt-bindings/interrupt-controller/arm-gic.h>
>  #include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/phy/phy.h>

Odd.  The previous patch in this series simply adds a line to phy.h,
however, I get the following error during 'make dtbs':

########
  DTC     arch/arm/boot/dts/armada-375-db.dtb
In file included from arch/arm/boot/dts/armada-375-db.dts:17:0:arch/arm/boot/dts/armada-375.dtsi:17:33:
fatal error: dt-bindings/phy/phy.h: No such file or directory
 #include <dt-bindings/phy/phy.h>
                                 ^
compilation terminated.
scripts/Makefile.lib:282: recipe for target 'arch/arm/boot/dts/armada-37 5-db.dtb' failed
########

mvebu/dt is based on v3.18-rc1.  Is there a missing dependency
somewhere?  Perhaps we should let Kishon take the whole series and
handle the (hopefully trivial) merge conflict?

thx,

Jason.

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

* Re: [PATCH v4 6/7] ARM: mvebu: add PHY support to the dts for the USB controllers on Armada 375
  2014-11-22  2:08   ` Jason Cooper
@ 2014-11-22  9:20     ` Gregory CLEMENT
  2014-11-24  5:51       ` Kishon Vijay Abraham I
  2014-11-26  3:59       ` Jason Cooper
  0 siblings, 2 replies; 17+ messages in thread
From: Gregory CLEMENT @ 2014-11-22  9:20 UTC (permalink / raw)
  To: Jason Cooper
  Cc: Kishon Vijay Abraham I, Andrew Lunn, Sebastian Hesselbarth,
	Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Lior Amsalem, Tawfik Bayouk, Nadav Haklai, Mark Rutland,
	devicetree, Grant Likely, Rob Herring, linux-kernel

Hi Jason,

On 22/11/2014 03:08, Jason Cooper wrote:
> On Thu, Nov 13, 2014 at 12:47:48PM +0100, Gregory CLEMENT wrote:
>> Now that the USB cluster node has been added, use it as a PHY provider
>> for the USB controller linked to it: the first EHCI and the xHCI.
>>
>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
>> ---
>>  arch/arm/boot/dts/armada-375.dtsi | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
>> index 8f45cf5d2a50..f344ec420c95 100644
>> --- a/arch/arm/boot/dts/armada-375.dtsi
>> +++ b/arch/arm/boot/dts/armada-375.dtsi
>> @@ -14,6 +14,7 @@
>>  #include "skeleton.dtsi"
>>  #include <dt-bindings/interrupt-controller/arm-gic.h>
>>  #include <dt-bindings/interrupt-controller/irq.h>
>> +#include <dt-bindings/phy/phy.h>
> 
> Odd.  The previous patch in this series simply adds a line to phy.h,
> however, I get the following error during 'make dtbs':
> 
> ########
>   DTC     arch/arm/boot/dts/armada-375-db.dtb
> In file included from arch/arm/boot/dts/armada-375-db.dts:17:0:arch/arm/boot/dts/armada-375.dtsi:17:33:
> fatal error: dt-bindings/phy/phy.h: No such file or directory
>  #include <dt-bindings/phy/phy.h>
>                                  ^
> compilation terminated.
> scripts/Makefile.lib:282: recipe for target 'arch/arm/boot/dts/armada-37 5-db.dtb' failed
> ########
> 
> mvebu/dt is based on v3.18-rc1.  Is there a missing dependency
> somewhere?  Perhaps we should let Kishon take the whole series and
> handle the (hopefully trivial) merge conflict?

Actually Kishon asked me to use the dt-bindings/phy/phy.h file which
was introduced by the patch "phy: Add PHY header file for DT x Driver
defines". So indeed I had to have a dependency on the phy_dt_header
branch (which is based on v3.18-rc4 and have only this single commit).
The git tree is located at
git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git


Maybe we could add this branch in mvebu as a dependency as it is done
on arm-soc. I suggest this because I would prefer that we continue to
be the only ones to merge the device tree files in order to reduce the
merge conflict.

Thanks,

Gregory



> 
> thx,
> 
> Jason.
> 


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: [PATCH v4 6/7] ARM: mvebu: add PHY support to the dts for the USB controllers on Armada 375
  2014-11-22  9:20     ` Gregory CLEMENT
@ 2014-11-24  5:51       ` Kishon Vijay Abraham I
  2014-11-26  3:59       ` Jason Cooper
  1 sibling, 0 replies; 17+ messages in thread
From: Kishon Vijay Abraham I @ 2014-11-24  5:51 UTC (permalink / raw)
  To: Gregory CLEMENT, Jason Cooper
  Cc: Andrew Lunn, Sebastian Hesselbarth, Thomas Petazzoni,
	Ezequiel Garcia, linux-arm-kernel, Lior Amsalem, Tawfik Bayouk,
	Nadav Haklai, Mark Rutland, devicetree, Grant Likely,
	Rob Herring, linux-kernel

Hi,

On Saturday 22 November 2014 02:50 PM, Gregory CLEMENT wrote:
> Hi Jason,
> 
> On 22/11/2014 03:08, Jason Cooper wrote:
>> On Thu, Nov 13, 2014 at 12:47:48PM +0100, Gregory CLEMENT wrote:
>>> Now that the USB cluster node has been added, use it as a PHY provider
>>> for the USB controller linked to it: the first EHCI and the xHCI.
>>>
>>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
>>> ---
>>>  arch/arm/boot/dts/armada-375.dtsi | 5 +++++
>>>  1 file changed, 5 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
>>> index 8f45cf5d2a50..f344ec420c95 100644
>>> --- a/arch/arm/boot/dts/armada-375.dtsi
>>> +++ b/arch/arm/boot/dts/armada-375.dtsi
>>> @@ -14,6 +14,7 @@
>>>  #include "skeleton.dtsi"
>>>  #include <dt-bindings/interrupt-controller/arm-gic.h>
>>>  #include <dt-bindings/interrupt-controller/irq.h>
>>> +#include <dt-bindings/phy/phy.h>
>>
>> Odd.  The previous patch in this series simply adds a line to phy.h,
>> however, I get the following error during 'make dtbs':
>>
>> ########
>>   DTC     arch/arm/boot/dts/armada-375-db.dtb
>> In file included from arch/arm/boot/dts/armada-375-db.dts:17:0:arch/arm/boot/dts/armada-375.dtsi:17:33:
>> fatal error: dt-bindings/phy/phy.h: No such file or directory
>>  #include <dt-bindings/phy/phy.h>
>>                                  ^
>> compilation terminated.
>> scripts/Makefile.lib:282: recipe for target 'arch/arm/boot/dts/armada-37 5-db.dtb' failed
>> ########
>>
>> mvebu/dt is based on v3.18-rc1.  Is there a missing dependency
>> somewhere?  Perhaps we should let Kishon take the whole series and
>> handle the (hopefully trivial) merge conflict?
> 
> Actually Kishon asked me to use the dt-bindings/phy/phy.h file which
> was introduced by the patch "phy: Add PHY header file for DT x Driver
> defines". So indeed I had to have a dependency on the phy_dt_header
> branch (which is based on v3.18-rc4 and have only this single commit).
> The git tree is located at
> git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git

right, I have a immutable tag @
git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git
phy-dt-header which is based on 3.18-rc4 (I should have based it on -rc1 as
pointed out by Maxime but it is too late now).

So they have based their branch on -rc4 and them merged phy-dt-header. Can you
do something similar?

Thanks
Kishon

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

* Re: [PATCH v4 7/7] MAINTAINERS: add entry for the Armada 375 USB cluster PHY driver
  2014-11-13 11:47 ` [PATCH v4 7/7] MAINTAINERS: add entry for the Armada 375 USB cluster PHY driver Gregory CLEMENT
@ 2014-11-26  3:53   ` Jason Cooper
  0 siblings, 0 replies; 17+ messages in thread
From: Jason Cooper @ 2014-11-26  3:53 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Kishon Vijay Abraham I, Andrew Lunn, Sebastian Hesselbarth,
	Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Lior Amsalem, Tawfik Bayouk, Nadav Haklai, Mark Rutland,
	devicetree, Grant Likely, Rob Herring, linux-kernel

On Thu, Nov 13, 2014 at 12:47:49PM +0100, Gregory CLEMENT wrote:
> Add MAINTAINERS add entry for the Armada 375 USB cluster PHY driver.
> 
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> ---
>  MAINTAINERS | 6 ++++++
>  1 file changed, 6 insertions(+)

Not that i do anything with, phy, but just so you know I'm not taking
it:

Acked-by: Jason Cooper <jason@lakedaemon.net>

thx,

Jason.

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

* Re: [PATCH v4 6/7] ARM: mvebu: add PHY support to the dts for the USB controllers on Armada 375
  2014-11-22  9:20     ` Gregory CLEMENT
  2014-11-24  5:51       ` Kishon Vijay Abraham I
@ 2014-11-26  3:59       ` Jason Cooper
  2014-11-26  5:13         ` Kishon Vijay Abraham I
  1 sibling, 1 reply; 17+ messages in thread
From: Jason Cooper @ 2014-11-26  3:59 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Kishon Vijay Abraham I, Andrew Lunn, Sebastian Hesselbarth,
	Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Lior Amsalem, Tawfik Bayouk, Nadav Haklai, Mark Rutland,
	devicetree, Grant Likely, Rob Herring, linux-kernel

On Sat, Nov 22, 2014 at 10:20:43AM +0100, Gregory CLEMENT wrote:
> Hi Jason,
> 
> On 22/11/2014 03:08, Jason Cooper wrote:
> > On Thu, Nov 13, 2014 at 12:47:48PM +0100, Gregory CLEMENT wrote:
> >> Now that the USB cluster node has been added, use it as a PHY provider
> >> for the USB controller linked to it: the first EHCI and the xHCI.
> >>
> >> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> >> ---
> >>  arch/arm/boot/dts/armada-375.dtsi | 5 +++++
> >>  1 file changed, 5 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
> >> index 8f45cf5d2a50..f344ec420c95 100644
> >> --- a/arch/arm/boot/dts/armada-375.dtsi
> >> +++ b/arch/arm/boot/dts/armada-375.dtsi
> >> @@ -14,6 +14,7 @@
> >>  #include "skeleton.dtsi"
> >>  #include <dt-bindings/interrupt-controller/arm-gic.h>
> >>  #include <dt-bindings/interrupt-controller/irq.h>
> >> +#include <dt-bindings/phy/phy.h>
> > 
> > Odd.  The previous patch in this series simply adds a line to phy.h,
> > however, I get the following error during 'make dtbs':
> > 
> > ########
> >   DTC     arch/arm/boot/dts/armada-375-db.dtb
> > In file included from arch/arm/boot/dts/armada-375-db.dts:17:0:arch/arm/boot/dts/armada-375.dtsi:17:33:
> > fatal error: dt-bindings/phy/phy.h: No such file or directory
> >  #include <dt-bindings/phy/phy.h>
> >                                  ^
> > compilation terminated.
> > scripts/Makefile.lib:282: recipe for target 'arch/arm/boot/dts/armada-37 5-db.dtb' failed
> > ########
> > 
> > mvebu/dt is based on v3.18-rc1.  Is there a missing dependency
> > somewhere?  Perhaps we should let Kishon take the whole series and
> > handle the (hopefully trivial) merge conflict?
> 
> Actually Kishon asked me to use the dt-bindings/phy/phy.h file which
> was introduced by the patch "phy: Add PHY header file for DT x Driver
> defines". So indeed I had to have a dependency on the phy_dt_header
> branch (which is based on v3.18-rc4 and have only this single commit).
> The git tree is located at
> git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git
> 
> 
> Maybe we could add this branch in mvebu as a dependency as it is done
> on arm-soc. I suggest this because I would prefer that we continue to
> be the only ones to merge the device tree files in order to reduce the
> merge conflict.

Ok, I've applied patches 5 and 6 to mvebu/dt-usb_phy with a dependency
on tags/phy-dt-header.

Patches 1-4:

Acked-by: Jason Cooper <jason@lakedaemon.net>

thx,

Jason.

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

* Re: [PATCH v4 6/7] ARM: mvebu: add PHY support to the dts for the USB controllers on Armada 375
  2014-11-26  3:59       ` Jason Cooper
@ 2014-11-26  5:13         ` Kishon Vijay Abraham I
  2014-11-26  5:17           ` Jason Cooper
  0 siblings, 1 reply; 17+ messages in thread
From: Kishon Vijay Abraham I @ 2014-11-26  5:13 UTC (permalink / raw)
  To: Jason Cooper, Gregory CLEMENT
  Cc: Andrew Lunn, Sebastian Hesselbarth, Thomas Petazzoni,
	Ezequiel Garcia, linux-arm-kernel, Lior Amsalem, Tawfik Bayouk,
	Nadav Haklai, Mark Rutland, devicetree, Grant Likely,
	Rob Herring, linux-kernel

Hi,

On Wednesday 26 November 2014 09:29 AM, Jason Cooper wrote:
> On Sat, Nov 22, 2014 at 10:20:43AM +0100, Gregory CLEMENT wrote:
>> Hi Jason,
>>
>> On 22/11/2014 03:08, Jason Cooper wrote:
>>> On Thu, Nov 13, 2014 at 12:47:48PM +0100, Gregory CLEMENT wrote:
>>>> Now that the USB cluster node has been added, use it as a PHY provider
>>>> for the USB controller linked to it: the first EHCI and the xHCI.
>>>>
>>>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>

Looks like I'm not cc'ed in v4 of this patch series :-(

-Kishon
>>>> ---
>>>>  arch/arm/boot/dts/armada-375.dtsi | 5 +++++
>>>>  1 file changed, 5 insertions(+)
>>>>
>>>> diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
>>>> index 8f45cf5d2a50..f344ec420c95 100644
>>>> --- a/arch/arm/boot/dts/armada-375.dtsi
>>>> +++ b/arch/arm/boot/dts/armada-375.dtsi
>>>> @@ -14,6 +14,7 @@
>>>>  #include "skeleton.dtsi"
>>>>  #include <dt-bindings/interrupt-controller/arm-gic.h>
>>>>  #include <dt-bindings/interrupt-controller/irq.h>
>>>> +#include <dt-bindings/phy/phy.h>
>>>
>>> Odd.  The previous patch in this series simply adds a line to phy.h,
>>> however, I get the following error during 'make dtbs':
>>>
>>> ########
>>>   DTC     arch/arm/boot/dts/armada-375-db.dtb
>>> In file included from arch/arm/boot/dts/armada-375-db.dts:17:0:arch/arm/boot/dts/armada-375.dtsi:17:33:
>>> fatal error: dt-bindings/phy/phy.h: No such file or directory
>>>  #include <dt-bindings/phy/phy.h>
>>>                                  ^
>>> compilation terminated.
>>> scripts/Makefile.lib:282: recipe for target 'arch/arm/boot/dts/armada-37 5-db.dtb' failed
>>> ########
>>>
>>> mvebu/dt is based on v3.18-rc1.  Is there a missing dependency
>>> somewhere?  Perhaps we should let Kishon take the whole series and
>>> handle the (hopefully trivial) merge conflict?
>>
>> Actually Kishon asked me to use the dt-bindings/phy/phy.h file which
>> was introduced by the patch "phy: Add PHY header file for DT x Driver
>> defines". So indeed I had to have a dependency on the phy_dt_header
>> branch (which is based on v3.18-rc4 and have only this single commit).
>> The git tree is located at
>> git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git
>>
>>
>> Maybe we could add this branch in mvebu as a dependency as it is done
>> on arm-soc. I suggest this because I would prefer that we continue to
>> be the only ones to merge the device tree files in order to reduce the
>> merge conflict.
> 
> Ok, I've applied patches 5 and 6 to mvebu/dt-usb_phy with a dependency
> on tags/phy-dt-header.
> 
> Patches 1-4:
> 
> Acked-by: Jason Cooper <jason@lakedaemon.net>
> 
> thx,
> 
> Jason.
> 

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

* Re: [PATCH v4 6/7] ARM: mvebu: add PHY support to the dts for the USB controllers on Armada 375
  2014-11-26  5:13         ` Kishon Vijay Abraham I
@ 2014-11-26  5:17           ` Jason Cooper
  2014-11-26  5:23             ` Kishon Vijay Abraham I
  0 siblings, 1 reply; 17+ messages in thread
From: Jason Cooper @ 2014-11-26  5:17 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: Gregory CLEMENT, Andrew Lunn, Sebastian Hesselbarth,
	Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Lior Amsalem, Tawfik Bayouk, Nadav Haklai, Mark Rutland,
	devicetree, Grant Likely, Rob Herring, linux-kernel

On Wed, Nov 26, 2014 at 10:43:08AM +0530, Kishon Vijay Abraham I wrote:
> Hi,
> 
> On Wednesday 26 November 2014 09:29 AM, Jason Cooper wrote:
> > On Sat, Nov 22, 2014 at 10:20:43AM +0100, Gregory CLEMENT wrote:
> >> Hi Jason,
> >>
> >> On 22/11/2014 03:08, Jason Cooper wrote:
> >>> On Thu, Nov 13, 2014 at 12:47:48PM +0100, Gregory CLEMENT wrote:
> >>>> Now that the USB cluster node has been added, use it as a PHY provider
> >>>> for the USB controller linked to it: the first EHCI and the xHCI.
> >>>>
> >>>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> 
> Looks like I'm not cc'ed in v4 of this patch series :-(

I've bounced emails maybe three times in my life.  Thought it might work
here.  Did it?

thx,

Jason.

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

* Re: [PATCH v4 6/7] ARM: mvebu: add PHY support to the dts for the USB controllers on Armada 375
  2014-11-26  5:17           ` Jason Cooper
@ 2014-11-26  5:23             ` Kishon Vijay Abraham I
  0 siblings, 0 replies; 17+ messages in thread
From: Kishon Vijay Abraham I @ 2014-11-26  5:23 UTC (permalink / raw)
  To: Jason Cooper
  Cc: Gregory CLEMENT, Andrew Lunn, Sebastian Hesselbarth,
	Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Lior Amsalem, Tawfik Bayouk, Nadav Haklai, Mark Rutland,
	devicetree, Grant Likely, Rob Herring, linux-kernel



On Wednesday 26 November 2014 10:47 AM, Jason Cooper wrote:
> On Wed, Nov 26, 2014 at 10:43:08AM +0530, Kishon Vijay Abraham I wrote:
>> Hi,
>>
>> On Wednesday 26 November 2014 09:29 AM, Jason Cooper wrote:
>>> On Sat, Nov 22, 2014 at 10:20:43AM +0100, Gregory CLEMENT wrote:
>>>> Hi Jason,
>>>>
>>>> On 22/11/2014 03:08, Jason Cooper wrote:
>>>>> On Thu, Nov 13, 2014 at 12:47:48PM +0100, Gregory CLEMENT wrote:
>>>>>> Now that the USB cluster node has been added, use it as a PHY provider
>>>>>> for the USB controller linked to it: the first EHCI and the xHCI.
>>>>>>
>>>>>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
>>
>> Looks like I'm not cc'ed in v4 of this patch series :-(
> 
> I've bounced emails maybe three times in my life.  Thought it might work
> here.  Did it?

Actually I'm CC'ed, just that search didn't find it. Sorry for the noise.

Thanks
Kishon
> 
> thx,
> 
> Jason.
> 

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

end of thread, other threads:[~2014-11-26  5:24 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-13 11:47 [PATCH v4 0/7] Add support for USB cluster(PHY muxer) on the Armada 375 Gregory CLEMENT
2014-11-13 11:47 ` [PATCH v4 1/7] phy: Use PTR_ERR_OR_ZERO to fix warning raised by coccinelle Gregory CLEMENT
2014-11-13 11:47 ` [PATCH v4 2/7] Phy: DT binding documentation for Marvell MVEBU SATA phy Gregory CLEMENT
2014-11-13 11:47 ` [PATCH v4 3/7] Phy: DT binding documentation for the Armada 375 USB cluster binding Gregory CLEMENT
2014-11-13 11:47 ` [PATCH v4 4/7] phy: add support for USB cluster on the Armada 375 SoC Gregory CLEMENT
2014-11-13 13:06   ` Thomas Petazzoni
2014-11-13 11:47 ` [PATCH v4 5/7] ARM: mvebu: add Device Tree description of USB cluster controller on Armada 375 Gregory CLEMENT
2014-11-13 11:47 ` [PATCH v4 6/7] ARM: mvebu: add PHY support to the dts for the USB controllers " Gregory CLEMENT
2014-11-22  2:08   ` Jason Cooper
2014-11-22  9:20     ` Gregory CLEMENT
2014-11-24  5:51       ` Kishon Vijay Abraham I
2014-11-26  3:59       ` Jason Cooper
2014-11-26  5:13         ` Kishon Vijay Abraham I
2014-11-26  5:17           ` Jason Cooper
2014-11-26  5:23             ` Kishon Vijay Abraham I
2014-11-13 11:47 ` [PATCH v4 7/7] MAINTAINERS: add entry for the Armada 375 USB cluster PHY driver Gregory CLEMENT
2014-11-26  3:53   ` Jason Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).