devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4] ARM: shmobile: r8a7790: link PCI USB devices to USB PHY
@ 2014-09-29 18:21 Sergei Shtylyov
  2014-09-30  5:24 ` Simon Horman
  2014-09-30 10:08 ` Arnd Bergmann
  0 siblings, 2 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2014-09-29 18:21 UTC (permalink / raw)
  To: horms-/R6kz+dDXgpPR4JQBCEnsQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ
  Cc: magnus.damm-Re5JQEeQqe8AvxtiuMwx3w, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

Describe the PCI USB devices that are behind the PCI bridges, adding necessary
links to the USB PHY device.

Based on the original work by Ben Dooks <ben.dooks-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>

---
This patch is against 'renesas-devel-20140924-v3.17-rc6' tag of Simon Horman's
'renesas.git' repo plus R8A7790/Lager USB PHY support patches posted before.
The patch requires the USB PHY driver and USB HCD generic PHY support (merged
by Kishon and Greg recently) in order to work.

Changes in version 4:
- refreshed the patch.

Changes in version 3:
- adjusted "phys" properties in the PCI OHCI/EHCI device nodes;
- resolved rejects.

Changes in version 2:
- renamed the PCI OHCI/EHCI device nodes to comply with the PCI binding;
- changed the PHY specifier in the PCI#2 node to reflect that channel #1 support
  was dropped;
- resolved rejects, refreshed the patch.

 arch/arm/boot/dts/r8a7790.dtsi |   28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7790.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7790.dtsi
+++ renesas/arch/arm/boot/dts/r8a7790.dtsi
@@ -1107,6 +1107,20 @@
 		interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
 				 0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
 				 0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>;
+
+		usb@0,1 {
+			reg = <0x800 0 0 0 0>;
+			device_type = "pci";
+			phys = <&usb0 0>;
+			phy-names = "usb";
+		};
+
+		usb@0,2 {
+			reg = <0x1000 0 0 0 0>;
+			device_type = "pci";
+			phys = <&usb0 0>;
+			phy-names = "usb";
+		};
 	};
 
 	pci1: pci@ee0b0000 {
@@ -1147,6 +1161,20 @@
 		interrupt-map = <0x0000 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH
 				 0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH
 				 0x1000 0 0 2 &gic 0 113 IRQ_TYPE_LEVEL_HIGH>;
+
+		usb@0,1 {
+			reg = <0x800 0 0 0 0>;
+			device_type = "pci";
+			phys = <&usb2 0>;
+			phy-names = "usb";
+		};
+
+		usb@0,2 {
+			reg = <0x1000 0 0 0 0>;
+			device_type = "pci";
+			phys = <&usb2 0>;
+			phy-names = "usb";
+		};
 	};
 
 	pciec: pcie@fe000000 {

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v4] ARM: shmobile: r8a7790: link PCI USB devices to USB PHY
  2014-09-29 18:21 [PATCH v4] ARM: shmobile: r8a7790: link PCI USB devices to USB PHY Sergei Shtylyov
@ 2014-09-30  5:24 ` Simon Horman
  2014-09-30 10:08 ` Arnd Bergmann
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2014-09-30  5:24 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-sh, devicetree, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, magnus.damm, linux, linux-arm-kernel,
	linux-usb

On Mon, Sep 29, 2014 at 10:21:59PM +0400, Sergei Shtylyov wrote:
> Describe the PCI USB devices that are behind the PCI bridges, adding necessary
> links to the USB PHY device.
> 
> Based on the original work by Ben Dooks <ben.dooks@codethink.co.uk>.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Thanks, I have queued this up.

> 
> ---
> This patch is against 'renesas-devel-20140924-v3.17-rc6' tag of Simon Horman's
> 'renesas.git' repo plus R8A7790/Lager USB PHY support patches posted before.
> The patch requires the USB PHY driver and USB HCD generic PHY support (merged
> by Kishon and Greg recently) in order to work.
> 
> Changes in version 4:
> - refreshed the patch.
> 
> Changes in version 3:
> - adjusted "phys" properties in the PCI OHCI/EHCI device nodes;
> - resolved rejects.
> 
> Changes in version 2:
> - renamed the PCI OHCI/EHCI device nodes to comply with the PCI binding;
> - changed the PHY specifier in the PCI#2 node to reflect that channel #1 support
>   was dropped;
> - resolved rejects, refreshed the patch.
> 
>  arch/arm/boot/dts/r8a7790.dtsi |   28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> Index: renesas/arch/arm/boot/dts/r8a7790.dtsi
> ===================================================================
> --- renesas.orig/arch/arm/boot/dts/r8a7790.dtsi
> +++ renesas/arch/arm/boot/dts/r8a7790.dtsi
> @@ -1107,6 +1107,20 @@
>  		interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
>  				 0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
>  				 0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>;
> +
> +		usb@0,1 {
> +			reg = <0x800 0 0 0 0>;
> +			device_type = "pci";
> +			phys = <&usb0 0>;
> +			phy-names = "usb";
> +		};
> +
> +		usb@0,2 {
> +			reg = <0x1000 0 0 0 0>;
> +			device_type = "pci";
> +			phys = <&usb0 0>;
> +			phy-names = "usb";
> +		};
>  	};
>  
>  	pci1: pci@ee0b0000 {
> @@ -1147,6 +1161,20 @@
>  		interrupt-map = <0x0000 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH
>  				 0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH
>  				 0x1000 0 0 2 &gic 0 113 IRQ_TYPE_LEVEL_HIGH>;
> +
> +		usb@0,1 {
> +			reg = <0x800 0 0 0 0>;
> +			device_type = "pci";
> +			phys = <&usb2 0>;
> +			phy-names = "usb";
> +		};
> +
> +		usb@0,2 {
> +			reg = <0x1000 0 0 0 0>;
> +			device_type = "pci";
> +			phys = <&usb2 0>;
> +			phy-names = "usb";
> +		};
>  	};
>  
>  	pciec: pcie@fe000000 {
> 

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

* Re: [PATCH v4] ARM: shmobile: r8a7790: link PCI USB devices to USB PHY
  2014-09-29 18:21 [PATCH v4] ARM: shmobile: r8a7790: link PCI USB devices to USB PHY Sergei Shtylyov
  2014-09-30  5:24 ` Simon Horman
@ 2014-09-30 10:08 ` Arnd Bergmann
  1 sibling, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2014-09-30 10:08 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Sergei Shtylyov, horms, linux-sh, devicetree, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, linux, linux-usb,
	magnus.damm

On Monday 29 September 2014 22:21:59 Sergei Shtylyov wrote:
> +
> +               usb@0,1 {
> +                       reg = <0x800 0 0 0 0>;
> +                       device_type = "pci";
> +                       phys = <&usb0 0>;
> +                       phy-names = "usb";
> +               };
> +
> +               usb@0,2 {

Nice to see this actually works!

The patch looks good to me, but I wasn't sure if the ARM PCI code handled
of_nodes correctly.

We frequently get people asking for the same functionality on USB device,
which should really work the same way, so I guess I can point them at
this now.

	Arnd

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

end of thread, other threads:[~2014-09-30 10:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-29 18:21 [PATCH v4] ARM: shmobile: r8a7790: link PCI USB devices to USB PHY Sergei Shtylyov
2014-09-30  5:24 ` Simon Horman
2014-09-30 10:08 ` Arnd Bergmann

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