All of lore.kernel.org
 help / color / mirror / Atom feed
* USB/PCI device-tree updates
@ 2014-01-18 15:03 Ben Dooks
  2014-01-18 15:03 ` [PATCH 1/6] pci-rcar-gen2: add initial device tree documentation Ben Dooks
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Ben Dooks @ 2014-01-18 15:03 UTC (permalink / raw)
  To: linux-sh

Patches to get USB and PCI on hte rcar-gen2 working with device tree.


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

* [PATCH 1/6] pci-rcar-gen2: add initial device tree documentation
  2014-01-18 15:03 USB/PCI device-tree updates Ben Dooks
@ 2014-01-18 15:03 ` Ben Dooks
  2014-01-18 15:10     ` Ben Dooks
  2014-01-18 19:25     ` Sergei Shtylyov
  2014-01-18 15:03 ` [PATCH 2/6] ARM: shmbobile: r8a7790.dtsi: add pci0/1/2 nodes Ben Dooks
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 21+ messages in thread
From: Ben Dooks @ 2014-01-18 15:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-sh, Ben Dooks, devicetree, horms+renesas

Add initial documentation for the pci-rcar-gen2 driver device tree bindings.
This is not yet complete and needs work on the sub-nodes for the PCI bus.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: linux-sh@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: horms+renesas@verge.net.au
---
 Documentation/devicetree/bindings/pci/renessas,pci-r8a7790 | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pci/renessas,pci-r8a7790

diff --git a/Documentation/devicetree/bindings/pci/renessas,pci-r8a7790 b/Documentation/devicetree/bindings/pci/renessas,pci-r8a7790
new file mode 100644
index 0000000..65268d9
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/renessas,pci-r8a7790
@@ -0,0 +1,12 @@
+Renesas internal AHB to PCI bridge
+
+This is the bridge used internally to connect the USB controllers to the
+AHB.
+
+Required properties:
+ - compatible: "renesas,pci-r8a7790" for the R8A7790 SoC
+ - reg : A list of physical regions to access the device. The first is
+         the operational registers for the OHCI/EHCI controller and the
+	 second region is for the bridge configuration and control registers.
+ - interrupts : interrupt for the device
+ - clocks : The reference to the device clock
\ No newline at end of file
-- 
1.8.5.2


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

* [PATCH 2/6] ARM: shmbobile: r8a7790.dtsi: add pci0/1/2 nodes
  2014-01-18 15:03 USB/PCI device-tree updates Ben Dooks
  2014-01-18 15:03 ` [PATCH 1/6] pci-rcar-gen2: add initial device tree documentation Ben Dooks
@ 2014-01-18 15:03 ` Ben Dooks
  2014-01-18 15:03 ` [PATCH 3/6] ARM: shmobile: lager.dts: add pci 0/1/2 Ben Dooks
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 21+ messages in thread
From: Ben Dooks @ 2014-01-18 15:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-sh, Ben Dooks, devicetree, horms+renesas

Add nodes for USB PCI bridge devices.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
---
Cc: devicetree@vger.kernel.org
Cc: linux-sh@vger.kernel.org
Cc: horms+renesas@verge.net.au
---
 arch/arm/boot/dts/r8a7790.dtsi | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 3cc834b..c5e9783 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -728,4 +728,34 @@
 				"rcan1", "rcan0", "qspi_mod", "i2c3", "i2c2", "i2c1", "i2c0";
 		};
 	};
+
+	pci0: pci@ee090000  {
+		compatible = "renesas,pci-r8a7790";
+		clocks = <&mstp7_clks R8A7790_CLK_EHCI>;
+		reg = <0x0 0xee090000 0x0 0xc00>,
+		      <0x0 0xee080000 0x0 0x1100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 111 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	pci1: pci@ee0b0000  {
+		compatible = "renesas,pci-r8a7790";
+		clocks = <&mstp7_clks R8A7790_CLK_EHCI>;
+		reg = <0x0 0xee0b0000 0x0 0xc00>,
+		      <0x0 0xee0a0000 0x0 0x1100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 112 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	pci2: pci@ee0d0000  {
+		compatible = "renesas,pci-r8a7790";
+		clocks = <&mstp7_clks R8A7790_CLK_EHCI>;
+		reg = <0x0 0xee0d0000 0x0 0xc00>,
+		      <0x0 0xee0c0000 0x0 0x1100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 113 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
 };
-- 
1.8.5.2


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

* [PATCH 3/6] ARM: shmobile: lager.dts: add pci 0/1/2
  2014-01-18 15:03 USB/PCI device-tree updates Ben Dooks
  2014-01-18 15:03 ` [PATCH 1/6] pci-rcar-gen2: add initial device tree documentation Ben Dooks
  2014-01-18 15:03 ` [PATCH 2/6] ARM: shmbobile: r8a7790.dtsi: add pci0/1/2 nodes Ben Dooks
@ 2014-01-18 15:03 ` Ben Dooks
  2014-01-18 15:03 ` [PATCH 4/6] phy-rcar-usb-gen2: add device tree support Ben Dooks
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 21+ messages in thread
From: Ben Dooks @ 2014-01-18 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-sh, Ben Dooks, open list:OPEN FIRMWARE AND...,
	Magnus Damm, Simon Horman

Enable pci1 and pci2 nodes for USB controllers attached to the AHB<>PCI
bridge devices. Node pci0 is enabled for the moment as a device, but
could be switched to usb-gadget mode later.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
---
Cc: linux-sh@vger.kernel.org (open list:ARM/SHMOBILE ARM...)
Cc: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND...)
Cc: Magnus Damm <magnus.damm@gmail.com> (supporter:ARM/SHMOBILE ARM...)
Cc: Simon Horman <horms@verge.net.au> (supporter:ARM/SHMOBILE ARM...)
---
 arch/arm/boot/dts/r8a7790-lager.dts | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index 57569cb..8dfcd25 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -80,6 +80,22 @@
 		renesas,groups = "mmc1_data8", "mmc1_ctrl";
 		renesas,function = "mmc1";
 	};
+
+	usb0_pins: usb0 {
+		renesas,groups = "usb0";
+		renesas,function = "usb";
+	};
+
+	usb1_pins: usb1 {
+		renesas,groups = "usb1";
+		renesas,function = "usb";
+	};
+
+	usb2_pins: usb2 {
+		renesas,groups = "usb2";
+		renesas,function = "usb";
+	};
+
 };
 
 &mmcif1 {
@@ -91,3 +107,21 @@
 	non-removable;
 	status = "okay";
 };
+
+&pci0 {
+	status = "okay";
+	pinctrl-0 = <&usb0_pins>;
+	pinctrl-names = "default";
+};
+
+&pci1 {
+	status = "okay";
+	pinctrl-0 = <&usb1_pins>;
+	pinctrl-names = "default";
+};
+
+&pci2 {
+	status = "okay";
+	pinctrl-0 = <&usb2_pins>;
+	pinctrl-names = "default";
+};
-- 
1.8.5.2


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

