devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: Mark Brown <broonie@kernel.org>
Cc: Paul Walmsley <paul@pwsan.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	linux-doc@vger.kernel.org,
	Kevin Hilman <khilman@deeprootsystems.com>,
	devicetree-discuss@lists.ozlabs.org,
	Liam Girdwood <lgirdwood@gmail.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Tony Lindgren <tony@atomide.com>,
	linux-omap <linux-omap@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH 1/4] regulator: Introduce OMAP regulator to control PMIC over VC/VP
Date: Thu, 13 Jun 2013 08:39:50 -0500	[thread overview]
Message-ID: <20130613133950.GA32174@kahuna> (raw)
In-Reply-To: <20130610180150.GQ1403@sirena.org.uk>

On 19:01-20130610, Mark Brown wrote:
> On Mon, Jun 10, 2013 at 12:51:42PM -0500, Nishanth Menon wrote:
> 
> > a) Tegra seems to use Lookup Table for sending predefinied voltage
> > values to PMIC. OMAP has no concept of lookup table.
> 
> They seem to be doing basically the same thing here, you've got a linear
> map of selector to voltage too AFAICT.
> 
> > b) Tegra and OMAP h/w blocks seem to use I2C - that is good.
> > c) How about the i2c slave and register addresses, slew rates, start,
> > end voltages, max voltages that SoC can support etc, I am yet to
> > understand those.
> > d) OMAP has 3 modules - AVS (SmartReflex), Voltage Processor(VP),
> > Voltage Controller(VC) - I am not yet sure about the Tegra hardware
> > blocks involved.
> 
> This all seems like it's at the implementation detail level - the bit
> that seems like we should be able to share it is the big picture bit for
> how we describe how the AP side stuff and PMIC are hooked up without
> having to have a bunch of completely non-framework stuff for things
> like describing the PMIC.

I am having a bit of a difficulty trying to understand your concern
here.

Problem statement:
OMAP has this weird custom h/w where one programs the voltage and that
voltage is send over i2c - this is not same as Tegra's lookup table
array which automatically sends out entries, in OMAP, software has to trigger
the voltage transition
This path is split into 3 different modules - AVS, VC, VP -> This is
implementation detail as you already mentioned.

Anyhow, to recap, the overview of the hardware interface is as follows:
PMIC that OMAP interfaces to are of two categories:
a) ones that talk only on the custom OMAP VC path
b) ones that talk both custom OMAP VC and regular i2c (e.g.
   twl4030,6030,palmas)

The voltage control for a voltage rail (e.g. vdd_mpu) is again PMIC
specific
a) 6030 will not allow voltage to be set over regular i2c
b) 4030 allows either custom i2c path OR regular i2c path (only 1 at a
   time).
c) palmas allows both custom i2c path AND regular i2c path to set
   voltage!

>From a Linux angle, when using regular i2c, it is a piece of cake. Standard
regulator uses regular i2c, vc-vp angle avoided
Example: Palmas: we'd use the regular palmas driver to do this.

When using custom i2c path(vc/vp/avs), it gets a bit complex
We'd like (if possible) drivers like cpufreq to be ignorant of regulator
and transfer path used ofcourse as this depends on the board component
selection.
E.g. 4030/palmas/6030 vdd_mpu can be represented as a regulator, which in turn
uses custom OMAP data transfer path to set voltage

I was trying to understand your statement as to what Paul was doing
(which was basically pull out the vsel values and put them in his
 hardware lookup table for h/w to auto send the voltage) Vs what I was
attempting to do (describe OMAP's view of the PMIC and provide data
path).
In my view, we were trying to do "voltage scale" in two completely
different ways depending on the SoC we were working on.

If your concern was describing PMIC parameters in dts, I can easily move
them inside the omap_pmic driver and provide required compatible flags.
If, on the other hand, the entire approach followed is flawed, I'd like to
understand the rationale for the same.

-- 
Regards,
Nishanth Menon

  reply	other threads:[~2013-06-13 13:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-22 18:18 [RFC PATCH 0/4] regulator/OMAP: support VC/VP support in dts Nishanth Menon
2013-05-22 18:18 ` [RFC PATCH 1/4] regulator: Introduce OMAP regulator to control PMIC over VC/VP Nishanth Menon
     [not found]   ` <1369246717-4167-2-git-send-email-nm-l0cyMroinI0@public.gmane.org>
2013-06-10 10:31     ` Mark Brown
2013-06-10 16:16       ` Nishanth Menon
     [not found]         ` <CAGo_u6qTiPpd0DDe3jnPh_UxTwox22azhcMGy=fftL8H+DGeyw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-10 16:49           ` Mark Brown
2013-06-10 17:51             ` Nishanth Menon
     [not found]               ` <CAGo_u6ov=yaCwt8apbvW57ErAvhgUBHHw9gwADBC1fJUrfucUQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-10 18:01                 ` Mark Brown
2013-06-13 13:39                   ` Nishanth Menon [this message]
2013-06-13 14:47                     ` Mark Brown
2013-06-13 14:58                       ` Nishanth Menon
2013-06-13 15:07                         ` Mark Brown
2013-06-13 15:12                           ` Nishanth Menon
     [not found] ` <1369246717-4167-1-git-send-email-nm-l0cyMroinI0@public.gmane.org>
2013-05-22 18:18   ` [RFC PATCH 2/4] PM / AVS: Introduce support for OMAP Voltage Controller(VC) with device tree nodes Nishanth Menon
2013-05-22 18:18   ` [RFC PATCH 3/4] PM / AVS: Introduce support for OMAP Voltage Processor(VP) " Nishanth Menon
2013-05-22 18:18 ` [RFC PATCH 4/4] HACK: OMAP4460/TPS/TWL/PandaBoardES - Enable VP regulator for cpufreq Nishanth Menon

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=20130613133950.GA32174@kahuna \
    --to=nm@ti.com \
    --cc=broonie@kernel.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grygorii.strashko@ti.com \
    --cc=khilman@deeprootsystems.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=tony@atomide.com \
    /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).