All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ARM: dts: sunxi: Enable otg on more boards
@ 2015-06-20 15:40 ` Hans de Goede
  0 siblings, 0 replies; 24+ messages in thread
From: Hans de Goede @ 2015-06-20 15:40 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

Hi Maxime,

Here is a dts series with 1 fix + 3 patches enabling otg on more boards,
this applies on top of my previous dts otg work.

Regards,

Hans

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

* [PATCH 0/4] ARM: dts: sunxi: Enable otg on more boards
@ 2015-06-20 15:40 ` Hans de Goede
  0 siblings, 0 replies; 24+ messages in thread
From: Hans de Goede @ 2015-06-20 15:40 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Maxime,

Here is a dts series with 1 fix + 3 patches enabling otg on more boards,
this applies on top of my previous dts otg work.

Regards,

Hans

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

* [PATCH 1/4] ARM: dts: sunxi: Add regulator-boot-on to usb host port regulator nodes
  2015-06-20 15:40 ` Hans de Goede
@ 2015-06-20 15:40     ` Hans de Goede
  -1 siblings, 0 replies; 24+ messages in thread
From: Hans de Goede @ 2015-06-20 15:40 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

u-boot will have turned on the power to the usb host ports, so mark them
as regulator-boot-on, this stops the power on the ports from temporarily
getting turned off during boot, causing issues with e.g. usb powered
harddisks.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sunxi-common-regulators.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/sunxi-common-regulators.dtsi b/arch/arm/boot/dts/sunxi-common-regulators.dtsi
index 51cc838..f1953b0 100644
--- a/arch/arm/boot/dts/sunxi-common-regulators.dtsi
+++ b/arch/arm/boot/dts/sunxi-common-regulators.dtsi
@@ -108,6 +108,7 @@
 		regulator-name = "usb1-vbus";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
+		regulator-boot-on;
 		enable-active-high;
 		gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>;
 		status = "disabled";
@@ -120,6 +121,7 @@
 		regulator-name = "usb2-vbus";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
+		regulator-boot-on;
 		enable-active-high;
 		gpio = <&pio 7 3 GPIO_ACTIVE_HIGH>;
 		status = "disabled";
-- 
2.4.3

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

* [PATCH 1/4] ARM: dts: sunxi: Add regulator-boot-on to usb host port regulator nodes
@ 2015-06-20 15:40     ` Hans de Goede
  0 siblings, 0 replies; 24+ messages in thread
From: Hans de Goede @ 2015-06-20 15:40 UTC (permalink / raw)
  To: linux-arm-kernel

u-boot will have turned on the power to the usb host ports, so mark them
as regulator-boot-on, this stops the power on the ports from temporarily
getting turned off during boot, causing issues with e.g. usb powered
harddisks.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sunxi-common-regulators.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/sunxi-common-regulators.dtsi b/arch/arm/boot/dts/sunxi-common-regulators.dtsi
index 51cc838..f1953b0 100644
--- a/arch/arm/boot/dts/sunxi-common-regulators.dtsi
+++ b/arch/arm/boot/dts/sunxi-common-regulators.dtsi
@@ -108,6 +108,7 @@
 		regulator-name = "usb1-vbus";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
+		regulator-boot-on;
 		enable-active-high;
 		gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>;
 		status = "disabled";
@@ -120,6 +121,7 @@
 		regulator-name = "usb2-vbus";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
+		regulator-boot-on;
 		enable-active-high;
 		gpio = <&pio 7 3 GPIO_ACTIVE_HIGH>;
 		status = "disabled";
-- 
2.4.3

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

* [PATCH 2/4] ARM: dts: sun4i: Enable otg controller on the ba10-tvbox
  2015-06-20 15:40 ` Hans de Goede