* [PATCH 4/6] phy-rcar-usb-gen2: add device tree support
  2014-01-18 15:03 USB/PCI device-tree updates Ben Dooks
                   ` (2 preceding siblings ...)
  2014-01-18 15:03 ` [PATCH 3/6] ARM: shmobile: lager.dts: add pci 0/1/2 Ben Dooks
@ 2014-01-18 15:03 ` Ben Dooks
       [not found]   ` <52DAD3B3.1050807@cogentembedded.com>
       [not found]   ` <52DD141F.3040704@cogentembedded.com>
  2014-01-18 15:03 ` [PATCH 5/6] ARM: shmobile: r8a7790.dtsi: add usbphy node Ben Dooks
  2014-01-18 15:03 ` [PATCH 6/6] ARM: shmobile: lager.dtb: add usbphy reference Ben Dooks
  5 siblings, 2 replies; 21+ messages in thread
From: Ben Dooks @ 2014-01-18 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-sh, Ben Dooks, open list:USB PHY LAYER, Magnus Damm,
	Simon Horman, open list:OPEN FIRMWARE AND...

Add support for the phy-rcar-gen2-usb driver to be probed from device tree.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
---
Cc: linux-usb@vger.kernel.org (open list:USB PHY LAYER)
Cc: linux-sh@vger.kernel.org (open list:ARM/SHMOBILE ARM...)
Cc: Magnus Damm <magnus.damm@gmail.com> (supporter:ARM/SHMOBILE ARM...)
Cc: Simon Horman <horms@verge.net.au> (supporter:ARM/SHMOBILE ARM...)
Cc: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND...)
---
 drivers/usb/phy/phy-rcar-gen2-usb.c | 35 ++++++++++++++++++++++++++++++-----
 1 file changed, 30 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/phy/phy-rcar-gen2-usb.c b/drivers/usb/phy/phy-rcar-gen2-usb.c
index db3ab34..906b74b 100644
--- a/drivers/usb/phy/phy-rcar-gen2-usb.c
+++ b/drivers/usb/phy/phy-rcar-gen2-usb.c
@@ -15,6 +15,7 @@
 #include <linux/module.h>
 #include <linux/platform_data/usb-rcar-gen2-phy.h>
 #include <linux/platform_device.h>
+#include <linux/of_device.h>
 #include <linux/spinlock.h>
 #include <linux/usb/otg.h>
 
@@ -167,8 +168,15 @@ out:
 	spin_unlock_irqrestore(&priv->lock, flags);
 }
 
+static struct of_device_id rcar_gen2_usb_phy_ofmatch[] = {
+	{ .compatible = "renesas,usb-phy-r8a7790", },
+	{ .compatible = "renesas,rcar-gen2-usb-phy", },
+	{ },
+};
+
 static int rcar_gen2_usb_phy_probe(struct platform_device *pdev)
 {
+	const struct of_device_id *of_id;
 	struct device *dev = &pdev->dev;
 	struct rcar_gen2_phy_platform_data *pdata;
 	struct rcar_gen2_usb_phy_priv *priv;
@@ -177,8 +185,9 @@ static int rcar_gen2_usb_phy_probe(struct platform_device *pdev)
 	struct clk *clk;
 	int retval;
 
+	of_id = of_match_device(rcar_gen2_usb_phy_ofmatch, &pdev->dev);
 	pdata = dev_get_platdata(&pdev->dev);
-	if (!pdata) {
+	if (!pdata && !of_id) {
 		dev_err(dev, "No platform data\n");
 		return -EINVAL;
 	}
@@ -203,16 +212,31 @@ static int rcar_gen2_usb_phy_probe(struct platform_device *pdev)
 	spin_lock_init(&priv->lock);
 	priv->clk = clk;
 	priv->base = base;
-	priv->ugctrl2 = pdata->chan0_pci ?
-			USBHS_UGCTRL2_USB0_PCI : USBHS_UGCTRL2_USB0_HS;
-	priv->ugctrl2 |= pdata->chan2_pci ?
-			USBHS_UGCTRL2_USB2_PCI : USBHS_UGCTRL2_USB2_SS;
 	priv->phy.dev = dev;
 	priv->phy.label = dev_name(dev);
 	priv->phy.init = rcar_gen2_usb_phy_init;
 	priv->phy.shutdown = rcar_gen2_usb_phy_shutdown;
 	priv->phy.set_suspend = rcar_gen2_usb_phy_set_suspend;
 
+	if (of_id) {
+		int len = 0;
+
+		if (of_get_property(dev->of_node, "renesas,usb0-hs", &len))
+			priv->ugctrl2 = USBHS_UGCTRL2_USB0_HS;
+		else
+			priv->ugctrl2 = USBHS_UGCTRL2_USB0_PCI;
+
+		if (of_get_property(dev->of_node, "renesas,usb2-ss", &len))
+			priv->ugctrl2 |= USBHS_UGCTRL2_USB2_SS;
+		else
+			priv->ugctrl2 |= USBHS_UGCTRL2_USB2_PCI;
+	} else {
+		priv->ugctrl2 = pdata->chan0_pci ?
+			USBHS_UGCTRL2_USB0_PCI : USBHS_UGCTRL2_USB0_HS;
+		priv->ugctrl2 |= pdata->chan2_pci ?
+			USBHS_UGCTRL2_USB2_PCI : USBHS_UGCTRL2_USB2_SS;
+	}
+
 	retval = usb_add_phy(&priv->phy, USB_PHY_TYPE_USB2);
 	if (retval < 0) {
 		dev_err(dev, "Failed to add USB phy\n");
@@ -236,6 +260,7 @@ static int rcar_gen2_usb_phy_remove(struct platform_device *pdev)
 static struct platform_driver rcar_gen2_usb_phy_driver = {
 	.driver = {
 		.name = "usb_phy_rcar_gen2",
+		.of_match_table = rcar_gen2_usb_phy_ofmatch,
 	},
 	.probe = rcar_gen2_usb_phy_probe,
 	.remove = rcar_gen2_usb_phy_remove,
-- 
1.8.5.2


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

* [PATCH 5/6] ARM: shmobile: r8a7790.dtsi: add usbphy node
  2014-01-18 15:03 USB/PCI device-tree updates Ben Dooks
                   ` (3 preceding siblings ...)
  2014-01-18 15:03 ` [PATCH 4/6] phy-rcar-usb-gen2: add device tree support Ben Dooks
@ 2014-01-18 15:03 ` Ben Dooks
  2014-01-18 15:03 ` [PATCH 6/6] ARM: shmobile: lager.dtb: add usbphy reference Ben Dooks
  5 siblings, 0 replies; 21+ messages in thread
From: Ben Dooks @ 2014-01-18 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-sh, Ben Dooks, open list:OPEN FIRMWARE AND...,
	Magnus Damm, Simon Horman

Add node for USB PHY driver to the base R8A7790 device tree include file.
It is up to the board file to enable and configure it as necessary.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
---
Cc: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND...)
Cc: Magnus Damm <magnus.damm@gmail.com> (supporter:ARM/SHMOBILE ARM...)
Cc: Simon Horman <horms@verge.net.au> (supporter:ARM/SHMOBILE ARM...)
Cc: linux-sh@vger.kernel.org (open list:ARM/SHMOBILE ARM...)
---
 arch/arm/boot/dts/r8a7790.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index c5e9783..ea180a5 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -758,4 +758,12 @@
 		interrupts = <0 113 IRQ_TYPE_LEVEL_HIGH>;
 		status = "disabled";
 	};
+
+	usbphy: usbphy@e6590100 {
+		compatible = "renesas,usb-phy-r8a7790";
+		clocks = <&mstp7_clks R8A7790_CLK_HSUSB>;
+		clock-names = "usbhs";
+		reg = < 0x0 0xe6590100 0x0 0x100>;
+		status = "disabled";
+	};
 };
-- 
1.8.5.2


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

* [PATCH 6/6] ARM: shmobile: lager.dtb: add usbphy reference
  2014-01-18 15:03 USB/PCI device-tree updates Ben Dooks
                   ` (4 preceding siblings ...)
  2014-01-18 15:03 ` [PATCH 5/6] ARM: shmobile: r8a7790.dtsi: add usbphy node Ben Dooks
@ 2014-01-18 15:03 ` Ben Dooks
  5 siblings, 0 replies; 21+ messages in thread
