diff mbox

[1/1] imx53-qsb: enable usb power

Message ID 20130620212939.018670789@rtp-net.org (mailing list archive)
State New, archived
Headers show

Commit Message

Arnaud Patard (Rtp) June 20, 2013, 9:29 p.m. UTC
Enable usb power pin by using a fixed regulator. With this and the usb clock
patch is making usb working on my loco.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>

Comments

Sascha Hauer June 23, 2013, 6:59 p.m. UTC | #1
On Thu, Jun 20, 2013 at 11:29:30PM +0200, Arnaud Patard wrote:
> Enable usb power pin by using a fixed regulator. With this and the usb clock
> patch is making usb working on my loco.
> 
> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
> Index: linux-next/arch/arm/boot/dts/imx53-qsb.dts
> ===================================================================
> --- linux-next.orig/arch/arm/boot/dts/imx53-qsb.dts	2013-06-20 23:25:46.049428530 +0200
> +++ linux-next/arch/arm/boot/dts/imx53-qsb.dts	2013-06-20 23:26:34.293425920 +0200
> @@ -93,6 +93,15 @@
>  			regulator-max-microvolt = <3200000>;
>  			regulator-always-on;
>  		};
> +
> +		reg_usbpwr: usbpwr {
> +			compatible = "regulator-fixed";
> +			regulator-name = "usbpwr";
> +			regulator-min-microvolt = <5000000>;
> +			regulator-max-microvolt = <5000000>;
> +			gpio = <&gpio7 8 0>;
> +			regulator-always-on;
> +		};

Shouldn't this be provided to the chipidea driver as vbus?

Sascha
Arnaud Patard (Rtp) June 24, 2013, 7:29 a.m. UTC | #2
Sascha Hauer <s.hauer@pengutronix.de> writes:

> On Thu, Jun 20, 2013 at 11:29:30PM +0200, Arnaud Patard wrote:
>> Enable usb power pin by using a fixed regulator. With this and the usb clock
>> patch is making usb working on my loco.
>> 
>> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
>> Index: linux-next/arch/arm/boot/dts/imx53-qsb.dts
>> ===================================================================
>> --- linux-next.orig/arch/arm/boot/dts/imx53-qsb.dts	2013-06-20 23:25:46.049428530 +0200
>> +++ linux-next/arch/arm/boot/dts/imx53-qsb.dts	2013-06-20 23:26:34.293425920 +0200
>> @@ -93,6 +93,15 @@
>>  			regulator-max-microvolt = <3200000>;
>>  			regulator-always-on;
>>  		};
>> +
>> +		reg_usbpwr: usbpwr {
>> +			compatible = "regulator-fixed";
>> +			regulator-name = "usbpwr";
>> +			regulator-min-microvolt = <5000000>;
>> +			regulator-max-microvolt = <5000000>;
>> +			gpio = <&gpio7 8 0>;
>> +			regulator-always-on;
>> +		};
>
> Shouldn't this be provided to the chipidea driver as vbus?

I'm not sure about that. This gpio is controlling the usb power for the
2 usb ports while the vbus is more a port-basis thing.

Arnaud
Fabio Estevam June 24, 2013, 11:52 p.m. UTC | #3
On Thu, Jun 20, 2013 at 6:29 PM, Arnaud Patard
<arnaud.patard@rtp-net.org> wrote:
> Enable usb power pin by using a fixed regulator. With this and the usb clock
> patch is making usb working on my loco.
>
> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>

Could you please test this against linux-next?

It does not work for me:

usbcore: registered new interface driver usb-storage
platform 53f80000.usb: Driver imx_usb requests probe deferral
platform 53f80200.usb: Driver imx_usb requests probe deferral
Fabio Estevam June 25, 2013, 1:40 a.m. UTC | #4
On Mon, Jun 24, 2013 at 8:52 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Thu, Jun 20, 2013 at 6:29 PM, Arnaud Patard
> <arnaud.patard@rtp-net.org> wrote:
>> Enable usb power pin by using a fixed regulator. With this and the usb clock
>> patch is making usb working on my loco.
>>
>> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
>
> Could you please test this against linux-next?
>
> It does not work for me:
>
> usbcore: registered new interface driver usb-storage
> platform 53f80000.usb: Driver imx_usb requests probe deferral
> platform 53f80200.usb: Driver imx_usb requests probe deferral

