devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Add HS-USB device tree support for R8A7790/Lager board
@ 2014-10-07 20:19 Sergei Shtylyov
       [not found] ` <2438577.UAUDMkTTWI-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
  2014-10-07 20:26 ` [PATCH v3 2/2] ARM: shmobile: lager: enable HS-USB Sergei Shtylyov
  0 siblings, 2 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2014-10-07 20:19 UTC (permalink / raw)
  To: horms-/R6kz+dDXgpPR4JQBCEnsQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
	mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: magnus.damm-Re5JQEeQqe8AvxtiuMwx3w, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

Hello.

   Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20141007-v3.17' tag. Here we add the HS-USB device tree support
on the R8A7790/Lager reference board. The patchset requires the USB PHY
driver (already merged by Kishon and Greg) and the generic PHY support patches
for the HS-USB driver posted by Yoshihiro Shimoda in order to work...

[1/2] ARM: shmobile: r8a7790: add HS-USB device node
[2/2] ARM: shmobile: lager: enable HS-USB

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] 6+ messages in thread

* [PATCH v3 1/2] ARM: shmobile: r8a7790: add HS-USB device node
       [not found] ` <2438577.UAUDMkTTWI-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
@ 2014-10-07 20:23   ` Sergei Shtylyov
  0 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2014-10-07 20:23 UTC (permalink / raw)
  To: horms-/R6kz+dDXgpPR4JQBCEnsQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
	mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: magnus.damm-Re5JQEeQqe8AvxtiuMwx3w, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ

From: Yoshihiro Shimoda <yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>

Define the R8A7790 generic part of the HS-USB device node. It is up to the board
file to enable the device.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
[Sergei: fixed summary, added changelog]
Signed-off-by: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>

---
Changes in version 3:
- uppercased "arm" in the summary;
- added changelog.

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

Index: renesas/arch/arm/boot/dts/r8a7790.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7790.dtsi
+++ renesas/arch/arm/boot/dts/r8a7790.dtsi
@@ -600,6 +600,17 @@
 		status = "disabled";
 	};
 
+	hsusb: usb@e6590000 {
+		compatible = "renesas,usbhs-r8a7790";
+		reg = <0 0xe6590000 0 0x100>;
+		interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp7_clks R8A7790_CLK_HSUSB>;
+		renesas,buswait = <4>;
+		phys = <&usb0 1>;
+		phy-names = "usb";
+		status = "disabled";
+	};
+
 	usbphy: usb-phy@e6590100 {
 		compatible = "renesas,usb-phy-r8a7790";
 		reg = <0 0xe6590100 0 0x100>;

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] 6+ messages in thread

* [PATCH v3 2/2] ARM: shmobile: lager: enable HS-USB
  2014-10-07 20:19 [PATCH v3 0/2] Add HS-USB device tree support for R8A7790/Lager board Sergei Shtylyov
       [not found] ` <2438577.UAUDMkTTWI-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
@ 2014-10-07 20:26 ` Sergei Shtylyov
       [not found]   ` <2298118.7qjLAFjuvd-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
  2014-10-08  4:51   ` Yoshihiro Shimoda
  1 sibling, 2 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2014-10-07 20:26 UTC (permalink / raw)
  To: horms, linux-sh, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree
  Cc: magnus.damm, linux, linux-arm-kernel, linux-usb,
	yoshihiro.shimoda.uh

From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Enable HS-USB device for the Lager board, defining the GPIO that the driver
should check when probing. Since this board doesn't have the OTG ID pin, we
assume that GP5_18 (USB0_PWEN) is an ID pin because it is 1 when the SW5 is
in position 2-3 (meaning USB function) and 0 in other positions.

Note that there will be pinctrl-related error messages if both internal PCI
and HS-USB drivers are enabled but they should be just ignored.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
[Sergei: added pin function/group and prop, moved device node, fixed summary,
supplemented changelog]
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
Changes in version 3:
- added pin function/group and the pinctrl-related prop;
- moved the HS-USB node to precede the USB PHY node;
- uppercased "arm" in the summary;
- supplemented changelog.

 arch/arm/boot/dts/r8a7790-lager.dts |   12 ++++++++++++
 1 file changed, 12 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7790-lager.dts
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7790-lager.dts
+++ renesas/arch/arm/boot/dts/r8a7790-lager.dts
@@ -226,6 +226,11 @@
 		renesas,function = "usb0";
 	};
 