@ 2015-06-20 15:40     ` Hans de Goede
  -1 siblings, 0 replies; 24+ messages in thread
From: Hans de Goede @ 2015-06-20 15:40 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

The ba10-tvbox has the otg controller connected to one of the 2 usb-A
receptacles it has on the front, so enable the otg controller in host-only
mode.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts b/arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts
index 93d4356..f3cb297 100644
--- a/arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts
+++ b/arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts
@@ -125,12 +125,21 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	usb2_vbus_pin_a: usb2_vbus_pin@0 {
 		allwinner,pins = "PH12";
 	};
 };
 
+&reg_usb0_vbus {
+	regulator-boot-on;
+	status = "okay";
+};
+
 &reg_usb1_vbus {
 	status = "okay";
 };
@@ -146,7 +155,13 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "host";
+	status = "okay";
+};
+
 &usbphy {
+	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
-- 
2.4.3

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

* [PATCH 2/4] ARM: dts: sun4i: Enable otg controller on the ba10-tvbox
@ 2015-06-20 15:40     ` Hans de Goede
  0 siblings, 0 replies; 24+ messages in thread
From: Hans de Goede @ 2015-06-20 15:40 UTC (permalink / raw)
  To: linux-arm-kernel

The ba10-tvbox has the otg controller connected to one of the 2 usb-A
receptacles it has on the front, so enable the otg controller in host-only
mode.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts b/arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts
index 93d4356..f3cb297 100644
--- a/arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts
+++ b/arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts
@@ -125,12 +125,21 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	usb2_vbus_pin_a: usb2_vbus_pin at 0 {
 		allwinner,pins = "PH12";
 	};
 };
 
+&reg_usb0_vbus {
+	regulator-boot-on;
+	status = "okay";
+};
+
 &reg_usb1_vbus {
 	status = "okay";
 };
@@ -146,7 +155,13 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "host";
+	status = "okay";
+};
+
 &usbphy {
+	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
-- 
2.4.3

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

* [PATCH 3/4] ARM: dts: sun4i: Enable otg controller on the mini-x
  2015-06-20 15:40 ` Hans de Goede
@ 2015-06-20 15:40     ` Hans de Goede
  -1 siblings, 0 replies; 24+ messages in thread
From: Hans de Goede @ 2015-06-20 15:40 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

The mini-x has the otg controller connected to one of the 2 usb-A
receptacles it has on the front, so enable the otg controller in host-only
mode.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun4i-a10-mini-xplus.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts b/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts
index ebe2a04..a7dd86d 100644
--- a/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts
+++ b/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts
@@ -114,6 +114,15 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
+&reg_usb0_vbus {
+	regulator-boot-on;
+	status = "okay";
+};
+
 &reg_usb1_vbus {
 	status = "okay";
 };
@@ -128,7 +137,13 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "host";
+	status = "okay";
+};
+
 &usbphy {
+	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
-- 
2.4.3

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

* [PATCH 3/4] ARM: dts: sun4i: Enable otg controller on the mini-x
@ 2015-06-20 15:40     ` Hans de Goede
  0 siblings, 0 replies; 24+ messages in thread
From: Hans de Goede @ 2015-06-20 15:40 UTC (permalink / raw)
  To: linux-arm-kernel

The mini-x has the otg controller connected to one of the 2 usb-A
receptacles it has on the front, so enable the otg controller in host-only
mode.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun4i-a10-mini-xplus.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts b/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts
index ebe2a04..a7dd86d 100644
--- a/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts
+++ b/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts
@@ -114,6 +114,15 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
+&reg_usb0_vbus {
+	regulator-boot-on;
+	status = "okay";
+};
+
 &reg_usb1_vbus {
 	status = "okay";
 };
@@ -128,7 +137,13 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "host";
+	status = "okay";
+};
+
 &usbphy {
+	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
-- 
2.4.3

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

* [PATCH 4/4] ARM: dts: sun6i: Enable otg controller on the cs908
  2015-06-20 15:40 ` Hans de Goede
@ 2015-06-20 15:40     ` Hans de Goede
  -1 siblings, 0 replies; 24+ messages in thread
From: Hans de Goede @ 2015-06-20 15:40 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

The cs908 has the otg controller connected to one of the 2 usb-A
receptacles it has on the front, so enable the otg controller in host-only
mode.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/sun6i-a31s-cs908.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/sun6i-a31s-cs908.dts b/arch/arm/boot/dts/sun6i-a31s-cs908.dts
index 1e2411a..5e8f8c4 100644
--- a/arch/arm/boot/dts/sun6i-a31s-cs908.dts
+++ b/arch/arm/boot/dts/sun6i-a31s-cs908.dts
@@ -93,6 +93,11 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "host";
+	status = "okay";
+};
+
 &usbphy {
 	status = "okay";
 };
-- 
2.4.3

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

* [PATCH 4/4] ARM: dts: sun6i: Enable otg controller on the cs908
@ 2015-06-20 15:40     ` Hans de Goede
  0 siblings, 0 replies; 24+ messages in thread
From: Hans de Goede @ 2015-06-20 15:40 UTC (permalink / raw)
  To: linux-arm-kernel

The cs908 has the otg controller connected to one of the 2 usb-A
receptacles it has on the front, so enable the otg controller in host-only
mode.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sun6i-a31s-cs908.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/sun6i-a31s-cs908.dts b/arch/arm/boot/dts/sun6i-a31s-cs908.dts
index 1e2411a..5e8f8c4 100644
--- a/arch/arm/boot/dts/sun6i-a31s-cs908.dts
+++ b/arch/arm/boot/dts/sun6i-a31s-cs908.dts
@@ -93,6 +93,11 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "host";
+	status = "okay";
+};
+
 &usbphy {
 	status = "okay";
 };
