linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Kevin Hilman <khilman@baylibre.com>
Cc: Tero Kristo <t-kristo@ti.com>, Dave Gerlach <d-gerlach@ti.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Nishanth Menon <nm@ti.com>, Keerthy <j-keerthy@ti.com>,
	Russell King <rmk+kernel@armlinux.org.uk>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Lokesh Vutla <lokeshvutla@ti.com>
Subject: Re: [PATCH v3 2/4] dt-bindings: Add TI SCI PM Domains
Date: Wed, 18 Jan 2017 17:03:18 -0600	[thread overview]
Message-ID: <CAL_Jsq+Vp8iYrAUmuSRzeeY_G6CUqFqG6XB6erDxo1RYo3g4=g@mail.gmail.com> (raw)
In-Reply-To: <m2ziip2puf.fsf@baylibre.com>

On Tue, Jan 17, 2017 at 6:07 PM, Kevin Hilman <khilman@baylibre.com> wrote:
> Tero Kristo <t-kristo@ti.com> writes:
>> On 17/01/17 00:12, Dave Gerlach wrote:
>>> On 01/13/2017 08:40 PM, Rob Herring wrote:
>>>> On Fri, Jan 13, 2017 at 2:28 PM, Dave Gerlach <d-gerlach@ti.com> wrote:

[...]

>>>>> My ti,sci-id is not an index into a list of power domains, so it
>>>>> should not
>>>>> go in the power-domains cells and go against what the power-domains
>>>>> binding
>>>>> says that the cell expects. We have one single power domain, and the new
>>>>> ti,sci-id binding is not something the genpd framework itself is
>>>>> concerned
>>>>> with as it's our property to identify a device inside a power domain,
>>>>> not to
>>>>> identify which power domain it is associated with.
>>>>
>>>> What is the id used for? I can understand why you need to know what
>>>> power domain a device is in (as power-domains identifies), but not
>>>> what devices are in a power domain.
>>>
>>> We have a system control processor that provides power management
>>> services to the OS and it responsible for handling the power state of
>>> each device. This control happens over a communication interface we have
>>> called TI SCI (implemented at drivers/firmware/ti-sci.c). The
>>> communication protocol uses these ids to identify each device within the
>>> power domain so that the control processor can do what is necessary to
>>> enable that device.
>>
>> I think a minor detail here that Rob might be missing right now is,
>> that the ti,sci-id is only controlling the PM runtime handling, and
>> providing the ID per-device for this purpose only. AFAIK, it is not
>> really connected to the power domain anymore as such, as we don't have
>> power-domains / per device anymore as was the case in some earlier
>> revision of this work.
>
> I think this gets to the heart of things.  IMO The confusion arises
> because we're throwing around the term "power domain" when there isn't
> an actual hardware power domain here.

I thought there was 1.

> Unfortunately, the genpd bindings have used the terminology power-domain
> when in fact genpd is more generic than that and can be used not just
> for hardware power domains, but for arbitrary grouping of devices that
> have common PM properties.  That's why genpd actually stands for generic
> PM domain, not power domain.  Unfortunately, the bindings have grown
> primarily out of the usage for hardware power domains.

Now it makes some sense.

So the question is does this PM domain grouping need to be described
in DT or not, and if so what does that look like?

We could continue to use the power domain binding (maybe we already
are and that ship has sailed). I'm not totally against the idea even
if there is no power domain, but I'm not sold on it either. If we do
go this route, then I still say the id should be a cell in the
power-domain phandle.

Another option is create something new either common or TI SCI
specific. It could be just a table of ids and phandles in the SCI
node. I'm much more comfortable with an isolated property in one node
than something scattered throughout the DT.

>> One could argue though that the whole usage of power-domains is now
>> moot, as we basically only have implemented one genpd in the whole
>> SoC, which doesn't really reflect the reality. I wonder if better
>> approach would be to have this replaced with proper power domains at
>> some point (if needed), and just have a runtime-pm implementation in
>> place for the devices that require it.
>>
>> So, as an example in DT, we would only have:
>>
>> uart0: serial@02530c00 {
>>   compatible = "xyz";
>>   ...
>>   ti,sci-id = <K2G_DEV_UART0>;
>> };
>>
>> This is somewhat analogous to what OMAP family of SoCs have in place
>> now, under "ti,hwmods" property. I also wonder if the "ti,sci-id"
>> should be replaced with something like "ti,sci-dev-id" to make its
>> purpose clearer.
>
> Unless I'm missing something, that still begs the question of who reads
> that property and takes care of the call into TI-SCI though.
>
> Kevin

  reply	other threads:[~2017-01-18 23:06 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04 20:55 [PATCH v3 0/4] ARM: K2G: Add support for TI-SCI Generic PM Domains Dave Gerlach
2017-01-04 20:55 ` [PATCH v3 1/4] PM / Domains: Add generic data pointer to genpd data struct Dave Gerlach
2017-01-04 20:55 ` [PATCH v3 2/4] dt-bindings: Add TI SCI PM Domains Dave Gerlach
2017-01-09 17:50   ` Rob Herring
2017-01-09 17:57     ` Dave Gerlach
2017-01-11 21:34       ` Rob Herring
2017-01-12 15:27         ` Dave Gerlach
2017-01-13 19:25           ` Rob Herring
2017-01-13 20:28             ` Dave Gerlach
2017-01-14  2:40               ` Rob Herring
2017-01-16 22:12                 ` Dave Gerlach
2017-01-17  7:48                   ` Tero Kristo
2017-01-17 23:37                     ` Rob Herring
2017-01-18  0:07                     ` Kevin Hilman
2017-01-18 23:03                       ` Rob Herring [this message]
2017-01-20 14:00                         ` Ulf Hansson
2017-01-20 14:18                           ` Sudeep Holla
2017-01-20 14:20                           ` Dave Gerlach
2017-01-20 16:52                             ` Ulf Hansson
2017-01-23 20:11                               ` Dave Gerlach
2017-01-24 10:03                                 ` Ulf Hansson
2017-01-25 16:59                                   ` Dave Gerlach
2017-01-25 21:13                                     ` Ulf Hansson
2017-01-25 22:32                                     ` Rob Herring
2017-01-26 15:09                                       ` Dave Gerlach
2017-01-26 16:00                                         ` Rob Herring
2017-01-04 20:55 ` [PATCH v3 3/4] soc: ti: Add ti_sci_pm_domains driver Dave Gerlach
2017-01-04 20:55 ` [PATCH v3 4/4] ARM: keystone: Drop PM domain support for k2g Dave Gerlach
2017-01-04 21:54 ` [PATCH v3 0/4] ARM: K2G: Add support for TI-SCI Generic PM Domains Santosh Shilimkar
2017-01-04 22:06   ` Dave Gerlach
2017-01-19 17:51     ` santosh.shilimkar
2017-01-19 18:59       ` Dave Gerlach
2017-01-19 19:04         ` Santosh Shilimkar

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='CAL_Jsq+Vp8iYrAUmuSRzeeY_G6CUqFqG6XB6erDxo1RYo3g4=g@mail.gmail.com' \
    --to=robh@kernel.org \
    --cc=d-gerlach@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=j-keerthy@ti.com \
    --cc=khilman@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lokeshvutla@ti.com \
    --cc=nm@ti.com \
    --cc=rjw@rjwysocki.net \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=ssantosh@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=t-kristo@ti.com \
    --cc=ulf.hansson@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 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).