+	hsusb_pins: usb0 {
+		renesas,groups = "usb0_ovc_vbus";
+		renesas,function = "usb0";
+	};
+
 	usb1_pins: usb1 {
 		renesas,groups = "usb1";
 		renesas,function = "usb1";
@@ -425,6 +430,13 @@
 	pinctrl-names = "default";
 };
 
+&hsusb {
+	status = "okay";
+	pinctrl-0 = <&hsusb_pins>;
+	pinctrl-names = "default";
+	renesas,enable-gpio = <&gpio5 18 GPIO_ACTIVE_HIGH>;
+};
+
 &usbphy {
 	status = "okay";
 };


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

* Re: [PATCH v3 2/2] ARM: shmobile: lager: enable HS-USB
       [not found]   ` <2298118.7qjLAFjuvd-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
@ 2014-10-07 21:00     ` Sergei Shtylyov
  0 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2014-10-07 21:00 UTC (permalink / raw)
  To: horms-/R6kz+dDXgpPR4JQBCEnsQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
	mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: magnus.damm-Re5JQEeQqe8AvxtiuMwx3w, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ

On 10/08/2014 12:26 AM, Sergei Shtylyov wrote:

> From: Yoshihiro Shimoda <yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>

> Enable HS-USB device for the Lager board, defining the GPIO that the driver
> should check when probing. Since this board doesn't have the OTG ID pin, we
> assume that GP5_18 (USB0_PWEN) is an ID pin because it is 1 when the SW5 is
> in position 2-3 (meaning USB function) and 0 in other positions.

> Note that there will be pinctrl-related error messages if both internal PCI
> and HS-USB drivers are enabled but they should be just ignored.

> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
> [Sergei: added pin function/group and prop, moved device node, fixed summary,
> supplemented changelog]
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>

> ---
> Changes in version 3:
> - added pin function/group and the pinctrl-related prop;
> - moved the HS-USB node to precede the USB PHY node;
> - uppercased "arm" in the summary;
> - supplemented changelog.

>   arch/arm/boot/dts/r8a7790-lager.dts |   12 ++++++++++++
>   1 file changed, 12 insertions(+)

> Index: renesas/arch/arm/boot/dts/r8a7790-lager.dts
> ===================================================================
> --- renesas.orig/arch/arm/boot/dts/r8a7790-lager.dts
> +++ renesas/arch/arm/boot/dts/r8a7790-lager.dts
> @@ -226,6 +226,11 @@
>   		renesas,function = "usb0";
>   	};
>
> +	hsusb_pins: usb0 {

    Oops, forgot to rename the node. :-/ Although dtc didn't protest.

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] 6+ messages in thread

* Re: [PATCH v3 2/2] ARM: shmobile: lager: enable HS-USB
  2014-10-07 20:26 ` [PATCH v3 2/2] ARM: shmobile: lager: enable HS-USB Sergei Shtylyov
       [not found]   ` <2298118.7qjLAFjuvd-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
@ 2014-10-08  4:51   ` Yoshihiro Shimoda
  2014-10-08 10:36     ` Sergei Shtylyov
  1 sibling, 1 reply; 6+ messages in thread
From: Yoshihiro Shimoda @ 2014-10-08  4:51 UTC (permalink / raw)
  To: Sergei Shtylyov, horms@verge.net.au, linux-sh@vger.kernel.org,
	robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
	devicetree@vger.kernel.org
  Cc: magnus.damm@gmail.com, linux@arm.linux.org.uk,
	linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org

Hello.

