diff mbox

[3/3] arm: koelsch: make USB0 perform Host/Function switching

Message ID 1434984151-27274-4-git-send-email-phil.edworthy@renesas.com (mailing list archive)
State Changes Requested
Headers show

Commit Message

Phil Edworthy June 22, 2015, 2:42 p.m. UTC
Both USB Host (pci0) and Function (USBHS) drivers are enabled.
The USB PHY driver determines which IP block should be connected
based on vbus and id signals read via gpios.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
---
 arch/arm/boot/dts/r8a7791-koelsch.dts | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Sergei Shtylyov June 22, 2015, 5:43 p.m. UTC | #1
Hello.

On 06/22/2015 05:42 PM, Phil Edworthy wrote:

> Both USB Host (pci0) and Function (USBHS) drivers are enabled.
> The USB PHY driver determines which IP block should be connected
> based on vbus and id signals read via gpios.

> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> ---
>   arch/arm/boot/dts/r8a7791-koelsch.dts | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
> index cffe33f..8f394be 100644
> --- a/arch/arm/boot/dts/r8a7791-koelsch.dts
> +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
[...]
> @@ -627,13 +626,15 @@
>
>   &hsusb {
>   	status = "okay";
> -	pinctrl-0 = <&usb0_pins>;
>   	pinctrl-names = "default";
> -	renesas,enable-gpio = <&gpio5 31 GPIO_ACTIVE_HIGH>;
>   };
>
>   &usbphy {
>   	status = "okay";
> +	renesas,pwr = <&gpio2 4 GPIO_ACTIVE_HIGH>;
> +	renesas,id = <&gpio5 31 GPIO_ACTIVE_HIGH>;
> +	renesas,vbus = <&gpio7 24 GPIO_ACTIVE_HIGH>;
> +	renesas,vbus-pwr = <&gpio7 23 GPIO_ACTIVE_HIGH>;

    The prop names should end with "-gpio" or even "-gpios", according to the 
GPIO bindings.

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
Sergei Shtylyov June 22, 2015, 5:49 p.m. UTC | #2
Hello.

On 06/22/2015 08:43 PM, Sergei Shtylyov wrote:

>> Both USB Host (pci0) and Function (USBHS) drivers are enabled.
>> The USB PHY driver determines which IP block should be connected
>> based on vbus and id signals read via gpios.

>> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
>> ---
>>   arch/arm/boot/dts/r8a7791-koelsch.dts | 7 ++++---
>>   1 file changed, 4 insertions(+), 3 deletions(-)

>> diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts
>> b/arch/arm/boot/dts/r8a7791-koelsch.dts
>> index cffe33f..8f394be 100644
>> --- a/arch/arm/boot/dts/r8a7791-koelsch.dts
>> +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
> [...]
>> @@ -627,13 +626,15 @@
>>
>>   &hsusb {
>>       status = "okay";
>> -    pinctrl-0 = <&usb0_pins>;
>>       pinctrl-names = "default";
>> -    renesas,enable-gpio = <&gpio5 31 GPIO_ACTIVE_HIGH>;
>>   };
>>
>>   &usbphy {
>>       status = "okay";
>> +    renesas,pwr = <&gpio2 4 GPIO_ACTIVE_HIGH>;
>> +    renesas,id = <&gpio5 31 GPIO_ACTIVE_HIGH>;
>> +    renesas,vbus = <&gpio7 24 GPIO_ACTIVE_HIGH>;
>> +    renesas,vbus-pwr = <&gpio7 23 GPIO_ACTIVE_HIGH>;

>     The prop names should end with "-gpio" or even "-gpios", according to the
> GPIO bindings.

    Oh, and you didn't document the props in the previous patch.

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
Phil Edworthy July 1, 2015, 3:10 p.m. UTC | #3
Hi Sergei,

On 22 June 2015 18:49, Sergei wrote:
> Hello.
> 
> On 06/22/2015 08:43 PM, Sergei Shtylyov wrote:
> 
> >> Both USB Host (pci0) and Function (USBHS) drivers are enabled.
> >> The USB PHY driver determines which IP block should be connected
> >> based on vbus and id signals read via gpios.
> 
> >> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> >> ---
> >>   arch/arm/boot/dts/r8a7791-koelsch.dts | 7 ++++---
> >>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> >> diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts
> >> b/arch/arm/boot/dts/r8a7791-koelsch.dts
> >> index cffe33f..8f394be 100644
> >> --- a/arch/arm/boot/dts/r8a7791-koelsch.dts
> >> +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
> > [...]
> >> @@ -627,13 +626,15 @@
> >>
> >>   &hsusb {
> >>       status = "okay";
> >> -    pinctrl-0 = <&usb0_pins>;
> >>       pinctrl-names = "default";
> >> -    renesas,enable-gpio = <&gpio5 31 GPIO_ACTIVE_HIGH>;
> >>   };
> >>
> >>   &usbphy {
> >>       status = "okay";
> >> +    renesas,pwr = <&gpio2 4 GPIO_ACTIVE_HIGH>;
> >> +    renesas,id = <&gpio5 31 GPIO_ACTIVE_HIGH>;
> >> +    renesas,vbus = <&gpio7 24 GPIO_ACTIVE_HIGH>;
> >> +    renesas,vbus-pwr = <&gpio7 23 GPIO_ACTIVE_HIGH>;
> 
> >     The prop names should end with "-gpio" or even "-gpios", according to the
> > GPIO bindings.
> 
>     Oh, and you didn't document the props in the previous patch.
> 
Thanks for your comments, since I've not seen any other comments I'll fix
these and repost.

Phil
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
index cffe33f..8f394be 100644
--- a/arch/arm/boot/dts/r8a7791-koelsch.dts
+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
@@ -615,7 +615,6 @@ 
 
 &pci0 {
 	status = "okay";
-	pinctrl-0 = <&usb0_pins>;
 	pinctrl-names = "default";
 };
 
@@ -627,13 +626,15 @@ 
 
 &hsusb {
 	status = "okay";
-	pinctrl-0 = <&usb0_pins>;
 	pinctrl-names = "default";
-	renesas,enable-gpio = <&gpio5 31 GPIO_ACTIVE_HIGH>;
 };
 
 &usbphy {
 	status = "okay";
+	renesas,pwr = <&gpio2 4 GPIO_ACTIVE_HIGH>;
+	renesas,id = <&gpio5 31 GPIO_ACTIVE_HIGH>;
+	renesas,vbus = <&gpio7 24 GPIO_ACTIVE_HIGH>;
+	renesas,vbus-pwr = <&gpio7 23 GPIO_ACTIVE_HIGH>;
 };
 
 &pcie_bus_clk {