From: Ben Dooks @ 2014-01-18 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-sh, Ben Dooks, open list:OPEN FIRMWARE AND...,
	Magnus Damm, Simon Horman

Enable the usbphy node so that the phy driver is available.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
---
Cc: linux-sh@vger.kernel.org (open list:ARM/SHMOBILE ARM...)
Cc: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND...)
Cc: Magnus Damm <magnus.damm@gmail.com> (supporter:ARM/SHMOBILE ARM...)
Cc: Simon Horman <horms@verge.net.au> (supporter:ARM/SHMOBILE ARM...)
---
 arch/arm/boot/dts/r8a7790-lager.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index 8dfcd25..83bf18d 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -125,3 +125,7 @@
 	pinctrl-0 = <&usb2_pins>;
 	pinctrl-names = "default";
 };
+
+&usbphy {
+	status = "okay";
+};
-- 
1.8.5.2


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

* [PATCH] pci-rcar-gen2: add of match table
  2014-01-18 15:03 ` [PATCH 1/6] pci-rcar-gen2: add initial device tree documentation Ben Dooks
@ 2014-01-18 15:10     ` Ben Dooks
  2014-01-18 19:25     ` Sergei Shtylyov
  1 sibling, 0 replies; 21+ messages in thread
From: Ben Dooks @ 2014-01-18 15:10 UTC (permalink / raw)
  To: linux-kernel, linux-sh
  Cc: Ben Dooks, Bjorn Helgaas, Simon Horman,
	open list:PCI DRIVER FOR RE..., open list:OPEN FIRMWARE AND...

Add OF match table for pci-rcar-gen2 driver for device tree support.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Bjorn Helgaas <bhelgaas@google.com> (supporter:PCI SUBSYSTEM)
Cc: Simon Horman <horms@verge.net.au> (maintainer:PCI DRIVER FOR RE...)
Cc: linux-pci@vger.kernel.org (open list:PCI DRIVER FOR RE...)
Cc: linux-sh@vger.kernel.org (open list:PCI DRIVER FOR RE...)
Cc: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND...)
---
 drivers/pci/host/pci-rcar-gen2.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
index ceec147..ea65bac 100644
--- a/drivers/pci/host/pci-rcar-gen2.c
+++ b/drivers/pci/host/pci-rcar-gen2.c
@@ -311,9 +311,17 @@ static int __init rcar_pci_probe(struct platform_device *pdev)
 	return rcar_pci_add_controller(priv);
 }
 
+static struct of_device_id rcar_pci_of_match[] = {
+	{ .compatible = "renesas,pci-r8a7790", },
+	{ },
+};
+
+MODULE_DEVICE_TABLE(of, rcar_pci_of_match);
+
 static struct platform_driver rcar_pci_driver = {
 	.driver = {
 		.name = "pci-rcar-gen2",
+		.of_match_table = rcar_pci_of_match,
 	},
 };
 
-- 
1.8.5.2


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

* [PATCH] pci-rcar-gen2: add of match table
@ 2014-01-18 15:10     ` Ben Dooks
  0 siblings, 0 replies; 21+ messages in thread
From: Ben Dooks @ 2014-01-18 15:10 UTC (permalink / raw)
  To: linux-kernel, linux-sh
  Cc: Ben Dooks, Bjorn Helgaas, Simon Horman,
	open list:PCI DRIVER FOR RE..., open list:OPEN FIRMWARE AND...

Add OF match table for pci-rcar-gen2 driver for device tree support.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Bjorn Helgaas <bhelgaas@google.com> (supporter:PCI SUBSYSTEM)
Cc: Simon Horman <horms@verge.net.au> (maintainer:PCI DRIVER FOR RE...)
Cc: linux-pci@vger.kernel.org (open list:PCI DRIVER FOR RE...)
Cc: linux-sh@vger.kernel.org (open list:PCI DRIVER FOR RE...)
Cc: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND...)
---
 drivers/pci/host/pci-rcar-gen2.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
index ceec147..ea65bac 100644
--- a/drivers/pci/host/pci-rcar-gen2.c
+++ b/drivers/pci/host/pci-rcar-gen2.c
@@ -311,9 +311,17 @@ static int __init rcar_pci_probe(struct platform_device *pdev)
 	return rcar_pci_add_controller(priv);
 }
 
+static struct of_device_id rcar_pci_of_match[] = {
+	{ .compatible = "renesas,pci-r8a7790", },
+	{ },
+};
+
+MODULE_DEVICE_TABLE(of, rcar_pci_of_match);
+
 static struct platform_driver rcar_pci_driver = {
 	.driver = {
 		.name = "pci-rcar-gen2",
+		.of_match_table = rcar_pci_of_match,
 	},
 };
 
-- 
1.8.5.2


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

