[PATCH 2/7] dt-bindings: power: Add apple,pmgr-pwrstate binding

Hector Martin marcan at marcan.st
Sun Oct 10 21:42:30 PDT 2021


On 07/10/2021 22.12, Krzysztof Kozlowski wrote:
>>>> +  power-domains:
>>>> +    description:
>>>> +      Reference to parent power domains. A domain may have multiple parents,
>>>> +      and all will be powered up when it is powered.
>>>
>>> How many items?
>>
>> One or more (if there are none the property should not exist). I guess
>> that should be encoded.
> 
> Probably this should not go without any constraints. Are you sure it
> could have more than one? It would mean more than one parent.

Yes, at least that is the way Apple describes it in their device tree. 
As I understand it, this is basically a dependency tree of SoC blocks 
that need to be powered up/clocked for a downstream device to work. In 
other words, it's not just a pure clock/power tree, but also represents 
blocks of logic that are shared between devices. So, for example, the 
ADT has relationships like these:

SIO_BUSIF parents: (none)
SIO       parents: SIO_BUSIF
PMS_BUSIF parents: (none)
PMS       parents: (none)
AUDIO_P   parents: SIO
SIO_ADMA  parents: SIO, PMS
MCA0      parents: AUDIO_P, SIO_ADMA

That said, we know some of the data from the ADT is dodgy and doesn't 
match the true hardware (see also the dependency from SIO to SIO_BUSIF 
there, but not from PMS to PMS_BUSIF, which feels wrong), so as we learn 
more about the real relationships between these domains we'll adjust the 
devicetree to better reflect the hardware layout.

There is also the case that even if technically a downstream device 
depends on two domains (directly), the existing genpd infrastructure 
doesn't handle that automatically like it does the single domain case, 
so it ends up making sense to just have some extra domain-domain 
dependencies to keep a bunch of boilerplate manual genpd handling code 
out of device drivers.

-- 
Hector Martin (marcan at marcan.st)
Public Key: https://mrcn.st/pub



More information about the linux-arm-kernel mailing list