-- 
2.4.3

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

* Re: [PATCH 1/4] ARM: dts: sunxi: Add regulator-boot-on to usb host port regulator nodes
  2015-06-20 15:40     ` Hans de Goede
@ 2015-06-22  0:30         ` Julian Calaby
  -1 siblings, 0 replies; 24+ messages in thread
From: Julian Calaby @ 2015-06-22  0:30 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Maxime Ripard, Mailing List, Arm, devicetree, linux-sunxi

Hi Hans,

On Sun, Jun 21, 2015 at 1:40 AM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> u-boot will have turned on the power to the usb host ports, so mark them
> as regulator-boot-on, this stops the power on the ports from temporarily
> getting turned off during boot, causing issues with e.g. usb powered
> harddisks.

Stupid question: shouldn't u-boot set this property?

Thanks,

-- 
Julian Calaby

Email: julian.calaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Profile: http://www.google.com/profiles/julian.calaby/

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

* [linux-sunxi] [PATCH 1/4] ARM: dts: sunxi: Add regulator-boot-on to usb host port regulator nodes
@ 2015-06-22  0:30         ` Julian Calaby
  0 siblings, 0 replies; 24+ messages in thread
From: Julian Calaby @ 2015-06-22  0:30 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Hans,

On Sun, Jun 21, 2015 at 1:40 AM, Hans de Goede <hdegoede@redhat.com> wrote:
> u-boot will have turned on the power to the usb host ports, so mark them
> as regulator-boot-on, this stops the power on the ports from temporarily
> getting turned off during boot, causing issues with e.g. usb powered
> harddisks.

Stupid question: shouldn't u-boot set this property?

Thanks,

-- 
Julian Calaby

Email: julian.calaby at gmail.com
Profile: http://www.google.com/profiles/julian.calaby/

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

* Re: [PATCH 1/4] ARM: dts: sunxi: Add regulator-boot-on to usb host port regulator nodes
  2015-06-22  0:30         ` [linux-sunxi] " Julian Calaby
@ 2015-06-22  8:28             ` Hans de Goede
  -1 siblings, 0 replies; 24+ messages in thread
From: Hans de Goede @ 2015-06-22  8:28 UTC (permalink / raw)
  To: Julian Calaby; +Cc: Maxime Ripard, Mailing List, Arm, devicetree, linux-sunxi

Hi,

On 22-06-15 02:30, Julian Calaby wrote:
> Hi Hans,
>
> On Sun, Jun 21, 2015 at 1:40 AM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>> u-boot will have turned on the power to the usb host ports, so mark them
>> as regulator-boot-on, this stops the power on the ports from temporarily
>> getting turned off during boot, causing issues with e.g. usb powered
>> harddisks.
>
> Stupid question: shouldn't u-boot set this property?

We could make u-boot set this property but that will require a lot of code on
u-boot's side which is simply not there atm. And traditionally this property
is is simply a part of the dts files as shipped with the kernel.

Regards,

Hans

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

* [linux-sunxi] [PATCH 1/4] ARM: dts: sunxi: Add regulator-boot-on to usb host port regulator nodes
@ 2015-06-22  8:28             ` Hans de Goede
  0 siblings, 0 replies; 24+ messages in thread
