All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] PM / Domains: Add support for explicit control of PM domains
@ 2017-03-28 14:13 ` Jon Hunter
  0 siblings, 0 replies; 59+ messages in thread
From: Jon Hunter @ 2017-03-28 14:13 UTC (permalink / raw)
  To: Rafael J . Wysocki, Kevin Hilman, Ulf Hansson, geert, rnayak
  Cc: stanimir.varbanov, sboyd, Marek Szyprowski, linux-pm,
	linux-kernel, linux-tegra, Jon Hunter

The current generic PM domain framework (GenDP) only allows a single
PM domain to be associated with a given device. There are several
use-cases for various system-on-chip devices where it is necessary for
a PM domain consumer to control more than one PM domain where the PM
domains:
i).  Do not conform to a parent-child relationship so are not nested
ii). May not be powered on and off at the same time so need independent
     control.

The solution proposed in this RFC is to allow consumers to explictly
control PM domains, by getting a handle to a PM domain and explicitly
making calls to power on and off the PM domain. Note that referencing
counting is used to ensure that a PM domain shared between consumers
is not powered off incorrectly.

The Tegra124/210 XUSB subsystem (that consists of both host and device
controllers) is an example of a consumer that needs to control more than
one PM domain because the logic is partitioned across 3 PM domains which
are:
- XUSBA: Superspeed logic (for USB 3.0)
- XUSBB: Device controller
- XUSBC: Host controller

These power domains are not nested and can be powered-up and down
independently of one another. In practice different scenarios require
different combinations of the power domains, for example:
- Superspeed host: XUSBA and XUSBC
- Superspeed device: XUSBA and XUSBB

Although it could be possible to logically nest both the XUSBB and XUSBC
domains under the XUSBA, superspeed may not always be used/required and
so this would keep it on unnecessarily.

Given that Tegra uses device-tree for describing the hardware, it would
be ideal that the device-tree 'power-domains' property for generic PM
domains could be extended to allow more than one PM domain to be
specified. For example, define the following the Tegra210 xHCI device ...

	usb@70090000 {
		compatible = "nvidia,tegra210-xusb";
		...
		power-domains = <&pd_xusbhost>, <&pd_xusbss>;
		power-domain-names = "host", "superspeed";
	};

This RFC extends the generic PM domain framework to allow a device to
define more than one PM domain in the device-tree 'power-domains'
property. If there is more than one then the assumption is that these
PM domains will be controlled explicitly by the consumer and the device
will not be automatically bound to any PM domain.

This RFC is a follow-up to the following RFC but because it is a
completely different approach has not been titled V2.

https://lkml.org/lkml/2016/9/20/173

Jon Hunter (4):
  PM / Domains: Prepare for supporting explicit PM domain control
  PM / Domains: Add support for explicit control of PM domains
  PM / Domains: Add OF helpers for getting PM domains
  dt-bindings: Add support for devices with multiple PM domains

 .../devicetree/bindings/power/power_domain.txt     |  11 +-
 drivers/base/power/domain.c                        | 203 ++++++++++++++++++++-
 include/linux/pm_domain.h                          |  35 ++++
 3 files changed, 246 insertions(+), 3 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 59+ messages in thread

end of thread, other threads:[~2017-10-10  9:13 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28 14:13 [RFC PATCH 0/4] PM / Domains: Add support for explicit control of PM domains Jon Hunter
2017-03-28 14:13 ` Jon Hunter
2017-03-28 14:14 ` [RFC PATCH 1/4] PM / Domains: Prepare for supporting explicit PM domain control Jon Hunter
2017-03-28 14:14   ` Jon Hunter
2017-03-28 14:14 ` [RFC PATCH 2/4] PM / Domains: Add support for explicit control of PM domains Jon Hunter
2017-03-28 14:14   ` Jon Hunter
     [not found]   ` <1490710443-27425-3-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-04-10  4:09     ` Rajendra Nayak
2017-04-10  4:09       ` Rajendra Nayak
2017-04-10  8:24       ` Jon Hunter
2017-04-10  8:24         ` Jon Hunter
     [not found]         ` <3135e238-48a3-3693-bb59-63bf2a6d8d0e-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-04-10 10:02           ` Rajendra Nayak
2017-04-10 10:02             ` Rajendra Nayak
2017-04-10 19:48             ` Jon Hunter
2017-04-10 19:48               ` Jon Hunter
2017-03-28 14:14 ` [RFC PATCH 3/4] PM / Domains: Add OF helpers for getting " Jon Hunter
2017-03-28 14:14   ` Jon Hunter
     [not found] ` <1490710443-27425-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-03-28 14:14   ` [RFC PATCH 4/4] dt-bindings: Add support for devices with multiple " Jon Hunter
