All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Gerlach <d-gerlach@ti.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Rob Herring <robh@kernel.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Tero Kristo <t-kristo@ti.com>,
	"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: Mon, 23 Jan 2017 14:11:02 -0600	[thread overview]
Message-ID: <ec2f1697-4c60-fd88-6593-2a69ca7f5c83@ti.com> (raw)
In-Reply-To: <CAPDyKFpTyn2isNahywmOOSWiZKov9xsudyWi_i-FejXjC+1AZw@mail.gmail.com>

On 01/20/2017 10:52 AM, Ulf Hansson wrote:
> [...]
>
>>>> 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.
>>>
>>> To me, this seems like the best possible solution.
>>>
>>> However, perhaps we should also consider the SCPI Generic power domain
>>> (drivers/firmware/scpi_pm_domain.c), because I believe it's closely
>>> related.
>>> To change the power state of a device, this PM domain calls
>>> scpi_device_set|get_power_state() (drivers/firmware/arm_scpi.c), which
>>> also needs a device id as a parameter. Very similar to our case with
>>> the TI SCI domain.
>>>
>>> Currently these SCPI device ids lacks corresponding DT bindings, so
>>> the scpi_pm_domain tries to work around it by assigning ids
>>> dynamically at genpd creation time.
>>>
>>> That makes me wonder, whether we should think of something common/generic?
>>
>> When you say something common/generic, do you mean a better binding for genpd,
>> or something bigger than that like a new driver? Because I do think a phandle
>> cell left open for the genpd provider to interpret solves both the scpi and
>> ti-sci problem we are facing here in the best way. Using generic PM domains lets
>> us do exactly what we want apart from interpreting the phandle cell with our
>> driver, and I feel like anything else we try at this point is just going to be
>> to work around that. Is bringing back genpd xlate something we can discuss?
>
> Bringing back xlate, how would that help? Wouldn't that just mean that
> you will get one genpd per device? That's not an option, I think we
> are all in agreement to that.

Sure, perhaps the custom xlate wouldn't be the right way to do it, as we 
wouldn't be able to associate a device directly to a phandle, at least 
with how it was implemented before, but I think we can skip that 
entirely. Does opening up the interpretation of the cells of the 
'power-domains' phandle not solve all of these issues? Is that out of 
the question?

genpd_xlate_simple currently just makes sure the args_count of the 
'power-domains' phandle was zero and bails if it was not. Why couldn't 
we remove this check and let the driver interpret it while still using 
of_genpd_add_provider_simple to register the provider? It's still a 
'simple' provider from the perspective of the genpd framework and the 
actual pm domain mapping will not change, but now the driver can parse 
the cells and do whatever it needs to, such as reading a device id.

I think that's a bit more flexible and will avoid breaking anything that 
is there today.

Regards,
Dave

>
> Or am I missing something here?
>
> Regarding something "common/generic", I was merely thinking of some
> common bindings describing the list of phandle to device ids mapping.
> However, let's not make this more complicated than it is already. So
> please just ignore my suggestion so we can make this work for your
> case first.
>
> However, maybe I didn't fully understood Rob's suggestion. Perhaps Rob
> can clarify once more.
>
> Anyway, this is how interpreted Rob's suggestion:
>
> TISCI_PM_DOMAIN_DEVLIST: tisci-pm-domain-devlist {
>      devs = <&serial0>, <&mmc0>;
>      devids = <5 10>;
> }
>
> With this, you should be to extract the devid which corresponds to the
> device that has been attached to the TI SCI PM domain. Don't you
> think?
>
> Kind regards
> Uffe
>

WARNING: multiple messages have this Message-ID (diff)
From: Dave Gerlach <d-gerlach-l0cyMroinI0@public.gmane.org>
To: Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Kevin Hilman <khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
	Tero Kristo <t-kristo-l0cyMroinI0@public.gmane.org>,
	"Rafael J . Wysocki"
	<rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Nishanth Menon <nm-l0cyMroinI0@public.gmane.org>,
	Keerthy <j-keerthy-l0cyMroinI0@public.gmane.org>,
	Russell King <rmk+kernel-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>,
	Sudeep Holla <sudeep.holla-5wv7dgnIgG8@public.gmane.org>,
	Santosh Shilimkar
	<ssantosh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Lokesh Vutla <lokeshvutla-l0cyMroinI0@public.gmane.org>