From: Hans de Goede @ 2015-06-22  8:28 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 22-06-15 02:30, Julian Calaby wrote:
> Hi Hans,
>
> On Sun, Jun 21, 2015 at 1:40 AM, Hans de Goede <hdegoede@redhat.com> wrote:
>> u-boot will have turned on the power to the usb host ports, so mark them
>> as regulator-boot-on, this stops the power on the ports from temporarily
>> getting turned off during boot, causing issues with e.g. usb powered
>> harddisks.
>
> Stupid question: shouldn't u-boot set this property?

We could make u-boot set this property but that will require a lot of code on
u-boot's side which is simply not there atm. And traditionally this property
is is simply a part of the dts files as shipped with the kernel.

Regards,

Hans

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

* Re: [PATCH 1/4] ARM: dts: sunxi: Add regulator-boot-on to usb host port regulator nodes
  2015-06-22  8:28             ` [linux-sunxi] " Hans de Goede
@ 2015-06-22 14:54                 ` Julian Calaby
  -1 siblings, 0 replies; 24+ messages in thread
From: Julian Calaby @ 2015-06-22 14:54 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Maxime Ripard, Mailing List, Arm, devicetree, linux-sunxi

Hi Hans,

On Mon, Jun 22, 2015 at 6:28 PM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> Hi,
>
> On 22-06-15 02:30, Julian Calaby wrote:
>>
>> Hi Hans,
>>
>> On Sun, Jun 21, 2015 at 1:40 AM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> wrote:
>>>
>>> u-boot will have turned on the power to the usb host ports, so mark them
>>> as regulator-boot-on, this stops the power on the ports from temporarily
>>> getting turned off during boot, causing issues with e.g. usb powered
>>> harddisks.
>>
>>
>> Stupid question: shouldn't u-boot set this property?
>
>
> We could make u-boot set this property but that will require a lot of code
> on
> u-boot's side which is simply not there atm. And traditionally this property
> is is simply a part of the dts files as shipped with the kernel.

Fair enough.

Thanks,

-- 
Julian Calaby

Email: julian.calaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Profile: http://www.google.com/profiles/julian.calaby/

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

* [linux-sunxi] [PATCH 1/4] ARM: dts: sunxi: Add regulator-boot-on to usb host port regulator nodes
@ 2015-06-22 14:54                 ` Julian Calaby
  0 siblings, 0 replies; 24+ messages in thread
From: Julian Calaby @ 2015-06-22 14:54 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Hans,

On Mon, Jun 22, 2015 at 6:28 PM, Hans de Goede <hdegoede@redhat.com> wrote:
> Hi,
>
> On 22-06-15 02:30, Julian Calaby wrote:
>>
>> Hi Hans,
>>
>> On Sun, Jun 21, 2015 at 1:40 AM, Hans de Goede <hdegoede@redhat.com>
>> wrote:
>>>
>>> u-boot will have turned on the power to the usb host ports, so mark them
>>> as regulator-boot-on, this stops the power on the ports from temporarily
>>> getting turned off during boot, causing issues with e.g. usb powered
>>> harddisks.
>>
>>
>> Stupid question: shouldn't u-boot set this property?
>
>
> We could make u-boot set this property but that will require a lot of code
> on
> u-boot's side which is simply not there atm. And traditionally this property
> is is simply a part of the dts files as shipped with the kernel.

Fair enough.

Thanks,

-- 
Julian Calaby

Email: julian.calaby at gmail.com
Profile: http://www.google.com/profiles/julian.calaby/

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

* Re: [PATCH 1/4] ARM: dts: sunxi: Add regulator-boot-on to usb host port regulator nodes
  2015-06-22  8:28             ` [linux-sunxi] " Hans de Goede
