linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	"max.oss.09@gmail.com" <max.oss.09@gmail.com>,
	"geert@linux-m68k.org" <geert@linux-m68k.org>
Cc: "linux-imx@nxp.com" <linux-imx@nxp.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	Francesco Dolcini <francesco.dolcini@toradex.com>,
	"robh@kernel.org" <robh@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org"
	<krzysztof.kozlowski+dt@linaro.org>,
	"ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
	"biju.das.jz@bp.renesas.com" <biju.das.jz@bp.renesas.com>,
	"bjorn.andersson@linaro.org" <bjorn.andersson@linaro.org>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
	"dmitry.baryshkov@linaro.org" <dmitry.baryshkov@linaro.org>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"vkoul@kernel.org" <vkoul@kernel.org>,
	"geert+renesas@glider.be" <geert+renesas@glider.be>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"khilman@kernel.org" <khilman@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	Andrejs Cainikovs <andrejs.cainikovs@toradex.com>,
	"will@kernel.org" <will@kernel.org>,
	"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>,
	"rafael@kernel.org" <rafael@kernel.org>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Max Krummenacher <max.krummenacher@toradex.com>
Subject: Re: [PATCH v1 0/5] power: domain: Add driver for a PM domain provider which controls
Date: Wed, 15 Jun 2022 13:48:20 -0700	[thread overview]
Message-ID: <b21dab64-1e5b-eaab-2e74-e95a22ca6e82@linaro.org> (raw)
In-Reply-To: <8decc5b6d1f0bc028d60d444d939da4408e756d3.camel@toradex.com>

On 15/06/2022 11:13, Marcel Ziswiler wrote:
> On Wed, 2022-06-15 at 10:37 -0700, Krzysztof Kozlowski wrote:
>> On 15/06/2022 10:31, Marcel Ziswiler wrote:
>>> Hi
>>>
>>> On Wed, 2022-06-15 at 10:15 -0700, Krzysztof Kozlowski wrote:
>>>> On 15/06/2022 09:10, Max Krummenacher wrote:
>>>>> Hi
>>>>>
>>>>> On Tue, Jun 14, 2022 at 9:22 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>>>>>>
>>>>>> Hi Rob,
>>>>>>
>>>>>> On Mon, Jun 13, 2022 at 9:15 PM Rob Herring <robh@kernel.org> wrote:
>>>>>>> On Thu, Jun 09, 2022 at 05:08:46PM +0200, Max Krummenacher wrote:
>>>>>>>> From: Max Krummenacher <max.krummenacher@toradex.com>
>>>>>>>>
>>>>>>>> its power enable by using a regulator.
>>>>>>>>
>>>>>>>> The currently implemented PM domain providers are all specific to
>>>>>>>> a particular system on chip.
>>>>>>>
>>>>>>> Yes, power domains tend to be specific to an SoC... 'power-domains' is
>>>>>>> supposed to be power islands in a chip. Linux 'PM domains' can be
>>>>>>> anything...
>>>>>
>>>>> I don't see why such power islands should be restricted to a SoC. You can
>>>>> build the exact same idea on a PCB or even more modular designs.
>>>>
>>>> In the SoC these power islands are more-or-less defined. These are real
>>>> regions gated by some control knob.
>>>>
>>>> Calling few devices on a board "power domain" does not make it a power
>>>> domain. There is no grouping, there is no control knob.
>>>>
>>>> Aren't you now re-implementing regulator supplies? How is this different
>>>> than existing supplies?
>>>
>>> I believe the biggest difference between power-domains and regulator-supplies lays in the former being
>>> driver
>>> agnostic while the later is driver specific. 
>>
>> That's one way to look, but the other way (matching the bindings
>> purpose) is to look at hardware. You have physical wire / voltage rail
>> supply - use regulator supply. In the terms of the hardware - what is
>> that power domain? It's a concept, not a physical object.
> 
> Well, but how can that concept then exist within the SoC but not outside? I don't get it. Isn't it just the
> exact same physical power gating thingy whether inside the SoC or on a PCB?
> 
>>> Meaning with power-domains one can just add such arbitrary
>>> structure to the device tree without any further driver specific changes/handling required. While with
>>> regulator-supplies each and every driver actually needs to have driver specific handling thereof added. Or
>>> do I
>>> miss anything?
>>
>> Thanks for clarification but I am not sure if it matches the purpose of
>> bindings and DTS. You can change the implementation as well to have
>> implicit regulators. No need for new bindings for that.
> 
> Okay, maybe that would also work, of course. So basically add a new binding 