Subject: Re: [PATCH v3 2/4] dt-bindings: Add TI SCI PM Domains
Date: Mon, 23 Jan 2017 14:11:02 -0600	[thread overview]
Message-ID: <ec2f1697-4c60-fd88-6593-2a69ca7f5c83@ti.com> (raw)
In-Reply-To: <CAPDyKFpTyn2isNahywmOOSWiZKov9xsudyWi_i-FejXjC+1AZw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 01/20/2017 10:52 AM, Ulf Hansson wrote:
> [...]
>
>>>> 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.
>>>
>>> To me, this seems like the best possible solution.
>>>
>>> However, perhaps we should also consider the SCPI Generic power domain
>>> (drivers/firmware/scpi_pm_domain.c), because I believe it's closely
>>> related.
>>> To change the power state of a device, this PM domain calls
>>> scpi_device_set|get_power_state() (drivers/firmware/arm_scpi.c), which
>>> also needs a device id as a parameter. Very similar to our case with
>>> the TI SCI domain.
>>>
>>> Currently these SCPI device ids lacks corresponding DT bindings, so
>>> the scpi_pm_domain tries to work around it by assigning ids
>>> dynamically at genpd creation time.
>>>
>>> That makes me wonder, whether we should think of something common/generic?
>>
>> When you say something common/generic, do you mean a better binding for genpd,
>> or something bigger than that like a new driver? Because I do think a phandle
>> cell left open for the genpd provider to interpret solves both the scpi and
>> ti-sci problem we are facing here in the best way. Using generic PM domains lets
>> us do exactly what we want apart from interpreting the phandle cell with our
>> driver, and I feel like anything else we try at this point is just going to be
>> to work around that. Is bringing back genpd xlate something we can discuss?
>
> Bringing back xlate, how would that help? Wouldn't that just mean that
> you will get one genpd per device? That's not an option, I think we
> are all in agreement to that.

Sure, perhaps the custom xlate wouldn't be the right way to do it, as we 
wouldn't be able to associate a device directly to a phandle, at least 
with how it was implemented before, but I think we can skip that 
entirely. Does opening up the interpretation of the cells of the 
'power-domains' phandle not solve all of these issues? Is that out of 
the question?

genpd_xlate_simple currently just makes sure the args_count of the 
'power-domains' phandle was zero and bails if it was not. Why couldn't 
we remove this check and let the driver interpret it while still using 
of_genpd_add_provider_simple to register the provider? It's still a 
'simple' provider from the perspective of the genpd framework and the 
actual pm domain mapping will not change, but now the driver can parse 
the cells and do whatever it needs to, such as reading a device id.

I think that's a bit more flexible and will avoid breaking anything that 
is there today.

Regards,
Dave

>
> Or am I missing something here?
>
> Regarding something "common/generic", I was merely thinking of some
> common bindings describing the list of phandle to device ids mapping.
> However, let's not make this more complicated than it is already. So
> please just ignore my suggestion so we can make this work for your
> case first.
>
> However, maybe I didn't fully understood Rob's suggestion. Perhaps Rob
> can clarify once more.
>
> Anyway, this is how interpreted Rob's suggestion:
>
> TISCI_PM_DOMAIN_DEVLIST: tisci-pm-domain-devlist {
>      devs = <&serial0>, <&mmc0>;
>      devids = <5 10>;
> }
>
> With this, you should be to extract the devid which corresponds to the
> device that has been attached to the TI SCI PM domain. Don't you
> think?
>
> Kind regards
> Uffe
>

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: d-gerlach@ti.com (Dave Gerlach)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/4] dt-bindings: Add TI SCI PM Domains
Date: Mon, 23 Jan 2017 14:11:02 -0600	[thread overview]
Message-ID: <ec2f1697-4c60-fd88-6593-2a69ca7f5c83@ti.com> (raw)
In-Reply-To: <CAPDyKFpTyn2isNahywmOOSWiZKov9xsudyWi_i-FejXjC+1AZw@mail.gmail.com>