@ 2015-06-23  7:16                 ` Maxime Ripard
  -1 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2015-06-23  7:16 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Julian Calaby, Mailing List, Arm, devicetree, linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 964 bytes --]

On Mon, Jun 22, 2015 at 10:28:16AM +0200, Hans de Goede wrote:
> Hi,
> 
> On 22-06-15 02:30, Julian Calaby wrote:
> >Hi Hans,
> >
> >On Sun, Jun 21, 2015 at 1:40 AM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> >>u-boot will have turned on the power to the usb host ports, so mark them
> >>as regulator-boot-on, this stops the power on the ports from temporarily
> >>getting turned off during boot, causing issues with e.g. usb powered
> >>harddisks.
> >
> >Stupid question: shouldn't u-boot set this property?
> 
> We could make u-boot set this property but that will require a lot of code on
> u-boot's side which is simply not there atm. And traditionally this property
> is is simply a part of the dts files as shipped with the kernel.

What happens if the property is set but the regulator is not actually
enabled?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [linux-sunxi] [PATCH 1/4] ARM: dts: sunxi: Add regulator-boot-on to usb host port regulator nodes
@ 2015-06-23  7:16                 ` Maxime Ripard
  0 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2015-06-23  7:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jun 22, 2015 at 10:28:16AM +0200, Hans de Goede wrote:
> Hi,
> 
> On 22-06-15 02:30, Julian Calaby wrote:
> >Hi Hans,
> >
> >On Sun, Jun 21, 2015 at 1:40 AM, Hans de Goede <hdegoede@redhat.com> wrote:
> >>u-boot will have turned on the power to the usb host ports, so mark them
> >>as regulator-boot-on, this stops the power on the ports from temporarily
> >>getting turned off during boot, causing issues with e.g. usb powered
> >>harddisks.
> >
> >Stupid question: shouldn't u-boot set this property?
> 
> We could make u-boot set this property but that will require a lot of code on
> u-boot's side which is simply not there atm. And traditionally this property
> is is simply a part of the dts files as shipped with the kernel.

What happens if the property is set but the regulator is not actually
enabled?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150623/87bae54c/attachment.sig>

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

* Re: [linux-sunxi] [PATCH 1/4] ARM: dts: sunxi: Add regulator-boot-on to usb host port regulator nodes
  2015-06-23  7:16                 ` [linux-sunxi] " Maxime Ripard
@ 2015-06-23  8:19                   ` Hans de Goede
  -1 siblings, 0 replies; 24+ messages in thread
From: Hans de Goede @ 2015-06-23  8:19 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: Julian Calaby, Mailing List, Arm, devicetree, linux-sunxi

Hi,

On 23-06-15 09:16, Maxime Ripard wrote:
> On Mon, Jun 22, 2015 at 10:28:16AM +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 22-06-15 02:30, Julian Calaby wrote:
>>> Hi Hans,
>>>
>>> On Sun, Jun 21, 2015 at 1:40 AM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>>>> u-boot will have turned on the power to the usb host ports, so mark them
>>>> as regulator-boot-on, this stops the power on the ports from temporarily
>>>> getting turned off during boot, causing issues with e.g. usb powered
>>>> harddisks.
>>>
>>> Stupid question: shouldn't u-boot set this property?
>>
>> We could make u-boot set this property but that will require a lot of code on
>> u-boot's side which is simply not there atm. And traditionally this property
>> is is simply a part of the dts files as shipped with the kernel.
>
> What happens if the property is set but the regulator is not actually
> enabled?

Then its gets enabled when the regulator loads, so assuming that the usb driver
is enabled in the kernel config 0.5 (built-in) - 3 (module) seconds earlier then
it otherwise would.

This is not a problem since usb-ports are normally always powered anyways, the only
reason they can be turned off on embedded systems like sunxi is for powersaving
during suspend (which actually goes against the usb spec, but usually works so
most tablets / laptops do this).

Regards,

Hans
--
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] 24+ messages in thread

