Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1491320 > unrolled thread

Removal of regulator-boot-on/always-on when a consumer exists

Started byFabio Estevam <festevam@gmail.com>
First post2016-09-26 16:30 +0200
Last post2016-09-26 18:50 +0200
Articles 8 — 3 participants

Back to article view | Back to linux.kernel


Contents

  Removal of regulator-boot-on/always-on when a consumer exists Fabio Estevam <festevam@gmail.com> - 2016-09-26 16:30 +0200
    Re: Removal of regulator-boot-on/always-on when a consumer exists Mark Brown <broonie@kernel.org> - 2016-09-26 18:40 +0200
      Re: Removal of regulator-boot-on/always-on when a consumer exists Mark Brown <broonie@kernel.org> - 2016-09-26 18:50 +0200
        Re: Removal of regulator-boot-on/always-on when a consumer exists Fabio Estevam <festevam@gmail.com> - 2016-09-26 19:00 +0200
          Re: Removal of regulator-boot-on/always-on when a consumer exists Mark Brown <broonie@kernel.org> - 2016-09-26 19:00 +0200
            Re: Removal of regulator-boot-on/always-on when a consumer exists Fabio Estevam <festevam@gmail.com> - 2016-09-26 19:30 +0200
          Re: Removal of regulator-boot-on/always-on when a consumer exists Michael Trimarchi <michael@amarulasolutions.com> - 2016-09-26 19:00 +0200
      Re: Removal of regulator-boot-on/always-on when a consumer exists Fabio Estevam <festevam@gmail.com> - 2016-09-26 18:50 +0200

#1491320 — Removal of regulator-boot-on/always-on when a consumer exists

FromFabio Estevam <festevam@gmail.com>
Date2016-09-26 16:30 +0200
SubjectRemoval of regulator-boot-on/always-on when a consumer exists
Message-ID<slF4S-4Wz-11@gated-at.bofh.it>
Hi Mark,

On the linux-arm-kernel list we are reviewing a patch from Michael (on
Cc), where he does:


       reg_3p3v: regulator-3p3v {
               compatible = "regulator-fixed";
               regulator-name = "3P3V";
               regulator-min-microvolt = <3300000>;
               regulator-max-microvolt = <3300000>;
               regulator-boot-on;
               regulator-always-on;
       };
};

&can1 {
       pinctrl-names = "default";
       pinctrl-0 = <&pinctrl_flexcan1>;
       xceiver-supply = <&reg_3p3v>;
};

My suggestion is to remove regulator-boot-on/regulator-always-on:

       reg_3p3v: regulator-3p3v {
               compatible = "regulator-fixed";
               regulator-name = "3P3V";
               regulator-min-microvolt = <3300000>;
               regulator-max-microvolt = <3300000>;
       };

,since reg_3p3v has can1 as its consumer.

Is my understanding correct?

Thanks,

Fabio Estevam

[toc] | [next] | [standalone]


#1491423

FromMark Brown <broonie@kernel.org>
Date2016-09-26 18:40 +0200
Message-ID<slH6G-6aE-11@gated-at.bofh.it>
In reply to#1491320

[Multipart message — attachments visible in raw view] — view raw

On Mon, Sep 26, 2016 at 11:26:24AM -0300, Fabio Estevam wrote:

> My suggestion is to remove regulator-boot-on/regulator-always-on:

>        reg_3p3v: regulator-3p3v {
>                compatible = "regulator-fixed";
>                regulator-name = "3P3V";
>                regulator-min-microvolt = <3300000>;
>                regulator-max-microvolt = <3300000>;
>        };

> ,since reg_3p3v has can1 as its consumer.

> Is my understanding correct?

It really depends on what the actual board constraints are - are there
other consumers that aren't visible to software, is it electrically safe
to power down the rail?

[toc] | [prev] | [next] | [standalone]


#1491425

FromMark Brown <broonie@kernel.org>
Date2016-09-26 18:50 +0200
Message-ID<slHgl-6ej-9@gated-at.bofh.it>
In reply to#1491423

[Multipart message — attachments visible in raw view] — view raw

On Mon, Sep 26, 2016 at 01:43:28PM -0300, Fabio Estevam wrote:
> On Mon, Sep 26, 2016 at 1:34 PM, Mark Brown <broonie@kernel.org> wrote:

> > It really depends on what the actual board constraints are - are there
> > other consumers that aren't visible to software, is it electrically safe
> > to power down the rail?

> The can1 node is the only consumer of this regulator.

> The reg_3p3v regulator models a discrete 3.3V power supply with no
> software intervention.

So if it's electrically safe it's electrically safe...

[toc] | [prev] | [next] | [standalone]


#1491437

