Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: power: Convert domain-idle-states bindings to json-schema

While converting to the json-schema, let's also take the opportunity to
further specify/clarify some more details about the DT binding.

For example, let's define the label where to put the states nodes, set a
pattern for nodename of the state nodes and finally add an example.

Fixes: a3f048b5424e ("dt: psci: Update DT bindings to support hierarchical PSCI states")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
[robh: drop type refs from standard unit properties]
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Ulf Hansson and committed by
Rob Herring
3261227d ac9686a9

+76 -47
+1 -1
Documentation/devicetree/bindings/arm/psci.yaml
··· 123 123 to mandate it. 124 124 125 125 [3] Documentation/devicetree/bindings/power/power_domain.txt 126 - [4] Documentation/devicetree/bindings/power/domain-idle-state.txt 126 + [4] Documentation/devicetree/bindings/power/domain-idle-state.yaml 127 127 128 128 power-domains: 129 129 $ref: '/schemas/types.yaml#/definitions/phandle-array'
-33
Documentation/devicetree/bindings/power/domain-idle-state.txt
··· 1 - PM Domain Idle State Node: 2 - 3 - A domain idle state node represents the state parameters that will be used to 4 - select the state when there are no active components in the domain. 5 - 6 - The state node has the following parameters - 7 - 8 - - compatible: 9 - Usage: Required 10 - Value type: <string> 11 - Definition: Must be "domain-idle-state". 12 - 13 - - entry-latency-us 14 - Usage: Required 15 - Value type: <prop-encoded-array> 16 - Definition: u32 value representing worst case latency in 17 - microseconds required to enter the idle state. 18 - The exit-latency-us duration may be guaranteed 19 - only after entry-latency-us has passed. 20 - 21 - - exit-latency-us 22 - Usage: Required 23 - Value type: <prop-encoded-array> 24 - Definition: u32 value representing worst case latency 25 - in microseconds required to exit the idle state. 26 - 27 - - min-residency-us 28 - Usage: Required 29 - Value type: <prop-encoded-array> 30 - Definition: u32 value representing minimum residency duration 31 - in microseconds after which the idle state will yield 32 - power benefits after overcoming the overhead in entering 33 - i the idle state.
+64
Documentation/devicetree/bindings/power/domain-idle-state.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/power/domain-idle-state.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: PM Domain Idle States binding description 8 + 9 + maintainers: 10 + - Ulf Hansson <ulf.hansson@linaro.org> 11 + 12 + description: 13 + A domain idle state node represents the state parameters that will be used to 14 + select the state when there are no active components in the PM domain. 15 + 16 + properties: 17 + $nodename: 18 + const: domain-idle-states 19 + 20 + patternProperties: 21 + "^(cpu|cluster|domain)-": 22 + type: object 23 + description: 24 + Each state node represents a domain idle state description. 25 + 26 + properties: 27 + compatible: 28 + const: domain-idle-state 29 + 30 + entry-latency-us: 31 + description: 32 + The worst case latency in microseconds required to enter the idle 33 + state. Note that, the exit-latency-us duration may be guaranteed only 34 + after the entry-latency-us has passed. 35 + 36 + exit-latency-us: 37 + description: 38 + The worst case latency in microseconds required to exit the idle 39 + state. 40 + 41 + min-residency-us: 42 + description: 43 + The minimum residency duration in microseconds after which the idle 44 + state will yield power benefits, after overcoming the overhead while 45 + entering the idle state. 46 + 47 + required: 48 + - compatible 49 + - entry-latency-us 50 + - exit-latency-us 51 + - min-residency-us 52 + 53 + examples: 54 + - | 55 + 56 + domain-idle-states { 57 + domain_retention: domain-retention { 58 + compatible = "domain-idle-state"; 59 + entry-latency-us = <20>; 60 + exit-latency-us = <40>; 61 + min-residency-us = <80>; 62 + }; 63 + }; 64 + ...
+10 -12
Documentation/devicetree/bindings/power/power-domain.yaml
··· 29 29 30 30 domain-idle-states: 31 31 $ref: /schemas/types.yaml#/definitions/phandle-array 32 - description: 33 - A phandle of an idle-state that shall be soaked into a generic domain 34 - power state. The idle state definitions are compatible with 35 - domain-idle-state specified in 36 - Documentation/devicetree/bindings/power/domain-idle-state.txt 37 - phandles that are not compatible with domain-idle-state will be ignored. 38 - The domain-idle-state property reflects the idle state of this PM domain 39 - and not the idle states of the devices or sub-domains in the PM domain. 40 - Devices and sub-domains have their own idle-states independent 41 - of the parent domain's idle states. In the absence of this property, 42 - the domain would be considered as capable of being powered-on 43 - or powered-off. 32 + description: | 33 + Phandles of idle states that defines the available states for the 34 + power-domain provider. The idle state definitions are compatible with the 35 + domain-idle-state bindings, specified in ./domain-idle-state.yaml. 36 + 37 + Note that, the domain-idle-state property reflects the idle states of this 38 + PM domain and not the idle states of the devices or sub-domains in the PM 39 + domain. Devices and sub-domains have their own idle states independent of 40 + the parent domain's idle states. In the absence of this property, the 41 + domain would be considered as capable of being powered-on or powered-off. 44 42 45 43 operating-points-v2: 46 44 $ref: /schemas/types.yaml#/definitions/phandle-array
+1 -1
Documentation/devicetree/bindings/power/power_domain.txt
··· 109 109 required-opps = <&domain1_opp_1>; 110 110 }; 111 111 112 - [1]. Documentation/devicetree/bindings/power/domain-idle-state.txt 112 + [1]. Documentation/devicetree/bindings/power/domain-idle-state.yaml