All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Mark Brown
	<broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>,
	Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
Cc: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
	Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 3/3] ARM: dt: tegra: paz00: add regulators
Date: Tue, 26 Jun 2012 16:35:46 -0600	[thread overview]
Message-ID: <4FEA3942.9040906@wwwdotorg.org> (raw)
In-Reply-To: <20120624110306.GA16455-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>

On 06/24/2012 05:03 AM, Mark Brown wrote:
> On Sat, Jun 23, 2012 at 06:35:01PM +0200, Marc Dietrich wrote:
> 
>>> The regulator configurations were all taken from the AC100 kernel used by
>>> the Ubuntu port, specifically:
> 
> These generally all look pretty broken...
> 
>>> +				regulator@0 {
>>> +					reg = <0>;
>>> +					regulator-compatible = "sm0";
>>> +					regulator-name = "+1.2vs_sm0";
>>> +					regulator-min-microvolt = < 725000>;
>>> +					regulator-max-microvolt = <1300000>;
> 
> Most of these ranges look suspiciously like the maximum possible
> variation the regulator has, not what the board actually requires (which
> is a depressingly common error, I've no idea why people seem to think
> they're supposed to cut'n'paste the physical limits of the regualtor out
> of the driver).  If something decides to take advantage of the variation
> this could be problematic.

So I think this sm0 (and the sm1) entry might actually be correct; sm0
feeds vdd_core and sm1 feeds vdd_cpu. These rails have DVFS and hence
the voltage can vary. I guess I should change the regulator-name in
these cases to something more useful than the very first signal name on
the schematics too.

That said, we don't actually have DVFS in the mainline kernel yet, and
correlating the regulator limits in our downstream kernels against the
DVFS tables we use is ... challenging; I'm not sure they're consistent
anyway:-(

However, it probably doesn't make sense to vary sm2, since all that is
used for is to feed the TPS6586x's input pins for the the LDO regulators.

Likewise, all the LDO regulators are used for various peripherals in
general, and in the main it probably makes no sense for those rails to vary.

So, what I think I'll do for any regulators where the downstream board
files specify a voltage range, is boot the kernel and find out what
voltage is selected by default, and program both min-/max-microvolt to
that specific value. That way, there will be no behaviour change. We can
expand the ranges on the regulators later if/when we add DVFS etc. Does
that sound like a reasonable approach?

WARNING: multiple messages have this Message-ID (diff)
From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] ARM: dt: tegra: paz00: add regulators
Date: Tue, 26 Jun 2012 16:35:46 -0600	[thread overview]
Message-ID: <4FEA3942.9040906@wwwdotorg.org> (raw)
In-Reply-To: <20120624110306.GA16455@sirena.org.uk>

On 06/24/2012 05:03 AM, Mark Brown wrote:
> On Sat, Jun 23, 2012 at 06:35:01PM +0200, Marc Dietrich wrote:
> 
>>> The regulator configurations were all taken from the AC100 kernel used by
>>> the Ubuntu port, specifically:
> 
> These generally all look pretty broken...
> 
>>> +				regulator at 0 {
>>> +					reg = <0>;
>>> +					regulator-compatible = "sm0";
>>> +					regulator-name = "+1.2vs_sm0";
>>> +					regulator-min-microvolt = < 725000>;
>>> +					regulator-max-microvolt = <1300000>;
> 
> Most of these ranges look suspiciously like the maximum possible
> variation the regulator has, not what the board actually requires (which
> is a depressingly common error, I've no idea why people seem to think
> they're supposed to cut'n'paste the physical limits of the regualtor out
> of the driver).  If something decides to take advantage of the variation
> this could be problematic.

So I think this sm0 (and the sm1) entry might actually be correct; sm0
feeds vdd_core and sm1 feeds vdd_cpu. These rails have DVFS and hence
the voltage can vary. I guess I should change the regulator-name in
these cases to something more useful than the very first signal name on
the schematics too.

That said, we don't actually have DVFS in the mainline kernel yet, and
correlating the regulator limits in our downstream kernels against the
DVFS tables we use is ... challenging; I'm not sure they're consistent
anyway:-(

However, it probably doesn't make sense to vary sm2, since all that is
used for is to feed the TPS6586x's input pins for the the LDO regulators.

Likewise, all the LDO regulators are used for various peripherals in
general, and in the main it probably makes no sense for those rails to vary.

So, what I think I'll do for any regulators where the downstream board
files specify a voltage range, is boot the kernel and find out what
voltage is selected by default, and program both min-/max-microvolt to
that specific value. That way, there will be no behaviour change. We can
expand the ranges on the regulators later if/when we add DVFS etc. Does
that sound like a reasonable approach?

  parent reply	other threads:[~2012-06-26 22:35 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-22 23:14 [PATCH 1/3] ARM: dt: tegra: seaboard: add regulators Stephen Warren
2012-06-22 23:14 ` Stephen Warren
     [not found] ` <1340406842-27135-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-22 23:14   ` [PATCH 2/3] ARM: dt: tegra: ventana: " Stephen Warren
2012-06-22 23:14     ` Stephen Warren
2012-06-22 23:14   ` [PATCH 3/3] ARM: dt: tegra: paz00: " Stephen Warren
2012-06-22 23:14     ` Stephen Warren
     [not found]     ` <1340406842-27135-3-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-23 16:35       ` Marc Dietrich
2012-06-23 16:35         ` Marc Dietrich
2012-06-24 11:03         ` Mark Brown
2012-06-24 11:03           ` Mark Brown
     [not found]           ` <20120624110306.GA16455-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2012-06-24 12:01             ` Marc Dietrich
2012-06-24 12:01               ` Marc Dietrich
2012-06-24 12:31               ` Mark Brown
2012-06-24 12:31                 ` Mark Brown
     [not found]                 ` <20120624123151.GZ4037-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-06-24 13:27                   ` Marc Dietrich
2012-06-24 13:27                     ` Marc Dietrich
2012-06-25  8:46                     ` Mark Brown
2012-06-25  8:46                       ` Mark Brown
     [not found]                       ` <20120625084656.GA4037-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-06-25 10:45                         ` Marc Dietrich
2012-06-25 10:45                           ` Marc Dietrich
2012-06-25 11:07                     ` Thierry Reding
2012-06-25 11:07                       ` Thierry Reding
2012-06-26 22:35             ` Stephen Warren [this message]
2012-06-26 22:35               ` Stephen Warren
     [not found]               ` <4FEA3942.9040906-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-26 23:02                 ` Mark Brown
2012-06-26 23:02                   ` Mark Brown
     [not found]                   ` <20120626230235.GX30406-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-06-26 23:16                     ` Stephen Warren
2012-06-26 23:16                       ` Stephen Warren
2012-06-29 17:32                     ` Stephen Warren
2012-06-29 17:32                       ` Stephen Warren
     [not found]                       ` <4FEDE6AE.4080409-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-30 11:45                         ` Mark Brown
2012-06-30 11:45                           ` Mark Brown
2012-06-25  6:24   ` [PATCH 1/3] ARM: dt: tegra: seaboard: " Laxman Dewangan
2012-06-25  6:24     ` Laxman Dewangan
     [not found]     ` <4FE80413.6070001-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-25 15:12       ` Stephen Warren
2012-06-25 15:12         ` Stephen Warren
     [not found]         ` <4FE87FE3.1080608-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-25 15:24           ` Laxman Dewangan
2012-06-25 15:24             ` Laxman Dewangan
     [not found]             ` <4FE882A5.3080504-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-25 15:36               ` Stephen Warren
2012-06-25 15:36                 ` Stephen Warren
2012-06-25 22:26               ` Mark Brown
2012-06-25 22:26                 ` Mark Brown
     [not found]                 ` <20120625222646.GB30406-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-06-25 23:09                   ` Stephen Warren
2012-06-25 23:09                     ` Stephen Warren
     [not found]                     ` <4FE8EFC4.3090509-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-26  6:38                       ` Laxman Dewangan
2012-06-26  6:38                         ` Laxman Dewangan
2012-06-26  8:52                       ` Mark Brown
2012-06-26  8:52                         ` Mark Brown
2012-07-10 11:59                       ` Laxman Dewangan
2012-07-10 11:59                         ` Laxman Dewangan
     [not found]                         ` <4FFC190A.2040800-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-10 13:44                           ` Mark Brown
2012-07-10 13:44                             ` Mark Brown
     [not found]                             ` <20120710134436.GD9409-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-07-10 13:44                               ` Laxman Dewangan
2012-07-10 13:44                                 ` Laxman Dewangan
     [not found]                                 ` <4FFC31D5.7090600-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-10 13:53                                   ` Mark Brown
2012-07-10 13:53                                     ` Mark Brown
     [not found]                                     ` <20120710135302.GG9409-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-07-10 15:04                                       ` Laxman Dewangan
2012-07-10 15:04                                         ` Laxman Dewangan
     [not found]                                         ` <4FFC4478.7000204-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-10 15:42                                           ` Mark Brown
2012-07-10 15:42                                             ` Mark Brown
     [not found]                                             ` <20120710154201.GE10022-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-07-10 16:39                                               ` Laxman Dewangan
2012-07-10 16:39                                                 ` Laxman Dewangan
     [not found]                                                 ` <4FFC5ACA.8010003-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-10 16:52                                                   ` Mark Brown
2012-07-10 16:52                                                     ` Mark Brown
     [not found]                                                     ` <20120710165236.GI10022-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-07-10 16:53                                                       ` Laxman Dewangan
2012-07-10 16:53                                                         ` Laxman Dewangan
     [not found]                                                         ` <4FFC5E1C.7000500-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-10 17:01                                                           ` Mark Brown
2012-07-10 17:01                                                             ` Mark Brown
     [not found]                                                             ` <20120710170112.GK10022-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-07-11 10:02                                                               ` Laxman Dewangan
2012-07-11 10:02                                                                 ` Laxman Dewangan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FEA3942.9040906@wwwdotorg.org \
    --to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
    --cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
    --cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=marvin24-Mmb7MZpHnFY@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.