That I did not propose. :) We have a binding for regulator supplies so
you do no need a new one.

> which allows adding regulators to
> arbitrary nodes which then will be generically handled by e.g. runtime PM. Almost something like assigned-
> clocks [1] you mean? I guess that could work. Remember that's why Max posted it as an RFC to get such feedback.
> Thanks for further refining those ideas.

DTS and bindings describe here the hardware, so focus on that. Device is
supplied by some regulator which I assume can be controlled by GPIO. I
don't think you need new bindings for that.

Implementation of bindings, so Linux driver, is different thing.

> 
>>> We are really trying to model something where a single GPIO pin (via a GPIO regulator or whatever) can
>>> control
>>> power to a variety of on-board peripherals. And, of course, we envision runtime PM actually making use of
>>> it
>>> e.g. when doing suspend/resume.
>>
>> And this GPIO pin controls what? Some power switch which cuts the power
>> of one regulator or many?
> 
> Well, that doesn't really matter. Resp. this part one should be able to sufficiently model using whatever
> available regulator lore we already have (e.g. whatever delays/times).
> 
>> If many different regulators, how do you
>> handle small differences in ramp up time?
> 
> Well, I don't think this is any different to any other regulator(s), not? Them HW folks will just need to tell
> us some reasonable numbers for those delays/times.

Probably... I just wonder how that would work in practice.


Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-06-15 20:49 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-09 15:08 [PATCH v1 0/5] power: domain: Add driver for a PM domain provider which controls Max Krummenacher
2022-06-09 15:08 ` [RFC PATCH v1 4/5] arm64: defconfig: Enable generic power domain controller controlling a regulator Max Krummenacher
2022-06-09 15:08 ` [RFC PATCH v1 5/5] ARM64: verdin-imx8mm: use regulator power domain to model sleep-moci Max Krummenacher
2022-06-14  7:29   ` Geert Uytterhoeven
2022-06-15 15:32     ` Max Krummenacher
2022-06-13 19:15 ` [PATCH v1 0/5] power: domain: Add driver for a PM domain provider which controls Rob Herring
2022-06-14  7:22   ` Geert Uytterhoeven
2022-06-15 16:10     ` Max Krummenacher
2022-06-15 17:15       ` Krzysztof Kozlowski
2022-06-15 17:31         ` Marcel Ziswiler
2022-06-15 17:37           ` Krzysztof Kozlowski
2022-06-15 18:13             ` Marcel Ziswiler
2022-06-15 18:48               ` Dmitry Baryshkov
2022-06-15 20:48               ` Krzysztof Kozlowski [this message]
2022-06-15 18:24           ` Robin Murphy
2022-06-15 19:12             ` Mark Brown
2022-06-15 21:14 ` Ulf Hansson
2022-06-16 12:50 ` Linus Walleij
2022-06-23 16:14   ` Max Krummenacher
2022-07-13 11:43     ` Ulf Hansson
2022-07-18  9:49       ` Linus Walleij
2022-07-26 16:03       ` Francesco Dolcini
2022-07-28  9:37         ` Ulf Hansson
2022-07-28 11:21           ` Francesco Dolcini
2022-08-26 13:50             ` Ulf Hansson
2022-09-09 14:22               ` Francesco Dolcini
2022-09-22 13:49                 ` Ulf Hansson
2022-09-23 18:00                   ` Krzysztof Kozlowski
2022-09-26 10:12                     ` Ulf Hansson
2022-09-26 15:11                       ` Krzysztof Kozlowski
2022-09-27  9:48                         ` Ulf Hansson
2022-09-27 12:49                           ` Geert Uytterhoeven
2022-09-27 14:26                             ` Krzysztof Kozlowski
2022-09-28  7:59                               ` Ulf Hansson

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=b21dab64-1e5b-eaab-2e74-e95a22ca6e82@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=andrejs.cainikovs@toradex.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=festevam@gmail.com \
    --cc=francesco.dolcini@toradex.com \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=kernel@pengutronix.de \
    --cc=khilman@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=marcel.ziswiler@toradex.com \
    --cc=max.krummenacher@toradex.com \
    --cc=max.oss.09@gmail.com \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=vkoul@kernel.org \
    --cc=will@kernel.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).