linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Nishanth Menon <nm@ti.com>
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>
Subject: Re: [RFC 2/2] PM / OPP: extend DT parsing to allow voltage ranges
Date: Tue, 20 May 2014 18:45:24 +0200	[thread overview]
Message-ID: <1400604324.4853.51.camel@weser.hi.pengutronix.de> (raw)
In-Reply-To: <CAGo_u6pyU1O0uv-3CJc6OPoJ+bkcpNJ9_26JL3DxugX7dJhZfA@mail.gmail.com>

Am Dienstag, den 20.05.2014, 11:09 -0500 schrieb Nishanth Menon:
> On Tue, May 20, 2014 at 10:48 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
> > Am Dienstag, den 20.05.2014, 10:29 -0500 schrieb Nishanth Menon:
> >> On Tue, May 20, 2014 at 10:23 AM, Nishanth Menon <nm@ti.com> wrote:
> 
> [...]
> >> If you need to handle PMIC accuracy, use voltage-tolerance.
> >>
> > And that's exactly one of the issues of the current binding, the
> > tolerance isn't stable, but rather per OPP.
> >
> > As an example look at two operating points of the i.MX5:
> >
> > /*  kHz min(uV) nom(uV) max(uV) */
> >  166666  850000  900000 1400000
> > 1200000 1300000 1350000 1400000
> >
> > So for the 1,2GHz OPP the voltage tolerance is just 3,7% as anything
> > bigger would exceed the absolute maximum rating, but for the 166MHz OPP
> > it is already 64,7%.
> >
> > I agree that I could just cap the rail at 1,4V and give a max voltage
> > equal to that as max_volt to the regulator API, but actually the device
> > doesn't even know it's tolerance as it has no max defined. It makes
> > having a max_volt in the regulator API kind of senseless, as connected
> > devices don't know their maximum rating.
> 
> Is'nt that(voltage-tolerance binding) a different problem that needs a
> different solution rather than creating a new binding for OPP - which
> actually makes no description sense (since the max is absolute max)?
> 
Ok, I agree that having a nominal voltage isn't really required, so this
leaves us with min...max, where min is already there in the OPP
framework.

The question here is: are there any devices out there where we could
imagine a frequency dependent max-voltage? I could very well image such
a thing for CPU devices, where thermal constraints would force us to
reduce the regulator voltage to allow for a higher frequency. If any
device on the same rail needs a higher voltage this would prevent using
the higher OPP.

I have never seen such a device in practice, so maybe just having a
global max-voltage property is the right thing. I'll have to think about
this.

> How can we address that? should we add some logic that says:
> 
> if voltage tolerance == 0, then try min_uV to max_opp_uV?
> OR
> introduce a new binding that says absolute-max-voltage (this is what I
> was planning on doing with voltage domain btw).. and ensure that that
> is used?
> 
> Personally, I never liked voltage-tolerance binding precisely for the
> same reason as you bring up.. but that is a ABI now and we need to see
> if the requirements can match with it, or define a new one keeping the
> old ABI alive..
> 
I would like to keep the focus on new drivers using OPPs. How to fit in
drivers with existing bindings is to be defined later. I'm working on a
new cpufreq driver and would like to work out a solution that avoids
using this wobbly voltage-tolerance.

Regards,
Lucas
-- 
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |


  reply	other threads:[~2014-05-20 16:46 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 [this message]
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
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=1400604324.4853.51.camel@weser.hi.pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=len.brown@intel.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).