On 01/20/2017 10:52 AM, Ulf Hansson wrote:
> [...]
>
>>>> 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.
>>>
>>> To me, this seems like the best possible solution.
>>>
>>> However, perhaps we should also consider the SCPI Generic power domain
>>> (drivers/firmware/scpi_pm_domain.c), because I believe it's closely
>>> related.
>>> To change the power state of a device, this PM domain calls
>>> scpi_device_set|get_power_state() (drivers/firmware/arm_scpi.c), which
>>> also needs a device id as a parameter. Very similar to our case with
>>> the TI SCI domain.
>>>
>>> Currently these SCPI device ids lacks corresponding DT bindings, so
>>> the scpi_pm_domain tries to work around it by assigning ids
>>> dynamically at genpd creation time.
>>>
>>> That makes me wonder, whether we should think of something common/generic?
>>
>> When you say something common/generic, do you mean a better binding for genpd,
>> or something bigger than that like a new driver? Because I do think a phandle
>> cell left open for the genpd provider to interpret solves both the scpi and
>> ti-sci problem we are facing here in the best way. Using generic PM domains lets
>> us do exactly what we want apart from interpreting the phandle cell with our
>> driver, and I feel like anything else we try at this point is just going to be
>> to work around that. Is bringing back genpd xlate something we can discuss?
>
> Bringing back xlate, how would that help? Wouldn't that just mean that
> you will get one genpd per device? That's not an option, I think we
> are all in agreement to that.

Sure, perhaps the custom xlate wouldn't be the right way to do it, as we 
wouldn't be able to associate a device directly to a phandle, at least 
with how it was implemented before, but I think we can skip that 
entirely. Does opening up the interpretation of the cells of the 
'power-domains' phandle not solve all of these issues? Is that out of 
the question?

genpd_xlate_simple currently just makes sure the args_count of the 
'power-domains' phandle was zero and bails if it was not. Why couldn't 
we remove this check and let the driver interpret it while still using 
of_genpd_add_provider_simple to register the provider? It's still a 
'simple' provider from the perspective of the genpd framework and the 
actual pm domain mapping will not change, but now the driver can parse 
the cells and do whatever it needs to, such as reading a device id.

I think that's a bit more flexible and will avoid breaking anything that 
is there today.

Regards,
Dave

>
> Or am I missing something here?
>
> Regarding something "common/generic", I was merely thinking of some
> common bindings describing the list of phandle to device ids mapping.
> However, let's not make this more complicated than it is already. So
> please just ignore my suggestion so we can make this work for your
> case first.
>
> However, maybe I didn't fully understood Rob's suggestion. Perhaps Rob
> can clarify once more.
>
> Anyway, this is how interpreted Rob's suggestion:
>
> TISCI_PM_DOMAIN_DEVLIST: tisci-pm-domain-devlist {
>      devs = <&serial0>, <&mmc0>;
>      devids = <5 10>;
> }
>
> With this, you should be to extract the devid which corresponds to the
> device that has been attached to the TI SCI PM domain. Don't you
> think?
>
> Kind regards
> Uffe
>

  reply	other threads:[~2017-01-23 20:13 UTC|newest]