Ok, got it working now, but had to do two changes:

- Add a vbus-supply node for usbh1 as suggested by Sascha

- Select CONFIG_NOP_USB_XCEIV. Will send a patch to select it by default.
Arnaud Patard (Rtp) June 25, 2013, 5:08 p.m. UTC | #5
Fabio Estevam <festevam@gmail.com> writes:

> On Mon, Jun 24, 2013 at 8:52 PM, Fabio Estevam <festevam@gmail.com> wrote:
>> On Thu, Jun 20, 2013 at 6:29 PM, Arnaud Patard
>> <arnaud.patard@rtp-net.org> wrote:
>>> Enable usb power pin by using a fixed regulator. With this and the usb clock
>>> patch is making usb working on my loco.
>>>
>>> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
>>
>> Could you please test this against linux-next?
>>
>> It does not work for me:
>>
>> usbcore: registered new interface driver usb-storage
>> platform 53f80000.usb: Driver imx_usb requests probe deferral
>> platform 53f80200.usb: Driver imx_usb requests probe deferral
>
> Ok, got it working now, but had to do two changes:
>
> - Add a vbus-supply node for usbh1 as suggested by Sascha

How do you want to proceed ? send a patch on top of mine or send a new
patch containing my patch and this change ? ( I guess that the later
would be easier)

btw, now that it seems that some more stuff has been merged in chipidea
are in next, what about enabling the second port ?

Arnaud
Fabio Estevam June 25, 2013, 5:12 p.m. UTC | #6
On Tue, Jun 25, 2013 at 2:08 PM, Arnaud Patard
<arnaud.patard@rtp-net.org> wrote:

> How do you want to proceed ? send a patch on top of mine or send a new
> patch containing my patch and this change ? ( I guess that the later
> would be easier)

It would be nice if you could send a v2 of your patch adding the
vbus_supply node.
>
> btw, now that it seems that some more stuff has been merged in chipidea
> are in next, what about enabling the second port ?

That would be nice as well, please send a patch for it if you have a chance.
Fabio Estevam July 25, 2013, 12:42 p.m. UTC | #7
On Thu, Jun 20, 2013 at 6:29 PM, Arnaud Patard
<arnaud.patard@rtp-net.org> wrote:
> Enable usb power pin by using a fixed regulator. With this and the usb clock
> patch is making usb working on my loco.

Which "usb clock patch" are you referring to?
diff mbox

Patch

Index: linux-next/arch/arm/boot/dts/imx53-qsb.dts
===================================================================
--- linux-next.orig/arch/arm/boot/dts/imx53-qsb.dts	2013-06-20 23:25:46.049428530 +0200
+++ linux-next/arch/arm/boot/dts/imx53-qsb.dts	2013-06-20 23:26:34.293425920 +0200
@@ -93,6 +93,15 @@ 
 			regulator-max-microvolt = <3200000>;
 			regulator-always-on;
 		};
+
+		reg_usbpwr: usbpwr {
+			compatible = "regulator-fixed";
+			regulator-name = "usbpwr";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			gpio = <&gpio7 8 0>;
+			regulator-always-on;
+		};
 	};
 
 	sound {
@@ -145,6 +154,7 @@ 
 				MX53_PAD_EIM_DA12__GPIO3_12       0x80000000
 				MX53_PAD_EIM_DA13__GPIO3_13       0x80000000
 				MX53_PAD_PATA_DA_0__GPIO7_6       0x80000000
+				MX53_PAD_PATA_DA_2__GPIO7_8	  0x80000000
 				MX53_PAD_GPIO_16__GPIO7_11        0x80000000
 			>;
 		};