* [linux-sunxi] [PATCH 1/4] ARM: dts: sunxi: Add regulator-boot-on to usb host port regulator nodes
@ 2015-06-23  8:19                   ` Hans de Goede
  0 siblings, 0 replies; 24+ messages in thread
From: Hans de Goede @ 2015-06-23  8:19 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 23-06-15 09:16, Maxime Ripard wrote:
> On Mon, Jun 22, 2015 at 10:28:16AM +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 22-06-15 02:30, Julian Calaby wrote:
>>> Hi Hans,
>>>
>>> On Sun, Jun 21, 2015 at 1:40 AM, Hans de Goede <hdegoede@redhat.com> wrote:
>>>> u-boot will have turned on the power to the usb host ports, so mark them
>>>> as regulator-boot-on, this stops the power on the ports from temporarily
>>>> getting turned off during boot, causing issues with e.g. usb powered
>>>> harddisks.
>>>
>>> Stupid question: shouldn't u-boot set this property?
>>
>> We could make u-boot set this property but that will require a lot of code on
>> u-boot's side which is simply not there atm. And traditionally this property
>> is is simply a part of the dts files as shipped with the kernel.
>
> What happens if the property is set but the regulator is not actually
> enabled?

Then its gets enabled when the regulator loads, so assuming that the usb driver
is enabled in the kernel config 0.5 (built-in) - 3 (module) seconds earlier then
it otherwise would.

This is not a problem since usb-ports are normally always powered anyways, the only
reason they can be turned off on embedded systems like sunxi is for powersaving
during suspend (which actually goes against the usb spec, but usually works so
most tablets / laptops do this).

Regards,

Hans

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

* Re: [PATCH 1/4] ARM: dts: sunxi: Add regulator-boot-on to usb host port regulator nodes
  2015-06-23  8:19                   ` Hans de Goede
@ 2015-06-25 11:12                       ` Maxime Ripard
  -1 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2015-06-25 11:12 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Julian Calaby, Mailing List, Arm, devicetree, linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 1514 bytes --]

On Tue, Jun 23, 2015 at 10:19:10AM +0200, Hans de Goede wrote:
> Hi,
> 
> On 23-06-15 09:16, Maxime Ripard wrote:
> >On Mon, Jun 22, 2015 at 10:28:16AM +0200, Hans de Goede wrote:
> >>Hi,
> >>
> >>On 22-06-15 02:30, Julian Calaby wrote:
> >>>Hi Hans,
> >>>
> >>>On Sun, Jun 21, 2015 at 1:40 AM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> >>>>u-boot will have turned on the power to the usb host ports, so mark them
> >>>>as regulator-boot-on, this stops the power on the ports from temporarily
> >>>>getting turned off during boot, causing issues with e.g. usb powered
> >>>>harddisks.
> >>>
> >>>Stupid question: shouldn't u-boot set this property?
> >>
> >>We could make u-boot set this property but that will require a lot of code on
> >>u-boot's side which is simply not there atm. And traditionally this property
> >>is is simply a part of the dts files as shipped with the kernel.
> >
> >What happens if the property is set but the regulator is not actually
> >enabled?
> 
> Then its gets enabled when the regulator loads, so assuming that the usb driver
> is enabled in the kernel config 0.5 (built-in) - 3 (module) seconds earlier then
> it otherwise would.

Ok, perfect then.

> This is not a problem since usb-ports are normally always powered anyways

That might be true using mainline u-boot, but might not be on other
bootloaders, hence why I asked that.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [linux-sunxi] [PATCH 1/4] ARM: dts: sunxi: Add regulator-boot-on to usb host port regulator nodes
@ 2015-06-25 11:12                       ` Maxime Ripard
  0 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2015-06-25 11:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 23, 2015 at 10:19:10AM +0200, Hans de Goede wrote:
> Hi,
> 
> On 23-06-15 09:16, Maxime Ripard wrote:
> >On Mon, Jun 22, 2015 at 10:28:16AM +0200, Hans de Goede wrote:
> >>Hi,
> >>
> >>On 22-06-15 02:30, Julian Calaby wrote:
> >>>Hi Hans,
> >>>
> >>>On Sun, Jun 21, 2015 at 1:40 AM, Hans de Goede <hdegoede@redhat.com> wrote:
> >>>>u-boot will have turned on the power to the usb host ports, so mark them
> >>>>as regulator-boot-on, this stops the power on the ports from temporarily
> >>>>getting turned off during boot, causing issues with e.g. usb powered
> >>>>harddisks.
> >>>
> >>>Stupid question: shouldn't u-boot set this property?
> >>
> >>We could make u-boot set this property but that will require a lot of code on
> >>u-boot's side which is simply not there atm. And traditionally this property
> >>is is simply a part of the dts files as shipped with the kernel.
> >
> >What happens if the property is set but the regulator is not actually
> >enabled?
> 
> Then its gets enabled when the regulator loads, so assuming that the usb driver
> is enabled in the kernel config 0.5 (built-in) - 3 (module) seconds earlier then
> it otherwise would.

