diff mbox

[v3,2/3] ARM: shmobile: koelsch: enable HS-USB

Message ID 8674731.7YYzQeH0h1@wasted.cogentembedded.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sergei Shtylyov Oct. 8, 2014, 6:02 p.m. UTC
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Enable HS-USB device for the Koelsch board, defining the GPIO that the driver
should check when probing (which is the ID output from MAX3355 OTG chip).

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,
added changelog]
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
Changes in version 3:
- added pinctrl-related properties;
- moved the HS-USB node to precede the USB PHY node;
- uppercased "arm" in the summary;
- added changelog.

 arch/arm/boot/dts/r8a7791-koelsch.dts |    7 +++++++
 1 file changed, 7 insertions(+)

Comments

Felipe Balbi Oct. 8, 2014, 6:05 p.m. UTC | #1
On Wed, Oct 08, 2014 at 10:02:44PM +0400, Sergei Shtylyov wrote:
> From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> 
> Enable HS-USB device for the Koelsch board, defining the GPIO that the driver
> should check when probing (which is the ID output from MAX3355 OTG chip).
> 
> 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,
> added changelog]
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> ---
> Changes in version 3:
> - added pinctrl-related properties;

did you miss pinctrl here ?
Sergei Shtylyov Oct. 8, 2014, 6:07 p.m. UTC | #2
Hello.

On 10/08/2014 10:05 PM, Felipe Balbi wrote:

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

>> Enable HS-USB device for the Koelsch board, defining the GPIO that the driver
>> should check when probing (which is the ID output from MAX3355 OTG chip).

>> 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,
>> added changelog]
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

>> ---
>> Changes in version 3:
>> - added pinctrl-related properties;

> did you miss pinctrl here ?

     No, AFAICS. Or what do you mean?

WBR, Sergei
Felipe Balbi Oct. 8, 2014, 6:08 p.m. UTC | #3
On Wed, Oct 08, 2014 at 10:07:50PM +0400, Sergei Shtylyov wrote:
> Hello.
> 
> On 10/08/2014 10:05 PM, Felipe Balbi wrote:
> 
> >>From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> 
> >>Enable HS-USB device for the Koelsch board, defining the GPIO that the driver
> >>should check when probing (which is the ID output from MAX3355 OTG chip).
> 
> >>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,
> >>added changelog]
> >>Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> >>---
> >>Changes in version 3:
> >>- added pinctrl-related properties;
> 
> >did you miss pinctrl here ?
> 
>     No, AFAICS. Or what do you mean?

usb0_pins doesn't appear to be defined anywhere.
Sergei Shtylyov Oct. 8, 2014, 6:11 p.m. UTC | #4
On 10/08/2014 10:08 PM, Felipe Balbi wrote:

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

>>>> Enable HS-USB device for the Koelsch board, defining the GPIO that the driver
>>>> should check when probing (which is the ID output from MAX3355 OTG chip).

>>>> 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,
>>>> added changelog]
>>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

>>>> ---
>>>> Changes in version 3:
>>>> - added pinctrl-related properties;

>>> did you miss pinctrl here ?

>>      No, AFAICS. Or what do you mean?

> usb0_pins doesn't appear to be defined anywhere.

    They are defined in the same file, just not in this patch. If you're 
looking at some of the USB trees or Linus' tree, the corresponding patch just 
hasn't hit them yet, it's in renesas.git ATM.

WBR, Sergei
Felipe Balbi Oct. 8, 2014, 6:22 p.m. UTC | #5
On Wed, Oct 08, 2014 at 10:11:59PM +0400, Sergei Shtylyov wrote:
> On 10/08/2014 10:08 PM, Felipe Balbi wrote:
> 
> >>>>From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> 
> >>>>Enable HS-USB device for the Koelsch board, defining the GPIO that the driver
> >>>>should check when probing (which is the ID output from MAX3355 OTG chip).
> 
> >>>>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,
> >>>>added changelog]
> >>>>Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> >>>>---
> >>>>Changes in version 3:
> >>>>- added pinctrl-related properties;
> 
> >>>did you miss pinctrl here ?
> 
> >>     No, AFAICS. Or what do you mean?
> 
> >usb0_pins doesn't appear to be defined anywhere.
> 
>    They are defined in the same file, just not in this patch. If you're
> looking at some of the USB trees or Linus' tree, the corresponding patch
> just hasn't hit them yet, it's in renesas.git ATM.

oh, alright then. :-)

cheers
Yoshihiro Shimoda Oct. 9, 2014, 1:07 a.m. UTC | #6
Hello.

(2014/10/09 3:02), Sergei Shtylyov wrote:
> From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> 
> Enable HS-USB device for the Koelsch board, defining the GPIO that the driver
> should check when probing (which is the ID output from MAX3355 OTG chip).
> 
> 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,
> added changelog]
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> ---
> Changes in version 3:
> - added pinctrl-related properties;
> - moved the HS-USB node to precede the USB PHY node;
> - uppercased "arm" in the summary;
> - added changelog.
> 
>  arch/arm/boot/dts/r8a7791-koelsch.dts |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> Index: renesas/arch/arm/boot/dts/r8a7791-koelsch.dts
> ===================================================================
> --- renesas.orig/arch/arm/boot/dts/r8a7791-koelsch.dts
> +++ renesas/arch/arm/boot/dts/r8a7791-koelsch.dts
> @@ -464,6 +464,13 @@
>  	pinctrl-names = "default";
>  };
>  
> +&hsusb {
> +	status = "okay";
> +	pinctrl-0 = <&usb0_pins>;
> +	pinctrl-names = "default";

Perhaps I don't understand the pinctrl world yet, but I have a question.

In r8a7791, the USB0_PWEN is GP7_23 and the USB0_OVC is GP7_24. And,
the "usb0_pins" is related to these USB0 pins. But, as you know,
the koelsch has a OTG ID pin and it connects to GP5_31 via MAX3355 chip.
So, would you tell me why koelsch needs the pinctrl?

Best regards,
Yoshihiro Shimoda

> +	renesas,enable-gpio = <&gpio5 31 GPIO_ACTIVE_HIGH>;
> +};
> +
>  &usbphy {
>  	status = "okay";
>  };
>
Sergei Shtylyov Oct. 9, 2014, 12:51 p.m. UTC | #7
Hello.