* Re: [PATCH 1/6] pci-rcar-gen2: add initial device tree documentation
  2014-01-18 15:03 ` [PATCH 1/6] pci-rcar-gen2: add initial device tree documentation Ben Dooks
@ 2014-01-18 19:25     ` Sergei Shtylyov
  2014-01-18 19:25     ` Sergei Shtylyov
  1 sibling, 0 replies; 21+ messages in thread
From: Sergei Shtylyov @ 2014-01-18 19:25 UTC (permalink / raw)
  To: Ben Dooks, linux-kernel; +Cc: linux-sh, devicetree, horms+renesas

Hello.

On 18-01-2014 19:03, Ben Dooks wrote:

> Add initial documentation for the pci-rcar-gen2 driver device tree bindings.
> This is not yet complete and needs work on the sub-nodes for the PCI bus.

    Why do you think there's a need to document PCI devices? They're 
auto-dicoverable and not usually described in .dts[i] files.

> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
> Cc: linux-sh@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Cc: horms+renesas@verge.net.au
> ---
>   Documentation/devicetree/bindings/pci/renessas,pci-r8a7790 | 12 ++++++++++++

    Just "renesas", not "renessas". Also, .txt file extension is always used 
for bindings as much as I could observe.

>   1 file changed, 12 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/pci/renessas,pci-r8a7790

> diff --git a/Documentation/devicetree/bindings/pci/renessas,pci-r8a7790 b/Documentation/devicetree/bindings/pci/renessas,pci-r8a7790
> new file mode 100644
> index 0000000..65268d9
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pci/renessas,pci-r8a7790
> @@ -0,0 +1,12 @@
> +Renesas internal AHB to PCI bridge
> +
> +This is the bridge used internally to connect the USB controllers to the
> +AHB.
> +
> +Required properties:
> + - compatible: "renesas,pci-r8a7790" for the R8A7790 SoC
> + - reg : A list of physical regions to access the device. The first is
> +         the operational registers for the OHCI/EHCI controller and the

    What?! This resource doesn't belong to the bridge itself. Perhaps it's a 
candidate for the "ranges" property.

> +	 second region is for the bridge configuration and control registers.
> + - interrupts : interrupt for the device
> + - clocks : The reference to the device clock
> \ No newline at end of file

    Please add it.

WBR, Sergei


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

* Re: [PATCH 1/6] pci-rcar-gen2: add initial device tree documentation
@ 2014-01-18 19:25     ` Sergei Shtylyov
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Shtylyov @ 2014-01-18 19:25 UTC (permalink / raw)
  To: Ben Dooks, linux-kernel; +Cc: linux-sh, devicetree, horms+renesas

Hello.

On 18-01-2014 19:03, Ben Dooks wrote:

> Add initial documentation for the pci-rcar-gen2 driver device tree bindings.
> This is not yet complete and needs work on the sub-nodes for the PCI bus.

    Why do you think there's a need to document PCI devices? They're 
auto-dicoverable and not usually described in .dts[i] files.

> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
> Cc: linux-sh@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Cc: horms+renesas@verge.net.au
> ---
>   Documentation/devicetree/bindings/pci/renessas,pci-r8a7790 | 12 ++++++++++++

    Just "renesas", not "renessas". Also, .txt file extension is always used 
for bindings as much as I could observe.

>   1 file changed, 12 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/pci/renessas,pci-r8a7790

> diff --git a/Documentation/devicetree/bindings/pci/renessas,pci-r8a7790 b/Documentation/devicetree/bindings/pci/renessas,pci-r8a7790
> new file mode 100644
> index 0000000..65268d9
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pci/renessas,pci-r8a7790
> @@ -0,0 +1,12 @@
> +Renesas internal AHB to PCI bridge
> +
> +This is the bridge used internally to connect the USB controllers to the
> +AHB.
> +
> +Required properties:
> + - compatible: "renesas,pci-r8a7790" for the R8A7790 SoC
> + - reg : A list of physical regions to access the device. The first is
> +         the operational registers for the OHCI/EHCI controller and the

    What?! This resource doesn't belong to the bridge itself. Perhaps it's a 
candidate for the "ranges" property.

> +	 second region is for the bridge configuration and control registers.
> + - interrupts : interrupt for the device
> + - clocks : The reference to the device clock
> \ No newline at end of file

    Please add it.

WBR, Sergei


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

* Re: [PATCH 1/6] pci-rcar-gen2: add initial device tree documentation
  2014-01-18 19:25     ` Sergei Shtylyov
  (?)
@ 2014-01-20 10:43     ` Ben Dooks
  -1 siblings, 0 replies; 21+ messages in thread
From: Ben Dooks @ 2014-01-20 10:43 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linux-kernel, linux-sh, devicetree, horms+renesas

On 18/01/14 19:25, Sergei Shtylyov wrote:
> Hello.
>
> On 18-01-2014 19:03, Ben Dooks wrote:
>
>> Add initial documentation for the pci-rcar-gen2 driver device tree
>> bindings.
>> This is not yet complete and needs work on the sub-nodes for the PCI bus.

>     Why do you think there's a need to document PCI devices? They're
> auto-dicoverable and not usually described in .dts[i] files.

Because the bridge nodes are not auto-discoverable.

>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
>> ---
>> Cc: linux-sh@vger.kernel.org
>> Cc: devicetree@vger.kernel.org
>> Cc: horms+renesas@verge.net.au
>> ---
>>   Documentation/devicetree/bindings/pci/renessas,pci-r8a7790 | 12
>> ++++++++++++
>
>     Just "renesas", not "renessas". Also, .txt file extension is always
> used for bindings as much as I could observe.

Thanks, will fix.

>>   1 file changed, 12 insertions(+)
>>   create mode 100644
>> Documentation/devicetree/bindings/pci/renessas,pci-r8a7790
>
>> diff --git
>> a/Documentation/devicetree/bindings/pci/renessas,pci-r8a7790
>> b/Documentation/devicetree/bindings/pci/renessas,pci-r8a7790
>> new file mode 100644
>> index 0000000..65268d9
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/pci/renessas,pci-r8a7790
>> @@ -0,0 +1,12 @@
>> +Renesas internal AHB to PCI bridge
>> +
>> +This is the bridge used internally to connect the USB controllers to the
>> +AHB.
>> +
>> +Required properties:
>> + - compatible: "renesas,pci-r8a7790" for the R8A7790 SoC
>> + - reg : A list of physical regions to access the device. The first is
>> +         the operational registers for the OHCI/EHCI controller and the
>
>     What?! This resource doesn't belong to the bridge itself. Perhaps
> it's a candidate for the "ranges" property.

Will look into that one.

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

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

* Re: [PATCH 4/6] phy-rcar-usb-gen2: add device tree support
       [not found]   ` <52DAD3B3.1050807@cogentembedded.com>
@ 2014-01-20 10:49     ` Ben Dooks
  2014-01-20 11:19         ` Sergei Shtylyov
  2014-02-27 15:54         ` Sergei Shtylyov
  0 siblings, 2 replies; 21+ messages in thread