(2014/10/08 5:26), Sergei Shtylyov wrote:
> From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> 
> Enable HS-USB device for the Lager board, defining the GPIO that the driver
> should check when probing. Since this board doesn't have the OTG ID pin, we
> assume that GP5_18 (USB0_PWEN) is an ID pin because it is 1 when the SW5 is
> in position 2-3 (meaning USB function) and 0 in other positions.
> 
< snip >
> Index: renesas/arch/arm/boot/dts/r8a7790-lager.dts
> ===================================================================
> --- renesas.orig/arch/arm/boot/dts/r8a7790-lager.dts
> +++ renesas/arch/arm/boot/dts/r8a7790-lager.dts
> @@ -226,6 +226,11 @@
>  		renesas,function = "usb0";
>  	};
>  
> +	hsusb_pins: usb0 {
> +		renesas,groups = "usb0_ovc_vbus";

Thank you for the v3 patch.
I tested this, and kernel log said "GP_5_19 already requested".
However, the hsusb on lager uses GP_5_18. Is this correct behavior?

sh-pfc e6060000.pfc: pin GP_5_19 already requested by ee090000.pci; cannot claim for e6590000.usb
sh-pfc e6060000.pfc: pin-179 (e6590000.usb) status -22
sh-pfc e6060000.pfc: could not request pin 179 (GP_5_19) from group usb0_ovc_vbus  on device sh-pfc

Best regards,
Yoshihiro Shimoda

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

* Re: [PATCH v3 2/2] ARM: shmobile: lager: enable HS-USB
  2014-10-08  4:51   ` Yoshihiro Shimoda
@ 2014-10-08 10:36     ` Sergei Shtylyov
  0 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2014-10-08 10:36 UTC (permalink / raw)
  To: Yoshihiro Shimoda, horms@verge.net.au, linux-sh@vger.kernel.org,
	robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
	devicetree@vger.kernel.org
  Cc: magnus.damm@gmail.com, linux@arm.linux.org.uk,
	linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org

On 10/8/2014 8:51 AM, Yoshihiro Shimoda wrote:

>> Enable HS-USB device for the Lager board, defining the GPIO that the driver
>> should check when probing. Since this board doesn't have the OTG ID pin, we
>> assume that GP5_18 (USB0_PWEN) is an ID pin because it is 1 when the SW5 is
>> in position 2-3 (meaning USB function) and 0 in other positions.

> < snip >
>> Index: renesas/arch/arm/boot/dts/r8a7790-lager.dts
>> ===================================================================
>> --- renesas.orig/arch/arm/boot/dts/r8a7790-lager.dts
>> +++ renesas/arch/arm/boot/dts/r8a7790-lager.dts
>> @@ -226,6 +226,11 @@
>>   		renesas,function = "usb0";
>>   	};
>>
>> +	hsusb_pins: usb0 {
>> +		renesas,groups = "usb0_ovc_vbus";
>
> Thank you for the v3 patch.
> I tested this, and kernel log said "GP_5_19 already requested".

    GP5_19 is also USB0_OVC_VBUS. It's used by PCI [EO]HCI.

> However, the hsusb on lager uses GP_5_18. Is this correct behavior?

    Yes, this error needs to be ignored (I wrote about that in the changelog 
but you cut out that part). If you disable the internal PCI driver, this error 
will disappear.

> sh-pfc e6060000.pfc: pin GP_5_19 already requested by ee090000.pci; cannot claim for e6590000.usb
> sh-pfc e6060000.pfc: pin-179 (e6590000.usb) status -22
> sh-pfc e6060000.pfc: could not request pin 179 (GP_5_19) from group usb0_ovc_vbus  on device sh-pfc

    The kernel log already tells you well about the source of error.

> Best regards,
> Yoshihiro Shimoda

WBR, Sergei


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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-07 20:19 [PATCH v3 0/2] Add HS-USB device tree support for R8A7790/Lager board Sergei Shtylyov
     [not found] ` <2438577.UAUDMkTTWI-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
2014-10-07 20:23   ` [PATCH v3 1/2] ARM: shmobile: r8a7790: add HS-USB device node Sergei Shtylyov
2014-10-07 20:26 ` [PATCH v3 2/2] ARM: shmobile: lager: enable HS-USB Sergei Shtylyov
     [not found]   ` <2298118.7qjLAFjuvd-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
2014-10-07 21:00     ` Sergei Shtylyov
2014-10-08  4:51   ` Yoshihiro Shimoda
2014-10-08 10:36     ` Sergei Shtylyov

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