diff mbox

[1/7] ARM: dts: sunxi: Add regulator-boot-on property to ahci-5v regulator

Message ID 1415871109-28332-1-git-send-email-hdegoede@redhat.com
State New
Headers show

Commit Message

Hans de Goede Nov. 13, 2014, 9:31 a.m. UTC
This avoids it getting briefly turned off between when the regulator getting
registered and the ahci driver turning it back on, thus avoiding the disk
going into emergency head park mode.

Cc: Bruno Prémont <bonbons@linux-vserver.org>
Reported-and-tested-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/sunxi-common-regulators.dtsi | 1 +
 1 file changed, 1 insertion(+)

Comments

Maxime Ripard Nov. 13, 2014, 4:46 p.m. UTC | #1
Hi,

On Thu, Nov 13, 2014 at 10:31:46AM +0100, Hans de Goede wrote:
> Add a simplefb template node for u-boot to further fill and activate.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  arch/arm/boot/dts/sun6i-a31.dtsi | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
> index 543f895..438952e 100644
> --- a/arch/arm/boot/dts/sun6i-a31.dtsi
> +++ b/arch/arm/boot/dts/sun6i-a31.dtsi
> @@ -62,6 +62,16 @@
>  		ethernet0 = &gmac;
>  	};
>  
> +	chosen {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges;
> +
> +		framebuffer0 {
> +			compatible = "simple-framebuffer";
> +			status = "disabled";

Aren't we suppose to have clocks in there too?

Thanks,
Maxime
Maxime Ripard Nov. 13, 2014, 4:47 p.m. UTC | #2
On Thu, Nov 13, 2014 at 10:31:48AM +0100, Hans de Goede wrote:
> The Mele M9 / A1000G quad uses both usb-ports, one goes to an internal
> usb wifi card, the other to a build-in usb-hub, so neither need their
> OHCI companion controller to be enabled since the are always connected at
> USB-2 speeds.
> 
> The controller which is attached to the wifi also does not need a vbus
> regulator.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Applied, with a newline before the pinctrl node.

Thanks!
Maxime
Maxime Ripard Nov. 13, 2014, 4:48 p.m. UTC | #3
On Thu, Nov 13, 2014 at 10:31:49AM +0100, Hans de Goede wrote:
> The Mele M9 / A1000G quad has a blue status led, add support for this.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Applied, with a newline after the pnictrl node.

Thanks!
Maxime
Maxime Ripard Nov. 13, 2014, 4:49 p.m. UTC | #4
On Thu, Nov 13, 2014 at 10:31:43AM +0100, Hans de Goede wrote:
> This avoids it getting briefly turned off between when the regulator getting
> registered and the ahci driver turning it back on, thus avoiding the disk
> going into emergency head park mode.
> 
> Cc: Bruno Prémont <bonbons@linux-vserver.org>
> Reported-and-tested-by: Bruno Prémont <bonbons@linux-vserver.org>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Applied, and split up the tags.

Thanks!
Maxime
Hans de Goede Nov. 13, 2014, 5:52 p.m. UTC | #5
Hi,

On 11/13/2014 05:46 PM, Maxime Ripard wrote:
> Hi,
> 
> On Thu, Nov 13, 2014 at 10:31:46AM +0100, Hans de Goede wrote:
>> Add a simplefb template node for u-boot to further fill and activate.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>  arch/arm/boot/dts/sun6i-a31.dtsi | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
>> index 543f895..438952e 100644
>> --- a/arch/arm/boot/dts/sun6i-a31.dtsi
>> +++ b/arch/arm/boot/dts/sun6i-a31.dtsi
>> @@ -62,6 +62,16 @@
>>  		ethernet0 = &gmac;
>>  	};
>>  
>> +	chosen {
>> +		#address-cells = <1>;
>> +		#size-cells = <1>;
>> +		ranges;
>> +
>> +		framebuffer0 {
>> +			compatible = "simple-framebuffer";
>> +			status = "disabled";
> 
> Aren't we suppose to have clocks in there too?

I deliberately left them out as they are not needed on sun6i, once the blocks
are setup ahb access is not necessary, but it seems that the ahb_gate bits
in sun4i / sun5i / sun7i double as a reset. Toggling them on / off / on breaks
the mode, while toggling module clocks on / off / on only causes a glitch.

Since the sun6i has a separate reset controller, the clock gates seem to really
only control ahb access which is not necessary once the mode has been set up.

Regards,

Hans
Maxime Ripard Nov. 14, 2014, 10:24 a.m. UTC | #6
On Thu, Nov 13, 2014 at 06:52:57PM +0100, Hans de Goede wrote:
> Hi,
> 
> On 11/13/2014 05:46 PM, Maxime Ripard wrote:
> > Hi,
> > 
> > On Thu, Nov 13, 2014 at 10:31:46AM +0100, Hans de Goede wrote:
> >> Add a simplefb template node for u-boot to further fill and activate.
> >>
> >> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> >> ---
> >>  arch/arm/boot/dts/sun6i-a31.dtsi | 10 ++++++++++
> >>  1 file changed, 10 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
> >> index 543f895..438952e 100644
> >> --- a/arch/arm/boot/dts/sun6i-a31.dtsi
> >> +++ b/arch/arm/boot/dts/sun6i-a31.dtsi
> >> @@ -62,6 +62,16 @@
> >>  		ethernet0 = &gmac;
> >>  	};
> >>  
> >> +	chosen {
> >> +		#address-cells = <1>;
> >> +		#size-cells = <1>;
> >> +		ranges;
> >> +
> >> +		framebuffer0 {
> >> +			compatible = "simple-framebuffer";
> >> +			status = "disabled";
> > 
> > Aren't we suppose to have clocks in there too?
> 
> I deliberately left them out as they are not needed on sun6i, once the blocks
> are setup ahb access is not necessary, but it seems that the ahb_gate bits
> in sun4i / sun5i / sun7i double as a reset. Toggling them on / off / on breaks
> the mode, while toggling module clocks on / off / on only causes a glitch.
> 
> Since the sun6i has a separate reset controller, the clock gates seem to really
> only control ahb access which is not necessary once the mode has been set up.

Ok. That can always be changed in the future if we ever find we need
them anyway.

I'll merge these four patches as soon as the bindings doc is
acked-by/merged by Grant or any other DT maintainer.

Maxime
Hans de Goede Nov. 14, 2014, 10:30 a.m. UTC | #7
Hi,

On 11/14/2014 11:24 AM, Maxime Ripard wrote:
> On Thu, Nov 13, 2014 at 06:52:57PM +0100, Hans de Goede wrote:
>> Hi,
>>
>> On 11/13/2014 05:46 PM, Maxime Ripard wrote:
>>> Hi,
>>>
>>> On Thu, Nov 13, 2014 at 10:31:46AM +0100, Hans de Goede wrote:
>>>> Add a simplefb template node for u-boot to further fill and activate.
>>>>
>>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>>> ---
>>>>  arch/arm/boot/dts/sun6i-a31.dtsi | 10 ++++++++++
>>>>  1 file changed, 10 insertions(+)
>>>>
>>>> diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
>>>> index 543f895..438952e 100644
>>>> --- a/arch/arm/boot/dts/sun6i-a31.dtsi
>>>> +++ b/arch/arm/boot/dts/sun6i-a31.dtsi
>>>> @@ -62,6 +62,16 @@
>>>>  		ethernet0 = &gmac;
>>>>  	};
>>>>  
>>>> +	chosen {
>>>> +		#address-cells = <1>;
>>>> +		#size-cells = <1>;
>>>> +		ranges;
>>>> +
>>>> +		framebuffer0 {
>>>> +			compatible = "simple-framebuffer";
>>>> +			status = "disabled";
>>>
>>> Aren't we suppose to have clocks in there too?
>>
>> I deliberately left them out as they are not needed on sun6i, once the blocks
>> are setup ahb access is not necessary, but it seems that the ahb_gate bits
>> in sun4i / sun5i / sun7i double as a reset. Toggling them on / off / on breaks
>> the mode, while toggling module clocks on / off / on only causes a glitch.
>>
>> Since the sun6i has a separate reset controller, the clock gates seem to really
>> only control ahb access which is not necessary once the mode has been set up.
> 
> Ok. That can always be changed in the future if we ever find we need
> them anyway.
> 
> I'll merge these four patches as soon as the bindings doc is
> acked-by/merged by Grant or any other DT maintainer.

Note these patches are using framebuffer0 rather then framebuffer0-hdmi as node
name, which may cause issues if we later want to add lcd support. So I've a v2
coming which changes the name to framebuffer0-hdmi, please merge that instead.

Regards,

Hans
Maxime Ripard Nov. 14, 2014, 11:21 a.m. UTC | #8
On Fri, Nov 14, 2014 at 11:30:09AM +0100, Hans de Goede wrote:
> Hi,
> 
> On 11/14/2014 11:24 AM, Maxime Ripard wrote:
> > On Thu, Nov 13, 2014 at 06:52:57PM +0100, Hans de Goede wrote:
> >> Hi,
> >>
> >> On 11/13/2014 05:46 PM, Maxime Ripard wrote:
> >>> Hi,
> >>>
> >>> On Thu, Nov 13, 2014 at 10:31:46AM +0100, Hans de Goede wrote:
> >>>> Add a simplefb template node for u-boot to further fill and activate.
> >>>>
> >>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> >>>> ---
> >>>>  arch/arm/boot/dts/sun6i-a31.dtsi | 10 ++++++++++
> >>>>  1 file changed, 10 insertions(+)
> >>>>
> >>>> diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
> >>>> index 543f895..438952e 100644
> >>>> --- a/arch/arm/boot/dts/sun6i-a31.dtsi
> >>>> +++ b/arch/arm/boot/dts/sun6i-a31.dtsi
> >>>> @@ -62,6 +62,16 @@
> >>>>  		ethernet0 = &gmac;
> >>>>  	};
> >>>>  
> >>>> +	chosen {
> >>>> +		#address-cells = <1>;
> >>>> +		#size-cells = <1>;
> >>>> +		ranges;
> >>>> +
> >>>> +		framebuffer0 {
> >>>> +			compatible = "simple-framebuffer";
> >>>> +			status = "disabled";
> >>>
> >>> Aren't we suppose to have clocks in there too?
> >>
> >> I deliberately left them out as they are not needed on sun6i, once the blocks
> >> are setup ahb access is not necessary, but it seems that the ahb_gate bits
> >> in sun4i / sun5i / sun7i double as a reset. Toggling them on / off / on breaks
> >> the mode, while toggling module clocks on / off / on only causes a glitch.
> >>
> >> Since the sun6i has a separate reset controller, the clock gates seem to really
> >> only control ahb access which is not necessary once the mode has been set up.
> > 
> > Ok. That can always be changed in the future if we ever find we need
> > them anyway.
> > 
> > I'll merge these four patches as soon as the bindings doc is
> > acked-by/merged by Grant or any other DT maintainer.
> 
> Note these patches are using framebuffer0 rather then framebuffer0-hdmi as node
> name, which may cause issues if we later want to add lcd support. So I've a v2
> coming which changes the name to framebuffer0-hdmi, please merge that instead.

Ok :)
diff mbox

Patch

diff --git a/arch/arm/boot/dts/sunxi-common-regulators.dtsi b/arch/arm/boot/dts/sunxi-common-regulators.dtsi
index c9c5b10..a950671 100644
--- a/arch/arm/boot/dts/sunxi-common-regulators.dtsi
+++ b/arch/arm/boot/dts/sunxi-common-regulators.dtsi
@@ -44,6 +44,7 @@ 
 		regulator-name = "ahci-5v";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
+		regulator-boot-on;
 		enable-active-high;
 		gpio = <&pio 1 8 0>;
 		status = "disabled";