2017-03-28 14:14     ` Jon Hunter
2017-04-10  4:12     ` Rajendra Nayak
     [not found]       ` <3f96256d-0de5-26a2-e656-7912e06806ea-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-04-10  8:24         ` Jon Hunter
2017-04-10  8:24           ` Jon Hunter
2017-04-25 11:13   ` [RFC PATCH 0/4] PM / Domains: Add support for explicit control of " Jon Hunter
2017-04-25 11:13     ` Jon Hunter
     [not found]     ` <d2e3ceaa-57e2-033d-ecd1-a3b2bd8ffa26-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-04-25 19:34       ` Ulf Hansson
2017-04-25 19:34         ` Ulf Hansson
     [not found]         ` <CAPDyKFoJ58pwGz2U90ob8a8cY=hEbE-wLBHZ0BBzqPoLW_wgGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-25 21:17           ` Rafael J. Wysocki
2017-04-25 21:17             ` Rafael J. Wysocki
     [not found]             ` <CAJZ5v0gMzN_zfC_2nnRtYFyFon3-_mnioQhNbDP0wsr91RnagA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-02 10:10               ` Jon Hunter
2017-05-02 10:10                 ` Jon Hunter
     [not found]                 ` <ffe13074-9113-0a20-0fa6-76d0209dadfc-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-05-02 21:51                   ` Rafael J. Wysocki
2017-05-02 21:51                     ` Rafael J. Wysocki
2017-05-03  8:12                     ` Ulf Hansson
     [not found]                       ` <CAPDyKFokVKZfRAsEAB6ihx1FxW4JjarionyOwCATr3s+QW4aMg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-03  8:32                         ` Jon Hunter
2017-05-03  8:32                           ` Jon Hunter
2017-05-03  8:32                           ` Jon Hunter
     [not found]                           ` <b4e8fd34-e2f0-165d-aa22-32ba43a8dbed-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-05-03 13:43                             ` Ulf Hansson
2017-05-03 13:43                               ` Ulf Hansson
     [not found]                               ` <CAPDyKFo-hfwbrY+AEMt0=fMshiT-BWvYDvGkKGqquTdowUvWHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-03 14:57                                 ` Jon Hunter
2017-05-03 14:57                                   ` Jon Hunter
2017-05-03 17:12                                   ` Ulf Hansson
2017-05-04  8:44                                     ` Jon Hunter
2017-05-30  3:41                                       ` Rajendra Nayak
     [not found]                                         ` <5fcfeda6-f95c-cdaa-73a5-5c7499a3f9f5-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-10-09 16:36                                           ` Todor Tomov
2017-10-09 16:36                                             ` Todor Tomov
     [not found]                                             ` <72397ec8-d169-c5b1-2120-459031b35d48-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-10-10  9:13                                               ` Jon Hunter
2017-10-10  9:13                                                 ` Jon Hunter
     [not found]                     ` <1832647.f77WMLkdQb-yvgW3jdyMHm1GS7QM15AGw@public.gmane.org>
2017-05-03  8:12                       ` Jon Hunter
2017-05-03  8:12                         ` Jon Hunter
2017-04-26  8:06         ` Geert Uytterhoeven
     [not found]           ` <CAMuHMdWvS6_Zf1nn1=zVLb1qNChyk+B6BDZsK9P9oKRBEpPKMg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-26  9:04             ` Ulf Hansson
2017-04-26  9:04               ` Ulf Hansson
     [not found]               ` <CAPDyKFqqZPXpxCTDy079QeiAorLVrXZssQ5SvXLWa3oab21b5g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-26  9:17                 ` Geert Uytterhoeven
2017-04-26  9:17                   ` Geert Uytterhoeven
     [not found]                   ` <CAMuHMdWNnWdYop_U4BGznxDND3WK-V7hnCBbnPoUDzUHBBpgHA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-26  9:55                     ` Ulf Hansson
2017-04-26  9:55                       ` Ulf Hansson
     [not found]                       ` <CAPDyKFrg+L_U6ztzpUdQMuemXyPWvtWVt06GumXa1MoTjJesWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-03  6:43                         ` Geert Uytterhoeven
2017-05-03  6:43                           ` Geert Uytterhoeven
     [not found]                           ` <CAMuHMdXr6-pKb0wRfs0_HhNp75ikGOtd-n2mEY-fvVJhaU5idg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-03  8:54                             ` Geert Uytterhoeven
2017-05-03  8:54                               ` Geert Uytterhoeven

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.