FromFabio Estevam <festevam@gmail.com>
Date2016-09-26 19:00 +0200
Message-ID<slHq1-6hN-7@gated-at.bofh.it>
In reply to#1491425
On Mon, Sep 26, 2016 at 1:49 PM, Mark Brown <broonie@kernel.org> wrote:

>> The can1 node is the only consumer of this regulator.
>
>> The reg_3p3v regulator models a discrete 3.3V power supply with no
>> software intervention.
>
> So if it's electrically safe it's electrically safe...

So regulator-boot-on and  regulator-always-on can go away then?

[toc] | [prev] | [next] | [standalone]


#1491444

FromMark Brown <broonie@kernel.org>
Date2016-09-26 19:00 +0200
Message-ID<slHq2-6hN-41@gated-at.bofh.it>
In reply to#1491437

[Multipart message — attachments visible in raw view] — view raw

On Mon, Sep 26, 2016 at 01:50:37PM -0300, Fabio Estevam wrote:

> So regulator-boot-on and  regulator-always-on can go away then?

Like I say I can't give you a definitive answer on this without looking
at the actual hardware and what it needs.  Based on what you're saying
it sounds like it won't be an issue from the point of view of disrupting
other users but without knowing the hardware I can't tell if the
connected device can safely have power removed, sometimes devices don't
like having only one of many supplies removed.

[toc] | [prev] | [next] | [standalone]


#1491459

FromFabio Estevam <festevam@gmail.com>
Date2016-09-26 19:30 +0200
Message-ID<slHT3-6G2-15@gated-at.bofh.it>
In reply to#1491444
On Mon, Sep 26, 2016 at 1:57 PM, Mark Brown <broonie@kernel.org> wrote:

> Like I say I can't give you a definitive answer on this without looking
> at the actual hardware and what it needs.  Based on what you're saying
> it sounds like it won't be an issue from the point of view of disrupting
> other users but without knowing the hardware I can't tell if the
> connected device can safely have power removed, sometimes devices don't
> like having only one of many supplies removed.

Ok, let me give you more details: we power the board with an external
5V power supply, then a discrete regulator generates 3.3V to the CAN
transceiver chip.

Software has no influence on this 3.3V rail, which stays powered as
long as the board is powered.

According to Documentation/devicetree/bindings/regulator/regulator.txt:

- regulator-always-on: boolean, regulator should never be disabled
- regulator-boot-on: bootloader/firmware enabled regulator

and the dts looks like:

       reg_3p3v: regulator-3p3v {
               compatible = "regulator-fixed";
               regulator-name = "3P3V";
               regulator-min-microvolt = <3300000>;
               regulator-max-microvolt = <3300000>;
               regulator-boot-on;
               regulator-always-on;
       };
};

&can1 {
       pinctrl-names = "default";
       pinctrl-0 = <&pinctrl_flexcan1>;
       xceiver-supply = <&reg_3p3v>;
};

The flexcan driver (which is the consumer of reg_3p3v) will call
regulator_disable() when can1 is not used. Calling regulator_disable
on reg_3p3v will not physically remove power from the 3.3V, so should
we use "regulator-always-on" or not in this case?

About "regulator-boot-on": since it was not the bootloader/firmware
that was responsible for enabling such regulator, I think this could
be removed from the dts.

Thanks for the clarification.

[toc] | [prev] | [next] | [standalone]


#1491445

FromMichael Trimarchi <michael@amarulasolutions.com>
Date2016-09-26 19:00 +0200
Message-ID<slHq2-6hN-63@gated-at.bofh.it>
In reply to#1491437
Hi

On Mon, Sep 26, 2016 at 6:50 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Mon, Sep 26, 2016 at 1:49 PM, Mark Brown <broonie@kernel.org> wrote:
>
>>> The can1 node is the only consumer of this regulator.
>>
>>> The reg_3p3v regulator models a discrete 3.3V power supply with no
>>> software intervention.
>>
>> So if it's electrically safe it's electrically safe...
>
> So regulator-boot-on and  regulator-always-on can go away then?

regulator-always-on and regulator-boot-on just describe them and I don't see
any advantage to remove them

Michael

[toc] | [prev] | [next] | [standalone]


#1491433

FromFabio Estevam <festevam@gmail.com>
Date2016-09-26 18:50 +0200
Message-ID<slHgl-6ej-11@gated-at.bofh.it>
In reply to#1491423
Hi Mark,

On Mon, Sep 26, 2016 at 1:34 PM, Mark Brown <broonie@kernel.org> wrote:

> It really depends on what the actual board constraints are - are there
> other consumers that aren't visible to software, is it electrically safe
> to power down the rail?

The can1 node is the only consumer of this regulator.

The reg_3p3v regulator models a discrete 3.3V power supply with no
software intervention.

Thanks

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web