From: Ben Dooks @ 2014-01-20 10:49 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-kernel, linux-sh, Magnus Damm, Simon Horman,
	open list:OPEN FIRMWARE AND...

On 18/01/14 19:19, Sergei Shtylyov wrote:
> Hello.
>
> On 18-01-2014 19:03, Ben Dooks wrote:
>
>> Add support for the phy-rcar-gen2-usb driver to be probed from device
>> tree.
>
>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
>> Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
>> ---
>> Cc: linux-usb@vger.kernel.org (open list:USB PHY LAYER)
>> Cc: linux-sh@vger.kernel.org (open list:ARM/SHMOBILE ARM...)
>> Cc: Magnus Damm <magnus.damm@gmail.com> (supporter:ARM/SHMOBILE ARM...)
>> Cc: Simon Horman <horms@verge.net.au> (supporter:ARM/SHMOBILE ARM...)
>> Cc: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND...)
>> ---
>>   drivers/usb/phy/phy-rcar-gen2-usb.c | 35
>> ++++++++++++++++++++++++++++++-----
>>   1 file changed, 30 insertions(+), 5 deletions(-)
>
>> diff --git a/drivers/usb/phy/phy-rcar-gen2-usb.c
>> b/drivers/usb/phy/phy-rcar-gen2-usb.c
>> index db3ab34..906b74b 100644
>> --- a/drivers/usb/phy/phy-rcar-gen2-usb.c
>> +++ b/drivers/usb/phy/phy-rcar-gen2-usb.c
> [...]
>> @@ -177,8 +185,9 @@ static int rcar_gen2_usb_phy_probe(struct
>> platform_device *pdev)
>>       struct clk *clk;
>>       int retval;
>>
>> +    of_id = of_match_device(rcar_gen2_usb_phy_ofmatch, &pdev->dev);
>
>     I don't think another match is needed.
>
>>       pdata = dev_get_platdata(&pdev->dev);
>> -    if (!pdata) {
>> +    if (!pdata && !of_id) {
>>           dev_err(dev, "No platform data\n");
>>           return -EINVAL;
>>       }
>> @@ -203,16 +212,31 @@ static int rcar_gen2_usb_phy_probe(struct
>> platform_device *pdev)
> [...]
>> +    if (of_id) {
>
>     Isn't checking dev->of_node enough?

of_node does not contain the id of the entry matched at start time/

>> +        int len = 0;
>> +
>> +        if (of_get_property(dev->of_node, "renesas,usb0-hs", &len))
>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_HS;
>> +        else
>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_PCI;
>> +
>> +        if (of_get_property(dev->of_node, "renesas,usb2-ss", &len))
>> +            priv->ugctrl2 |= USBHS_UGCTRL2_USB2_SS;
>
>     Where is the bindings file you document these properties in?

Should have been in another patch in the series.


-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

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

* Re: [PATCH 4/6] phy-rcar-usb-gen2: add device tree support
  2014-01-20 10:49     ` Ben Dooks
@ 2014-01-20 11:19         ` Sergei Shtylyov
  2014-02-27 15:54         ` Sergei Shtylyov
  1 sibling, 0 replies; 21+ messages in thread
From: Sergei Shtylyov @ 2014-01-20 11:19 UTC (permalink / raw)
  To: Ben Dooks
  Cc: linux-kernel, linux-sh, Magnus Damm, Simon Horman,
	open list:OPEN FIRMWARE AND...

Hello.

On 20-01-2014 14:49, Ben Dooks wrote:

>>> Add support for the phy-rcar-gen2-usb driver to be probed from device
>>> tree.

>>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
>>> Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
>>> ---
>>> Cc: linux-usb@vger.kernel.org (open list:USB PHY LAYER)
>>> Cc: linux-sh@vger.kernel.org (open list:ARM/SHMOBILE ARM...)
>>> Cc: Magnus Damm <magnus.damm@gmail.com> (supporter:ARM/SHMOBILE ARM...)
>>> Cc: Simon Horman <horms@verge.net.au> (supporter:ARM/SHMOBILE ARM...)
>>> Cc: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND...)
>>> ---
>>>   drivers/usb/phy/phy-rcar-gen2-usb.c | 35
>>> ++++++++++++++++++++++++++++++-----
>>>   1 file changed, 30 insertions(+), 5 deletions(-)

>>> diff --git a/drivers/usb/phy/phy-rcar-gen2-usb.c
>>> b/drivers/usb/phy/phy-rcar-gen2-usb.c
>>> index db3ab34..906b74b 100644
>>> --- a/drivers/usb/phy/phy-rcar-gen2-usb.c
>>> +++ b/drivers/usb/phy/phy-rcar-gen2-usb.c
>> [...]
>>> @@ -177,8 +185,9 @@ static int rcar_gen2_usb_phy_probe(struct
>>> platform_device *pdev)
>>>       struct clk *clk;
>>>       int retval;
>>>
>>> +    of_id = of_match_device(rcar_gen2_usb_phy_ofmatch, &pdev->dev);

>>     I don't think another match is needed.

>>>       pdata = dev_get_platdata(&pdev->dev);
>>> -    if (!pdata) {
>>> +    if (!pdata && !of_id) {
>>>           dev_err(dev, "No platform data\n");
>>>           return -EINVAL;
>>>       }
>>> @@ -203,16 +212,31 @@ static int rcar_gen2_usb_phy_probe(struct
>>> platform_device *pdev)
>> [...]
>>> +    if (of_id) {

>>     Isn't checking dev->of_node enough?

> of_node does not contain the id of the entry matched at start time/

    I don't see where are you necessarily using that entry.

>>> +        int len = 0;
>>> +
>>> +        if (of_get_property(dev->of_node, "renesas,usb0-hs", &len))
>>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_HS;
>>> +        else
>>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_PCI;
>>> +
>>> +        if (of_get_property(dev->of_node, "renesas,usb2-ss", &len))
>>> +            priv->ugctrl2 |= USBHS_UGCTRL2_USB2_SS;

>>     Where is the bindings file you document these properties in?

> Should have been in another patch in the series.

    Hm, I think I saw all 6 patches of the series but no bindings.
Bindings files are typically appended to the patch that adds DT support to a 
driver...

WBR, Sergei


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

* Re: [PATCH 4/6] phy-rcar-usb-gen2: add device tree support
@ 2014-01-20 11:19         ` Sergei Shtylyov
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Shtylyov @ 2014-01-20 11:19 UTC (permalink / raw)
  To: Ben Dooks
  Cc: linux-kernel, linux-sh, Magnus Damm, Simon Horman,
	open list:OPEN FIRMWARE AND...

Hello.

On 20-01-2014 14:49, Ben Dooks wrote:

>>> Add support for the phy-rcar-gen2-usb driver to be probed from device
>>> tree.

>>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
>>> Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
>>> ---
>>> Cc: linux-usb@vger.kernel.org (open list:USB PHY LAYER)
>>> Cc: linux-sh@vger.kernel.org (open list:ARM/SHMOBILE ARM...)
>>> Cc: Magnus Damm <magnus.damm@gmail.com> (supporter:ARM/SHMOBILE ARM...)
>>> Cc: Simon Horman <horms@verge.net.au> (supporter:ARM/SHMOBILE ARM...)
>>> Cc: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND...)
>>> ---
>>>   drivers/usb/phy/phy-rcar-gen2-usb.c | 35
>>> ++++++++++++++++++++++++++++++-----
>>>   1 file changed, 30 insertions(+), 5 deletions(-)

>>> diff --git a/drivers/usb/phy/phy-rcar-gen2-usb.c
>>> b/drivers/usb/phy/phy-rcar-gen2-usb.c
>>> index db3ab34..906b74b 100644
>>> --- a/drivers/usb/phy/phy-rcar-gen2-usb.c
>>> +++ b/drivers/usb/phy/phy-rcar-gen2-usb.c
>> [...]
>>> @@ -177,8 +185,9 @@ static int rcar_gen2_usb_phy_probe(struct
>>> platform_device *pdev)
>>>       struct clk *clk;
>>>       int retval;
>>>
>>> +    of_id = of_match_device(rcar_gen2_usb_phy_ofmatch, &pdev->dev);

>>     I don't think another match is needed.

>>>       pdata = dev_get_platdata(&pdev->dev);
>>> -    if (!pdata) {
>>> +    if (!pdata && !of_id) {
>>>           dev_err(dev, "No platform data\n");
>>>           return -EINVAL;
>>>       }
>>> @@ -203,16 +212,31 @@ static int rcar_gen2_usb_phy_probe(struct
>>> platform_device *pdev)
>> [...]
>>> +    if (of_id) {

>>     Isn't checking dev->of_node enough?

> of_node does not contain the id of the entry matched at start time/

    I don't see where are you necessarily using that entry.

>>> +        int len = 0;
>>> +
>>> +        if (of_get_property(dev->of_node, "renesas,usb0-hs", &len))
>>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_HS;
>>> +        else
>>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_PCI;
>>> +
>>> +        if (of_get_property(dev->of_node, "renesas,usb2-ss", &len))
>>> +            priv->ugctrl2 |= USBHS_UGCTRL2_USB2_SS;

>>     Where is the bindings file you document these properties in?

> Should have been in another patch in the series.

    Hm, I think I saw all 6 patches of the series but no bindings.
Bindings files are typically appended to the patch that adds DT support to a 
driver...

WBR, Sergei


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

* Re: [PATCH 4/6] phy-rcar-usb-gen2: add device tree support
       [not found]   ` <52DD141F.3040704@cogentembedded.com>
@ 2014-01-20 12:24     ` Ben Dooks
  0 siblings, 0 replies; 21+ messages in thread
From: Ben Dooks @ 2014-01-20 12:24 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-kernel, linux-sh, list@codethink.co.uk:USB PHY LAYER,
	Magnus Damm, Simon Horman, devicetree

On 20/01/14 12:18, Sergei Shtylyov wrote:
> Hello.
>
> On 18-01-2014 19:03, Ben Dooks wrote:
>
>> Add support for the phy-rcar-gen2-usb driver to be probed from device
>> tree.
>
>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
>> Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
>> ---
>> Cc: linux-usb@vger.kernel.org (open list:USB PHY LAYER)
>> Cc: linux-sh@vger.kernel.org (open list:ARM/SHMOBILE ARM...)
>> Cc: Magnus Damm <magnus.damm@gmail.com> (supporter:ARM/SHMOBILE ARM...)
>> Cc: Simon Horman <horms@verge.net.au> (supporter:ARM/SHMOBILE ARM...)
>> Cc: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND...)
>> ---
>>   drivers/usb/phy/phy-rcar-gen2-usb.c | 35
>> ++++++++++++++++++++++++++++++-----
>>   1 file changed, 30 insertions(+), 5 deletions(-)
>
>> diff --git a/drivers/usb/phy/phy-rcar-gen2-usb.c
>> b/drivers/usb/phy/phy-rcar-gen2-usb.c
>> index db3ab34..906b74b 100644
>> --- a/drivers/usb/phy/phy-rcar-gen2-usb.c
>> +++ b/drivers/usb/phy/phy-rcar-gen2-usb.c
> [...]
>> @@ -203,16 +212,31 @@ static int rcar_gen2_usb_phy_probe(struct
>> platform_device *pdev)
> [...]
>> +    if (of_id) {
>> +        int len = 0;
>> +
>> +        if (of_get_property(dev->of_node, "renesas,usb0-hs", &len))
>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_HS;
>> +        else
>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_PCI;
>> +
>> +        if (of_get_property(dev->of_node, "renesas,usb2-ss", &len))
>
>     You can use of_property_read_bool() in both cases as both these
> props are boolean I guess. It's more handy.

Thanks, missed that one, will sort that out.


-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

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

* Re: [PATCH 4/6] phy-rcar-usb-gen2: add device tree support
  2014-01-20 10:49     ` Ben Dooks
@ 2014-02-27 15:54         ` Sergei Shtylyov
  2014-02-27 15:54         ` Sergei Shtylyov
  1 sibling, 0 replies; 21+ messages in thread
From: Sergei Shtylyov @ 2014-02-27 15:54 UTC (permalink / raw)
  To: Ben Dooks
  Cc: linux-kernel, linux-sh, Magnus Damm, Simon Horman,
	open list:OPEN FIRMWARE AND...

Hello.

On 20-01-2014 14:49, Ben Dooks wrote:

>>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
>>> Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
>>> ---
>>> Cc: linux-usb@vger.kernel.org (open list:USB PHY LAYER)
>>> Cc: linux-sh@vger.kernel.org (open list:ARM/SHMOBILE ARM...)
>>> Cc: Magnus Damm <magnus.damm@gmail.com> (supporter:ARM/SHMOBILE ARM...)
>>> Cc: Simon Horman <horms@verge.net.au> (supporter:ARM/SHMOBILE ARM...)
>>> Cc: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND...)
>>> ---
>>>   drivers/usb/phy/phy-rcar-gen2-usb.c | 35
>>> ++++++++++++++++++++++++++++++-----
>>>   1 file changed, 30 insertions(+), 5 deletions(-)

>>> diff --git a/drivers/usb/phy/phy-rcar-gen2-usb.c
>>> b/drivers/usb/phy/phy-rcar-gen2-usb.c
>>> index db3ab34..906b74b 100644
>>> --- a/drivers/usb/phy/phy-rcar-gen2-usb.c
>>> +++ b/drivers/usb/phy/phy-rcar-gen2-usb.c
>> [...]
>>> @@ -203,16 +212,31 @@ static int rcar_gen2_usb_phy_probe(struct
>>> platform_device *pdev)
>> [...]
>>> +    if (of_id) {
[...]
>>> +        int len = 0;
>>> +
>>> +        if (of_get_property(dev->of_node, "renesas,usb0-hs", &len))
>>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_HS;
>>> +        else
>>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_PCI;
>>> +
>>> +        if (of_get_property(dev->of_node, "renesas,usb2-ss", &len))
>>> +            priv->ugctrl2 |= USBHS_UGCTRL2_USB2_SS;

>>     Where is the bindings file you document these properties in?

> Should have been in another patch in the series.

    I didn't see it.

WBR, Sergei


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

* Re: [PATCH 4/6] phy-rcar-usb-gen2: add device tree support
@ 2014-02-27 15:54         ` Sergei Shtylyov
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Shtylyov @ 2014-02-27 15:54 UTC (permalink / raw)
  To: Ben Dooks
  Cc: linux-kernel, linux-sh, Magnus Damm, Simon Horman,
	open list:OPEN FIRMWARE AND...

Hello.

On 20-01-2014 14:49, Ben Dooks wrote:

>>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
>>> Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
>>> ---
>>> Cc: linux-usb@vger.kernel.org (open list:USB PHY LAYER)
>>> Cc: linux-sh@vger.kernel.org (open list:ARM/SHMOBILE ARM...)
>>> Cc: Magnus Damm <magnus.damm@gmail.com> (supporter:ARM/SHMOBILE ARM...)
>>> Cc: Simon Horman <horms@verge.net.au> (supporter:ARM/SHMOBILE ARM...)
>>> Cc: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND...)
>>> ---
>>>   drivers/usb/phy/phy-rcar-gen2-usb.c | 35
>>> ++++++++++++++++++++++++++++++-----
>>>   1 file changed, 30 insertions(+), 5 deletions(-)

>>> diff --git a/drivers/usb/phy/phy-rcar-gen2-usb.c
>>> b/drivers/usb/phy/phy-rcar-gen2-usb.c
>>> index db3ab34..906b74b 100644
>>> --- a/drivers/usb/phy/phy-rcar-gen2-usb.c
>>> +++ b/drivers/usb/phy/phy-rcar-gen2-usb.c
>> [...]
>>> @@ -203,16 +212,31 @@ static int rcar_gen2_usb_phy_probe(struct
>>> platform_device *pdev)
>> [...]
>>> +    if (of_id) {
[...]
>>> +        int len = 0;
>>> +
>>> +        if (of_get_property(dev->of_node, "renesas,usb0-hs", &len))
>>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_HS;
>>> +        else
>>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_PCI;
>>> +
>>> +        if (of_get_property(dev->of_node, "renesas,usb2-ss", &len))
>>> +            priv->ugctrl2 |= USBHS_UGCTRL2_USB2_SS;

>>     Where is the bindings file you document these properties in?

> Should have been in another patch in the series.

    I didn't see it.

WBR, Sergei


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

* Re: [PATCH 4/6] phy-rcar-usb-gen2: add device tree support
  2014-02-27 15:54         ` Sergei Shtylyov
  (?)
@ 2014-02-27 16:03         ` Ben Dooks
  2014-02-28  0:03             ` Sergei Shtylyov
  -1 siblings, 1 reply; 21+ messages in thread
From: Ben Dooks @ 2014-02-27 16:03 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-kernel, linux-sh, Magnus Damm, Simon Horman,
	open list:OPEN FIRMWARE AND...

On 27/02/14 15:54, Sergei Shtylyov wrote:
> Hello.
>
> On 20-01-2014 14:49, Ben Dooks wrote:
>
>>>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
>>>> Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
>>>> ---
>>>> Cc: linux-usb@vger.kernel.org (open list:USB PHY LAYER)
>>>> Cc: linux-sh@vger.kernel.org (open list:ARM/SHMOBILE ARM...)
>>>> Cc: Magnus Damm <magnus.damm@gmail.com> (supporter:ARM/SHMOBILE ARM...)
>>>> Cc: Simon Horman <horms@verge.net.au> (supporter:ARM/SHMOBILE ARM...)
>>>> Cc: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND...)
>>>> ---
>>>>   drivers/usb/phy/phy-rcar-gen2-usb.c | 35
>>>> ++++++++++++++++++++++++++++++-----
>>>>   1 file changed, 30 insertions(+), 5 deletions(-)
>
>>>> diff --git a/drivers/usb/phy/phy-rcar-gen2-usb.c
>>>> b/drivers/usb/phy/phy-rcar-gen2-usb.c
>>>> index db3ab34..906b74b 100644
>>>> --- a/drivers/usb/phy/phy-rcar-gen2-usb.c
>>>> +++ b/drivers/usb/phy/phy-rcar-gen2-usb.c
>>> [...]
>>>> @@ -203,16 +212,31 @@ static int rcar_gen2_usb_phy_probe(struct
>>>> platform_device *pdev)
>>> [...]
>>>> +    if (of_id) {
> [...]
>>>> +        int len = 0;
>>>> +
>>>> +        if (of_get_property(dev->of_node, "renesas,usb0-hs", &len))
>>>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_HS;
>>>> +        else
>>>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_PCI;
>>>> +
>>>> +        if (of_get_property(dev->of_node, "renesas,usb2-ss", &len))
>>>> +            priv->ugctrl2 |= USBHS_UGCTRL2_USB2_SS;
>
>>>     Where is the bindings file you document these properties in?
>
>> Should have been in another patch in the series.
>
>     I didn't see it.

I thought it went out, I will need to go check.

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

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

* Re: [PATCH 4/6] phy-rcar-usb-gen2: add device tree support
  2014-02-27 16:03         ` Ben Dooks
@ 2014-02-28  0:03             ` Sergei Shtylyov
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Shtylyov @ 2014-02-27 23:03 UTC (permalink / raw)
  To: Ben Dooks
  Cc: linux-kernel, linux-sh, Magnus Damm, Simon Horman,
	open list:OPEN FIRMWARE AND...

Hello.

On 02/27/2014 07:03 PM, Ben Dooks wrote:

>>>>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
>>>>> Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
>>>>> ---
>>>>> Cc: linux-usb@vger.kernel.org (open list:USB PHY LAYER)
>>>>> Cc: linux-sh@vger.kernel.org (open list:ARM/SHMOBILE ARM...)
>>>>> Cc: Magnus Damm <magnus.damm@gmail.com> (supporter:ARM/SHMOBILE ARM...)
>>>>> Cc: Simon Horman <horms@verge.net.au> (supporter:ARM/SHMOBILE ARM...)
>>>>> Cc: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND...)
>>>>> ---
>>>>>   drivers/usb/phy/phy-rcar-gen2-usb.c | 35
>>>>> ++++++++++++++++++++++++++++++-----
>>>>>   1 file changed, 30 insertions(+), 5 deletions(-)

>>>>> diff --git a/drivers/usb/phy/phy-rcar-gen2-usb.c
>>>>> b/drivers/usb/phy/phy-rcar-gen2-usb.c
>>>>> index db3ab34..906b74b 100644
>>>>> --- a/drivers/usb/phy/phy-rcar-gen2-usb.c
>>>>> +++ b/drivers/usb/phy/phy-rcar-gen2-usb.c
>>>> [...]
>>>>> @@ -203,16 +212,31 @@ static int rcar_gen2_usb_phy_probe(struct
>>>>> platform_device *pdev)
>>>> [...]
>>>>> +    if (of_id) {
>> [...]
>>>>> +        int len = 0;
>>>>> +
>>>>> +        if (of_get_property(dev->of_node, "renesas,usb0-hs", &len))
>>>>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_HS;
>>>>> +        else
>>>>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_PCI;
>>>>> +
>>>>> +        if (of_get_property(dev->of_node, "renesas,usb2-ss", &len))
>>>>> +            priv->ugctrl2 |= USBHS_UGCTRL2_USB2_SS;

>>>>     Where is the bindings file you document these properties in?

>>> Should have been in another patch in the series.

>>     I didn't see it.

> I thought it went out, I will need to go check.

    It turned out that I'd already replied to that email that I had seen all 6 
patches but not the binding patch, so most probably it didn't went out that 
time. I've seen the latter patch (just not posted to linux-usb), so no problem 
here.

WBR, Sergei


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

* Re: [PATCH 4/6] phy-rcar-usb-gen2: add device tree support
@ 2014-02-28  0:03             ` Sergei Shtylyov
  0 siblings, 0 replies; 21+ messages in thread
From: Sergei Shtylyov @ 2014-02-28  0:03 UTC (permalink / raw)
  To: Ben Dooks
  Cc: linux-kernel, linux-sh, Magnus Damm, Simon Horman,
	open list:OPEN FIRMWARE AND...

Hello.

On 02/27/2014 07:03 PM, Ben Dooks wrote:

>>>>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
>>>>> Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
>>>>> ---
>>>>> Cc: linux-usb@vger.kernel.org (open list:USB PHY LAYER)
>>>>> Cc: linux-sh@vger.kernel.org (open list:ARM/SHMOBILE ARM...)
>>>>> Cc: Magnus Damm <magnus.damm@gmail.com> (supporter:ARM/SHMOBILE ARM...)
>>>>> Cc: Simon Horman <horms@verge.net.au> (supporter:ARM/SHMOBILE ARM...)
>>>>> Cc: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND...)
>>>>> ---
>>>>>   drivers/usb/phy/phy-rcar-gen2-usb.c | 35
>>>>> ++++++++++++++++++++++++++++++-----
>>>>>   1 file changed, 30 insertions(+), 5 deletions(-)

>>>>> diff --git a/drivers/usb/phy/phy-rcar-gen2-usb.c
>>>>> b/drivers/usb/phy/phy-rcar-gen2-usb.c
>>>>> index db3ab34..906b74b 100644
>>>>> --- a/drivers/usb/phy/phy-rcar-gen2-usb.c
>>>>> +++ b/drivers/usb/phy/phy-rcar-gen2-usb.c
>>>> [...]
>>>>> @@ -203,16 +212,31 @@ static int rcar_gen2_usb_phy_probe(struct
>>>>> platform_device *pdev)
>>>> [...]
>>>>> +    if (of_id) {
>> [...]
>>>>> +        int len = 0;
>>>>> +
>>>>> +        if (of_get_property(dev->of_node, "renesas,usb0-hs", &len))
>>>>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_HS;
>>>>> +        else
>>>>> +            priv->ugctrl2 = USBHS_UGCTRL2_USB0_PCI;
>>>>> +
>>>>> +        if (of_get_property(dev->of_node, "renesas,usb2-ss", &len))
>>>>> +            priv->ugctrl2 |= USBHS_UGCTRL2_USB2_SS;

>>>>     Where is the bindings file you document these properties in?

>>> Should have been in another patch in the series.

>>     I didn't see it.

> I thought it went out, I will need to go check.

    It turned out that I'd already replied to that email that I had seen all 6 
patches but not the binding patch, so most probably it didn't went out that 
time. I've seen the latter patch (just not posted to linux-usb), so no problem 
here.

WBR, Sergei


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

end of thread, other threads:[~2014-02-28  0:03 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-18 15:03 USB/PCI device-tree updates Ben Dooks
2014-01-18 15:03 ` [PATCH 1/6] pci-rcar-gen2: add initial device tree documentation Ben Dooks
2014-01-18 15:10   ` [PATCH] pci-rcar-gen2: add of match table Ben Dooks
2014-01-18 15:10     ` Ben Dooks
2014-01-18 19:25   ` [PATCH 1/6] pci-rcar-gen2: add initial device tree documentation Sergei Shtylyov
2014-01-18 19:25     ` Sergei Shtylyov
2014-01-20 10:43     ` Ben Dooks
2014-01-18 15:03 ` [PATCH 2/6] ARM: shmbobile: r8a7790.dtsi: add pci0/1/2 nodes Ben Dooks
2014-01-18 15:03 ` [PATCH 3/6] ARM: shmobile: lager.dts: add pci 0/1/2 Ben Dooks
2014-01-18 15:03 ` [PATCH 4/6] phy-rcar-usb-gen2: add device tree support Ben Dooks
     [not found]   ` <52DAD3B3.1050807@cogentembedded.com>
2014-01-20 10:49     ` Ben Dooks
2014-01-20 11:19       ` Sergei Shtylyov
2014-01-20 11:19         ` Sergei Shtylyov
2014-02-27 15:54       ` Sergei Shtylyov
2014-02-27 15:54         ` Sergei Shtylyov
2014-02-27 16:03         ` Ben Dooks
2014-02-27 23:03           ` Sergei Shtylyov
2014-02-28  0:03             ` Sergei Shtylyov
     [not found]   ` <52DD141F.3040704@cogentembedded.com>
2014-01-20 12:24     ` Ben Dooks
2014-01-18 15:03 ` [PATCH 5/6] ARM: shmobile: r8a7790.dtsi: add usbphy node Ben Dooks
2014-01-18 15:03 ` [PATCH 6/6] ARM: shmobile: lager.dtb: add usbphy reference Ben Dooks

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.