On 10/09/2014 05:07 AM, Yoshihiro Shimoda wrote:

>> Enable HS-USB device for the Koelsch board, defining the GPIO that the driver
>> should check when probing (which is the ID output from MAX3355 OTG chip).

>> 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,
>> added changelog]
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

>> ---
>> Changes in version 3:
>> - added pinctrl-related properties;
>> - moved the HS-USB node to precede the USB PHY node;
>> - uppercased "arm" in the summary;
>> - added changelog.

>>   arch/arm/boot/dts/r8a7791-koelsch.dts |    7 +++++++
>>   1 file changed, 7 insertions(+)

>> Index: renesas/arch/arm/boot/dts/r8a7791-koelsch.dts
>> ===================================================================
>> --- renesas.orig/arch/arm/boot/dts/r8a7791-koelsch.dts
>> +++ renesas/arch/arm/boot/dts/r8a7791-koelsch.dts
>> @@ -464,6 +464,13 @@
>>   	pinctrl-names = "default";
>>   };
>>
>> +&hsusb {
>> +	status = "okay";
>> +	pinctrl-0 = <&usb0_pins>;
>> +	pinctrl-names = "default";

> Perhaps I don't understand the pinctrl world yet, but I have a question.

> In r8a7791, the USB0_PWEN is GP7_23 and the USB0_OVC is GP7_24. And,
> the "usb0_pins" is related to these USB0 pins. But, as you know,
> the koelsch has a OTG ID pin and it connects to GP5_31 via MAX3355 chip.

    The GPIO pins are not requested via pinctrl.

> So, would you tell me why koelsch needs the pinctrl?

    Because at least USB0_OVC/VBUS is used by HS-USB. I decided not to modify 
the R8A7791 PFC driver in order to create a group consisting of that signal 
alone (like on R8A7790), because we don't need to read GP7_23 on these boards, 
unlike Lager.

> Best regards,
> Yoshihiro Shimoda

WBR, Sergei
Yoshihiro Shimoda Oct. 10, 2014, 12:17 a.m. UTC | #8
Hello.

(2014/10/09 21:51), Sergei Shtylyov wrote:
> Hello.
> 
> On 10/09/2014 05:07 AM, Yoshihiro Shimoda wrote:
> 
>>> Enable HS-USB device for the Koelsch board, defining the GPIO that the driver
>>> should check when probing (which is the ID output from MAX3355 OTG chip).
> 
>>> 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,
>>> added changelog]
>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
>>> ---
>>> Changes in version 3:
>>> - added pinctrl-related properties;
>>> - moved the HS-USB node to precede the USB PHY node;
>>> - uppercased "arm" in the summary;
>>> - added changelog.
> 
>>>   arch/arm/boot/dts/r8a7791-koelsch.dts |    7 +++++++
>>>   1 file changed, 7 insertions(+)
> 
>>> Index: renesas/arch/arm/boot/dts/r8a7791-koelsch.dts
>>> ===================================================================
>>> --- renesas.orig/arch/arm/boot/dts/r8a7791-koelsch.dts
>>> +++ renesas/arch/arm/boot/dts/r8a7791-koelsch.dts
>>> @@ -464,6 +464,13 @@
>>>       pinctrl-names = "default";
>>>   };
>>>
>>> +&hsusb {
>>> +    status = "okay";
>>> +    pinctrl-0 = <&usb0_pins>;
>>> +    pinctrl-names = "default";
> 
>> Perhaps I don't understand the pinctrl world yet, but I have a question.
> 
>> In r8a7791, the USB0_PWEN is GP7_23 and the USB0_OVC is GP7_24. And,
>> the "usb0_pins" is related to these USB0 pins. But, as you know,
>> the koelsch has a OTG ID pin and it connects to GP5_31 via MAX3355 chip.
> 
>    The GPIO pins are not requested via pinctrl.
> 
>> So, would you tell me why koelsch needs the pinctrl?
> 
>    Because at least USB0_OVC/VBUS is used by HS-USB. I decided not to modify the R8A7791 PFC driver in order to create a group consisting of that signal alone (like on R8A7790), because we don't need to read GP7_23 on these boards, unlike Lager.

Thank you very much for the reply.
Finally I understood why it needs the princtrl.
(I didn't know the HS-USB will use the USB0_OVC/VBUS for detecting VBUS...)

Best regards,
Yoshihiro Shimoda

>> Best regards,
>> Yoshihiro Shimoda
> 
> WBR, Sergei
>
diff mbox

Patch

Index: renesas/arch/arm/boot/dts/r8a7791-koelsch.dts
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7791-koelsch.dts
+++ renesas/arch/arm/boot/dts/r8a7791-koelsch.dts
@@ -464,6 +464,13 @@ 
 	pinctrl-names = "default";
 };
 
+&hsusb {
+	status = "okay";
+	pinctrl-0 = <&usb0_pins>;
+	pinctrl-names = "default";
+	renesas,enable-gpio = <&gpio5 31 GPIO_ACTIVE_HIGH>;
+};
+
 &usbphy {
 	status = "okay";
 };