Ok, perfect then.

> This is not a problem since usb-ports are normally always powered anyways

That might be true using mainline u-boot, but might not be on other
bootloaders, hence why I asked that.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150625/3954901b/attachment-0001.sig>

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

* Re: [PATCH 0/4] ARM: dts: sunxi: Enable otg on more boards
  2015-06-20 15:40 ` Hans de Goede
@ 2015-06-25 11:13     ` Maxime Ripard
  -1 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2015-06-25 11:13 UTC (permalink / raw)
  To: Hans de Goede
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 343 bytes --]

On Sat, Jun 20, 2015 at 05:40:06PM +0200, Hans de Goede wrote:
> Hi Maxime,
> 
> Here is a dts series with 1 fix + 3 patches enabling otg on more boards,
> this applies on top of my previous dts otg work.

Merged all 4, thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [PATCH 0/4] ARM: dts: sunxi: Enable otg on more boards
@ 2015-06-25 11:13     ` Maxime Ripard
  0 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2015-06-25 11:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jun 20, 2015 at 05:40:06PM +0200, Hans de Goede wrote:
> Hi Maxime,
> 
> Here is a dts series with 1 fix + 3 patches enabling otg on more boards,
> this applies on top of my previous dts otg work.

Merged all 4, thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150625/c61c4ef0/attachment-0001.sig>

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

end of thread, other threads:[~2015-06-25 11:13 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-20 15:40 [PATCH 0/4] ARM: dts: sunxi: Enable otg on more boards Hans de Goede
2015-06-20 15:40 ` Hans de Goede
     [not found] ` <1434814810-26285-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-20 15:40   ` [PATCH 1/4] ARM: dts: sunxi: Add regulator-boot-on to usb host port regulator nodes Hans de Goede
2015-06-20 15:40     ` Hans de Goede
     [not found]     ` <1434814810-26285-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-22  0:30       ` Julian Calaby
2015-06-22  0:30         ` [linux-sunxi] " Julian Calaby
     [not found]         ` <CAGRGNgU7179K408=PekziP9ZzzG7+rvhm=e7TWjZk1UhkAnVZQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-22  8:28           ` Hans de Goede
2015-06-22  8:28             ` [linux-sunxi] " Hans de Goede
     [not found]             ` <5587C720.9040007-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-22 14:54               ` Julian Calaby
2015-06-22 14:54                 ` [linux-sunxi] " Julian Calaby
2015-06-23  7:16               ` Maxime Ripard
2015-06-23  7:16                 ` [linux-sunxi] " Maxime Ripard
2015-06-23  8:19                 ` Hans de Goede
2015-06-23  8:19                   ` Hans de Goede
     [not found]                   ` <5589167E.4020905-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-25 11:12                     ` Maxime Ripard
2015-06-25 11:12                       ` [linux-sunxi] " Maxime Ripard
2015-06-20 15:40   ` [PATCH 2/4] ARM: dts: sun4i: Enable otg controller on the ba10-tvbox Hans de Goede
2015-06-20 15:40     ` Hans de Goede
2015-06-20 15:40   ` [PATCH 3/4] ARM: dts: sun4i: Enable otg controller on the mini-x Hans de Goede
2015-06-20 15:40     ` Hans de Goede
2015-06-20 15:40   ` [PATCH 4/4] ARM: dts: sun6i: Enable otg controller on the cs908 Hans de Goede
2015-06-20 15:40     ` Hans de Goede
2015-06-25 11:13   ` [PATCH 0/4] ARM: dts: sunxi: Enable otg on more boards Maxime Ripard
2015-06-25 11:13     ` Maxime Ripard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.