All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: Mark Brown <broonie@kernel.org>, Lucas Stach <l.stach@pengutronix.de>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Shawn Guo <shawn.guo@linaro.org>
Subject: Re: [RFC 2/2] PM / OPP: extend DT parsing to allow voltage ranges
Date: Thu, 29 May 2014 19:06:03 -0500	[thread overview]
Message-ID: <5387CB6B.2080100@ti.com> (raw)
In-Reply-To: <20140522175846.GO12304@sirena.org.uk>

On 05/22/2014 12:58 PM, Mark Brown wrote:
> On Thu, May 22, 2014 at 12:24:58PM +0200, Lucas Stach wrote:
> 
>> This shifts things from a change to the OPP framework to a change to the
>> regulator framework, as I would like to add this property to the device
>> supply definition. Patches upcoming.
> 
> In the regulator framework this seems completely redundant - we already
> have the maximum voltage specifiable, it's hard to see a case where
> you'd want a maximum that wasn't the maximum for the board.  I'd expect
> the cpufreq code to just read the existing property.
> 
> This disadvantage of doing this without any explicit configuration on
> the cpufreq side is that it means we start ignoring the OPP constraints
> of CPUs that aren't specified to allow that.  Perhaps we don't care
> though.
> 
>> I would really like to have a clear absolute maximum per device, as this
>> would allow me to infer the voltage tolerance of the device from the
>> difference between the highest OPP and maximum voltage.
> 
> I don't think this is a good way of specifying this information.  I
> think if we want to start paying attention to the tolerances in that way
> (which we really ought to do) we should be actually teaching the
> framework about them - for example have the regulator driver able to
> specify the regulation accuracy so set_voltage() can guarantee that the
> constraint is met and probably also have a way of specifying tolerances
> on the ranged set_voltage() too.
> 
> Trying to infer this information from absolute numbers seems likely to
> get us into trouble at some point, both in terms of being harder for
> people to use to get the result they want and in terms of not being able
> to convey the information needed at all.
> 
Apologies on coming back to this discussion so late.

Digging through older emails on this topic, there is one more factor I
had forgotten - IR drop. Just to summarize the factors I can think of
for voltage:
a) OPP min operational voltage (specified in SoC data sheet) - covered
in operating-points dt description
b) device max operational voltage (specified in SoC data sheet) - this
is what we are discussing - I'd go with a max-operational-voltage dt
property to describe this. I see some old threads like [1] which tried
something similar.
c) certain devices allowing voltage tolerance ranges (original
definition of voltage-tolerance that I can find)

d) PMIC min/max voltage range - (specified in PMIC data sheet) - we
already have constraints description ability in DT today.
e) PMIC accuracy - voltage X set on the PMIC might depend on
peak-to-peak noise and after caps to cleanup might end up be +- y% of
attempted voltage X and may actually even vary (example - depending on
PMIC and current drawn, PWM to PFM mode transitions might result in
variant voltages). I think voltage-tolerance was used to compensate
here as well in certain instances?

f) based on board design, the voltage X set on PMIC and at PMIC
ball(after accounting for {e}), eventually results in Voltage Y at the
SoC ball where X-Y is the IR drop. I see some instances (like AM335x)
using voltage-tolerance to account for that as well. - this is
primarily a board factor. Some PMICs like TWL/TPS series have feedback
loop to account for this to save s/w from figuring this out, but not
all PMICs have that ability and some boards may not have wired in the
feedback loop properly.. Again, to complicate life, the current factor
varies depending on type of activity and type of device involved -
without proper characterization, this tends to be kinda hard to quantify.


[1]
http://www.gossamer-threads.com/lists/linux/kernel/1811056?do=post_view_threaded

-- 
Regards,
Nishanth Menon

  reply	other threads:[~2014-05-30  0:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-20 14:27 [RFC 0/2] extends OPP for voltage ranges Lucas Stach
2014-05-20 14:27 ` [RFC 1/2] PM / OPP: allow to use " Lucas Stach
2014-05-21 13:46   ` Pavel Machek
2014-05-20 14:27 ` [RFC 2/2] PM / OPP: extend DT parsing to allow " Lucas Stach
2014-05-20 14:32   ` Nishanth Menon
2014-05-20 14:41     ` Lucas Stach
2014-05-20 14:53       ` Nishanth Menon
2014-05-20 15:07         ` Lucas Stach
2014-05-20 15:23           ` Nishanth Menon
2014-05-20 15:29             ` Nishanth Menon
2014-05-20 15:48               ` Lucas Stach
2014-05-20 16:09                 ` Nishanth Menon
2014-05-20 16:45                   ` Lucas Stach
2014-05-20 17:02                     ` Nishanth Menon
2014-05-21  9:47                       ` Lucas Stach
2014-05-21 23:33                         ` Mark Brown
2014-05-22 10:24                           ` Lucas Stach
2014-05-22 17:58                             ` Mark Brown
2014-05-30  0:06                               ` Nishanth Menon [this message]
2014-05-21 13:49   ` Pavel Machek

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=5387CB6B.2080100@ti.com \
    --to=nm@ti.com \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=l.stach@pengutronix.de \
    --cc=len.brown@intel.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=shawn.guo@linaro.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.