Thread overview: 100+ 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 ` Dave Gerlach
2017-01-04 20:55 ` 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   ` Dave Gerlach
2017-01-04 20:55   ` Dave Gerlach
2017-01-04 20:55 ` [PATCH v3 2/4] dt-bindings: Add TI SCI PM Domains Dave Gerlach
2017-01-04 20:55   ` Dave Gerlach
2017-01-04 20:55   ` Dave Gerlach
2017-01-09 17:50   ` Rob Herring
2017-01-09 17:50     ` Rob Herring
2017-01-09 17:50     ` Rob Herring
2017-01-09 17:57     ` Dave Gerlach
2017-01-09 17:57       ` Dave Gerlach
2017-01-09 17:57       ` Dave Gerlach
2017-01-11 21:34       ` Rob Herring
2017-01-11 21:34         ` Rob Herring
2017-01-11 21:34         ` Rob Herring
2017-01-12 15:27         ` Dave Gerlach
2017-01-12 15:27           ` Dave Gerlach
2017-01-12 15:27           ` Dave Gerlach
2017-01-13 19:25           ` Rob Herring
2017-01-13 19:25             ` Rob Herring
2017-01-13 19:25             ` Rob Herring
2017-01-13 20:28             ` Dave Gerlach
2017-01-13 20:28               ` Dave Gerlach
2017-01-13 20:28               ` Dave Gerlach
2017-01-14  2:40               ` Rob Herring
2017-01-14  2:40                 ` Rob Herring
2017-01-14  2:40                 ` Rob Herring
2017-01-16 22:12                 ` Dave Gerlach
2017-01-16 22:12                   ` Dave Gerlach
2017-01-16 22:12                   ` Dave Gerlach
2017-01-17  7:48                   ` Tero Kristo
2017-01-17  7:48                     ` Tero Kristo
2017-01-17  7:48                     ` Tero Kristo
2017-01-17 23:37                     ` Rob Herring
2017-01-17 23:37                       ` Rob Herring
2017-01-17 23:37                       ` Rob Herring
2017-01-18  0:07                     ` Kevin Hilman
2017-01-18  0:07                       ` Kevin Hilman
2017-01-18  0:07                       ` Kevin Hilman
2017-01-18 23:03                       ` Rob Herring
2017-01-18 23:03                         ` Rob Herring
2017-01-18 23:03                         ` Rob Herring
2017-01-20 14:00                         ` Ulf Hansson
2017-01-20 14:00                           ` Ulf Hansson
2017-01-20 14:00                           ` Ulf Hansson
2017-01-20 14:18                           ` Sudeep Holla
2017-01-20 14:18                             ` Sudeep Holla
2017-01-20 14:18                             ` Sudeep Holla
2017-01-20 14:20                           ` Dave Gerlach
2017-01-20 14:20                             ` Dave Gerlach
2017-01-20 14:20                             ` Dave Gerlach
2017-01-20 16:52                             ` Ulf Hansson
2017-01-20 16:52                               ` Ulf Hansson
2017-01-20 16:52                               ` Ulf Hansson
2017-01-23 20:11                               ` Dave Gerlach [this message]
2017-01-23 20:11                                 ` Dave Gerlach
2017-01-23 20:11                                 ` Dave Gerlach
2017-01-24 10:03                                 ` Ulf Hansson
2017-01-24 10:03                                   ` Ulf Hansson
2017-01-24 10:03                                   ` Ulf Hansson
2017-01-25 16:59                                   ` Dave Gerlach
2017-01-25 16:59                                     ` Dave Gerlach
2017-01-25 16:59                                     ` Dave Gerlach
2017-01-25 21:13                                     ` Ulf Hansson
2017-01-25 21:13                                       ` Ulf Hansson
2017-01-25 21:13                                       ` Ulf Hansson
2017-01-25 22:32                                     ` Rob Herring
2017-01-25 22:32                                       ` Rob Herring
2017-01-25 22:32                                       ` Rob Herring
2017-01-26 15:09                                       ` Dave Gerlach
2017-01-26 15:09                                         ` Dave Gerlach
2017-01-26 15:09                                         ` Dave Gerlach
2017-01-26 16:00                                         ` Rob Herring
2017-01-26 16:00                                           ` Rob Herring
2017-01-26 16:00                                           ` Rob Herring
2017-01-26 16:01                               ` 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   ` Dave Gerlach
2017-01-04 20:55   ` Dave Gerlach
2017-01-04 20:55 ` [PATCH v3 4/4] ARM: keystone: Drop PM domain support for k2g Dave Gerlach
2017-01-04 20:55   ` Dave Gerlach
2017-01-04 20:55   ` 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 21:54   ` Santosh Shilimkar
2017-01-04 21:54   ` Santosh Shilimkar
2017-01-04 22:06   ` Dave Gerlach
2017-01-04 22:06     ` Dave Gerlach
2017-01-04 22:06     ` Dave Gerlach
2017-01-19 17:51     ` santosh.shilimkar
2017-01-19 17:51       ` santosh.shilimkar at oracle.com
2017-01-19 17:51       ` santosh.shilimkar
2017-01-19 18:59       ` Dave Gerlach
2017-01-19 18:59         ` Dave Gerlach
2017-01-19 18:59         ` Dave Gerlach
2017-01-19 19:04         ` Santosh Shilimkar
2017-01-19 19:04           ` Santosh Shilimkar
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=ec2f1697-4c60-fd88-6593-2a69ca7f5c83@ti.com \
    --to=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=robh@kernel.org \
    --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 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.