1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/arm/idle-states.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadottitle: ARM idle states binding description 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> 11c66ec88fSEmmanuel Vadot 12c66ec88fSEmmanuel Vadotdescription: |+ 13c66ec88fSEmmanuel Vadot ========================================== 14c66ec88fSEmmanuel Vadot 1 - Introduction 15c66ec88fSEmmanuel Vadot ========================================== 16c66ec88fSEmmanuel Vadot 17c66ec88fSEmmanuel Vadot ARM systems contain HW capable of managing power consumption dynamically, 18c66ec88fSEmmanuel Vadot where cores can be put in different low-power states (ranging from simple wfi 19c66ec88fSEmmanuel Vadot to power gating) according to OS PM policies. The CPU states representing the 20c66ec88fSEmmanuel Vadot range of dynamic idle states that a processor can enter at run-time, can be 21c66ec88fSEmmanuel Vadot specified through device tree bindings representing the parameters required to 22c66ec88fSEmmanuel Vadot enter/exit specific idle states on a given processor. 23c66ec88fSEmmanuel Vadot 24c66ec88fSEmmanuel Vadot According to the Server Base System Architecture document (SBSA, [3]), the 25c66ec88fSEmmanuel Vadot power states an ARM CPU can be put into are identified by the following list: 26c66ec88fSEmmanuel Vadot 27c66ec88fSEmmanuel Vadot - Running 28c66ec88fSEmmanuel Vadot - Idle_standby 29c66ec88fSEmmanuel Vadot - Idle_retention 30c66ec88fSEmmanuel Vadot - Sleep 31c66ec88fSEmmanuel Vadot - Off 32c66ec88fSEmmanuel Vadot 33c66ec88fSEmmanuel Vadot The power states described in the SBSA document define the basic CPU states on 34c66ec88fSEmmanuel Vadot top of which ARM platforms implement power management schemes that allow an OS 35c66ec88fSEmmanuel Vadot PM implementation to put the processor in different idle states (which include 36c66ec88fSEmmanuel Vadot states listed above; "off" state is not an idle state since it does not have 37c66ec88fSEmmanuel Vadot wake-up capabilities, hence it is not considered in this document). 38c66ec88fSEmmanuel Vadot 39c66ec88fSEmmanuel Vadot Idle state parameters (e.g. entry latency) are platform specific and need to 40c66ec88fSEmmanuel Vadot be characterized with bindings that provide the required information to OS PM 41c66ec88fSEmmanuel Vadot code so that it can build the required tables and use them at runtime. 42c66ec88fSEmmanuel Vadot 43c66ec88fSEmmanuel Vadot The device tree binding definition for ARM idle states is the subject of this 44c66ec88fSEmmanuel Vadot document. 45c66ec88fSEmmanuel Vadot 46c66ec88fSEmmanuel Vadot =========================================== 47c66ec88fSEmmanuel Vadot 2 - idle-states definitions 48c66ec88fSEmmanuel Vadot =========================================== 49c66ec88fSEmmanuel Vadot 50c66ec88fSEmmanuel Vadot Idle states are characterized for a specific system through a set of 51c66ec88fSEmmanuel Vadot timing and energy related properties, that underline the HW behaviour 52c66ec88fSEmmanuel Vadot triggered upon idle states entry and exit. 53c66ec88fSEmmanuel Vadot 54c66ec88fSEmmanuel Vadot The following diagram depicts the CPU execution phases and related timing 55c66ec88fSEmmanuel Vadot properties required to enter and exit an idle state: 56c66ec88fSEmmanuel Vadot 57c66ec88fSEmmanuel Vadot ..__[EXEC]__|__[PREP]__|__[ENTRY]__|__[IDLE]__|__[EXIT]__|__[EXEC]__.. 58c66ec88fSEmmanuel Vadot | | | | | 59c66ec88fSEmmanuel Vadot 60c66ec88fSEmmanuel Vadot |<------ entry ------->| 61c66ec88fSEmmanuel Vadot | latency | 62c66ec88fSEmmanuel Vadot |<- exit ->| 63c66ec88fSEmmanuel Vadot | latency | 64c66ec88fSEmmanuel Vadot |<-------- min-residency -------->| 65c66ec88fSEmmanuel Vadot |<------- wakeup-latency ------->| 66c66ec88fSEmmanuel Vadot 67c66ec88fSEmmanuel Vadot Diagram 1: CPU idle state execution phases 68c66ec88fSEmmanuel Vadot 69c66ec88fSEmmanuel Vadot EXEC: Normal CPU execution. 70c66ec88fSEmmanuel Vadot 71c66ec88fSEmmanuel Vadot PREP: Preparation phase before committing the hardware to idle mode 72c66ec88fSEmmanuel Vadot like cache flushing. This is abortable on pending wake-up 73c66ec88fSEmmanuel Vadot event conditions. The abort latency is assumed to be negligible 74c66ec88fSEmmanuel Vadot (i.e. less than the ENTRY + EXIT duration). If aborted, CPU 75c66ec88fSEmmanuel Vadot goes back to EXEC. This phase is optional. If not abortable, 76c66ec88fSEmmanuel Vadot this should be included in the ENTRY phase instead. 77c66ec88fSEmmanuel Vadot 78c66ec88fSEmmanuel Vadot ENTRY: The hardware is committed to idle mode. This period must run 79c66ec88fSEmmanuel Vadot to completion up to IDLE before anything else can happen. 80c66ec88fSEmmanuel Vadot 81c66ec88fSEmmanuel Vadot IDLE: This is the actual energy-saving idle period. This may last 82c66ec88fSEmmanuel Vadot between 0 and infinite time, until a wake-up event occurs. 83c66ec88fSEmmanuel Vadot 84c66ec88fSEmmanuel Vadot EXIT: Period during which the CPU is brought back to operational 85c66ec88fSEmmanuel Vadot mode (EXEC). 86c66ec88fSEmmanuel Vadot 87c66ec88fSEmmanuel Vadot entry-latency: Worst case latency required to enter the idle state. The 88c66ec88fSEmmanuel Vadot exit-latency may be guaranteed only after entry-latency has passed. 89c66ec88fSEmmanuel Vadot 90c66ec88fSEmmanuel Vadot min-residency: Minimum period, including preparation and entry, for a given 91c66ec88fSEmmanuel Vadot idle state to be worthwhile energywise. 92c66ec88fSEmmanuel Vadot 93c66ec88fSEmmanuel Vadot wakeup-latency: Maximum delay between the signaling of a wake-up event and the 94c66ec88fSEmmanuel Vadot CPU being able to execute normal code again. If not specified, this is assumed 95c66ec88fSEmmanuel Vadot to be entry-latency + exit-latency. 96c66ec88fSEmmanuel Vadot 97c66ec88fSEmmanuel Vadot These timing parameters can be used by an OS in different circumstances. 98c66ec88fSEmmanuel Vadot 99c66ec88fSEmmanuel Vadot An idle CPU requires the expected min-residency time to select the most 100c66ec88fSEmmanuel Vadot appropriate idle state based on the expected expiry time of the next IRQ 101c66ec88fSEmmanuel Vadot (i.e. wake-up) that causes the CPU to return to the EXEC phase. 102c66ec88fSEmmanuel Vadot 103c66ec88fSEmmanuel Vadot An operating system scheduler may need to compute the shortest wake-up delay 104c66ec88fSEmmanuel Vadot for CPUs in the system by detecting how long will it take to get a CPU out 105c66ec88fSEmmanuel Vadot of an idle state, e.g.: 106c66ec88fSEmmanuel Vadot 107c66ec88fSEmmanuel Vadot wakeup-delay = exit-latency + max(entry-latency - (now - entry-timestamp), 0) 108c66ec88fSEmmanuel Vadot 109c66ec88fSEmmanuel Vadot In other words, the scheduler can make its scheduling decision by selecting 110c66ec88fSEmmanuel Vadot (e.g. waking-up) the CPU with the shortest wake-up delay. 111c66ec88fSEmmanuel Vadot The wake-up delay must take into account the entry latency if that period 112c66ec88fSEmmanuel Vadot has not expired. The abortable nature of the PREP period can be ignored 113c66ec88fSEmmanuel Vadot if it cannot be relied upon (e.g. the PREP deadline may occur much sooner than 114c66ec88fSEmmanuel Vadot the worst case since it depends on the CPU operating conditions, i.e. caches 115c66ec88fSEmmanuel Vadot state). 116c66ec88fSEmmanuel Vadot 117c66ec88fSEmmanuel Vadot An OS has to reliably probe the wakeup-latency since some devices can enforce 118c66ec88fSEmmanuel Vadot latency constraint guarantees to work properly, so the OS has to detect the 119c66ec88fSEmmanuel Vadot worst case wake-up latency it can incur if a CPU is allowed to enter an 120c66ec88fSEmmanuel Vadot idle state, and possibly to prevent that to guarantee reliable device 121c66ec88fSEmmanuel Vadot functioning. 122c66ec88fSEmmanuel Vadot 123c66ec88fSEmmanuel Vadot The min-residency time parameter deserves further explanation since it is 124c66ec88fSEmmanuel Vadot expressed in time units but must factor in energy consumption coefficients. 125c66ec88fSEmmanuel Vadot 126c66ec88fSEmmanuel Vadot The energy consumption of a cpu when it enters a power state can be roughly 127c66ec88fSEmmanuel Vadot characterised by the following graph: 128c66ec88fSEmmanuel Vadot 129c66ec88fSEmmanuel Vadot | 130c66ec88fSEmmanuel Vadot | 131c66ec88fSEmmanuel Vadot | 132c66ec88fSEmmanuel Vadot e | 133c66ec88fSEmmanuel Vadot n | /--- 134c66ec88fSEmmanuel Vadot e | /------ 135c66ec88fSEmmanuel Vadot r | /------ 136c66ec88fSEmmanuel Vadot g | /----- 137c66ec88fSEmmanuel Vadot y | /------ 138c66ec88fSEmmanuel Vadot | ---- 139c66ec88fSEmmanuel Vadot | /| 140c66ec88fSEmmanuel Vadot | / | 141c66ec88fSEmmanuel Vadot | / | 142c66ec88fSEmmanuel Vadot | / | 143c66ec88fSEmmanuel Vadot | / | 144c66ec88fSEmmanuel Vadot | / | 145c66ec88fSEmmanuel Vadot |/ | 146c66ec88fSEmmanuel Vadot -----|-------+---------------------------------- 147c66ec88fSEmmanuel Vadot 0| 1 time(ms) 148c66ec88fSEmmanuel Vadot 149c66ec88fSEmmanuel Vadot Graph 1: Energy vs time example 150c66ec88fSEmmanuel Vadot 151c66ec88fSEmmanuel Vadot The graph is split in two parts delimited by time 1ms on the X-axis. 152c66ec88fSEmmanuel Vadot The graph curve with X-axis values = { x | 0 < x < 1ms } has a steep slope 153c66ec88fSEmmanuel Vadot and denotes the energy costs incurred while entering and leaving the idle 154c66ec88fSEmmanuel Vadot state. 155c66ec88fSEmmanuel Vadot The graph curve in the area delimited by X-axis values = {x | x > 1ms } has 156c66ec88fSEmmanuel Vadot shallower slope and essentially represents the energy consumption of the idle 157c66ec88fSEmmanuel Vadot state. 158c66ec88fSEmmanuel Vadot 159c66ec88fSEmmanuel Vadot min-residency is defined for a given idle state as the minimum expected 160c66ec88fSEmmanuel Vadot residency time for a state (inclusive of preparation and entry) after 161c66ec88fSEmmanuel Vadot which choosing that state become the most energy efficient option. A good 162c66ec88fSEmmanuel Vadot way to visualise this, is by taking the same graph above and comparing some 163c66ec88fSEmmanuel Vadot states energy consumptions plots. 164c66ec88fSEmmanuel Vadot 165c66ec88fSEmmanuel Vadot For sake of simplicity, let's consider a system with two idle states IDLE1, 166c66ec88fSEmmanuel Vadot and IDLE2: 167c66ec88fSEmmanuel Vadot 168c66ec88fSEmmanuel Vadot | 169c66ec88fSEmmanuel Vadot | 170c66ec88fSEmmanuel Vadot | 171c66ec88fSEmmanuel Vadot | /-- IDLE1 172c66ec88fSEmmanuel Vadot e | /--- 173c66ec88fSEmmanuel Vadot n | /---- 174c66ec88fSEmmanuel Vadot e | /--- 175c66ec88fSEmmanuel Vadot r | /-----/--------- IDLE2 176c66ec88fSEmmanuel Vadot g | /-------/--------- 177c66ec88fSEmmanuel Vadot y | ------------ /---| 178c66ec88fSEmmanuel Vadot | / /---- | 179c66ec88fSEmmanuel Vadot | / /--- | 180c66ec88fSEmmanuel Vadot | / /---- | 181c66ec88fSEmmanuel Vadot | / /--- | 182c66ec88fSEmmanuel Vadot | --- | 183c66ec88fSEmmanuel Vadot | / | 184c66ec88fSEmmanuel Vadot | / | 185c66ec88fSEmmanuel Vadot |/ | time 186c66ec88fSEmmanuel Vadot ---/----------------------------+------------------------ 187c66ec88fSEmmanuel Vadot |IDLE1-energy < IDLE2-energy | IDLE2-energy < IDLE1-energy 188c66ec88fSEmmanuel Vadot | 189c66ec88fSEmmanuel Vadot IDLE2-min-residency 190c66ec88fSEmmanuel Vadot 191c66ec88fSEmmanuel Vadot Graph 2: idle states min-residency example 192c66ec88fSEmmanuel Vadot 193c66ec88fSEmmanuel Vadot In graph 2 above, that takes into account idle states entry/exit energy 194c66ec88fSEmmanuel Vadot costs, it is clear that if the idle state residency time (i.e. time till next 195c66ec88fSEmmanuel Vadot wake-up IRQ) is less than IDLE2-min-residency, IDLE1 is the better idle state 196c66ec88fSEmmanuel Vadot choice energywise. 197c66ec88fSEmmanuel Vadot 198c66ec88fSEmmanuel Vadot This is mainly down to the fact that IDLE1 entry/exit energy costs are lower 199c66ec88fSEmmanuel Vadot than IDLE2. 200c66ec88fSEmmanuel Vadot 201c66ec88fSEmmanuel Vadot However, the lower power consumption (i.e. shallower energy curve slope) of 202c66ec88fSEmmanuel Vadot idle state IDLE2 implies that after a suitable time, IDLE2 becomes more energy 203c66ec88fSEmmanuel Vadot efficient. 204c66ec88fSEmmanuel Vadot 205c66ec88fSEmmanuel Vadot The time at which IDLE2 becomes more energy efficient than IDLE1 (and other 206c66ec88fSEmmanuel Vadot shallower states in a system with multiple idle states) is defined 207c66ec88fSEmmanuel Vadot IDLE2-min-residency and corresponds to the time when energy consumption of 208c66ec88fSEmmanuel Vadot IDLE1 and IDLE2 states breaks even. 209c66ec88fSEmmanuel Vadot 210c66ec88fSEmmanuel Vadot The definitions provided in this section underpin the idle states 211c66ec88fSEmmanuel Vadot properties specification that is the subject of the following sections. 212c66ec88fSEmmanuel Vadot 213c66ec88fSEmmanuel Vadot =========================================== 214c66ec88fSEmmanuel Vadot 3 - idle-states node 215c66ec88fSEmmanuel Vadot =========================================== 216c66ec88fSEmmanuel Vadot 217c66ec88fSEmmanuel Vadot ARM processor idle states are defined within the idle-states node, which is 218c66ec88fSEmmanuel Vadot a direct child of the cpus node [1] and provides a container where the 219c66ec88fSEmmanuel Vadot processor idle states, defined as device tree nodes, are listed. 220c66ec88fSEmmanuel Vadot 221c66ec88fSEmmanuel Vadot On ARM systems, it is a container of processor idle states nodes. If the 222c66ec88fSEmmanuel Vadot system does not provide CPU power management capabilities, or the processor 223c66ec88fSEmmanuel Vadot just supports idle_standby, an idle-states node is not required. 224c66ec88fSEmmanuel Vadot 225c66ec88fSEmmanuel Vadot =========================================== 226c66ec88fSEmmanuel Vadot 4 - References 227c66ec88fSEmmanuel Vadot =========================================== 228c66ec88fSEmmanuel Vadot 229c66ec88fSEmmanuel Vadot [1] ARM Linux Kernel documentation - CPUs bindings 230c66ec88fSEmmanuel Vadot Documentation/devicetree/bindings/arm/cpus.yaml 231c66ec88fSEmmanuel Vadot 232c66ec88fSEmmanuel Vadot [2] ARM Linux Kernel documentation - PSCI bindings 233c66ec88fSEmmanuel Vadot Documentation/devicetree/bindings/arm/psci.yaml 234c66ec88fSEmmanuel Vadot 235c66ec88fSEmmanuel Vadot [3] ARM Server Base System Architecture (SBSA) 236c66ec88fSEmmanuel Vadot http://infocenter.arm.com/help/index.jsp 237c66ec88fSEmmanuel Vadot 238c66ec88fSEmmanuel Vadot [4] ARM Architecture Reference Manuals 239c66ec88fSEmmanuel Vadot http://infocenter.arm.com/help/index.jsp 240c66ec88fSEmmanuel Vadot 241c66ec88fSEmmanuel Vadot [6] ARM Linux Kernel documentation - Booting AArch64 Linux 242c66ec88fSEmmanuel Vadot Documentation/arm64/booting.rst 243c66ec88fSEmmanuel Vadot 244c66ec88fSEmmanuel Vadotproperties: 245c66ec88fSEmmanuel Vadot $nodename: 246c66ec88fSEmmanuel Vadot const: idle-states 247c66ec88fSEmmanuel Vadot 248c66ec88fSEmmanuel Vadot entry-method: 249c66ec88fSEmmanuel Vadot description: | 250c66ec88fSEmmanuel Vadot Usage and definition depend on ARM architecture version. 251c66ec88fSEmmanuel Vadot 252c66ec88fSEmmanuel Vadot On ARM v8 64-bit this property is required. 253c66ec88fSEmmanuel Vadot On ARM 32-bit systems this property is optional 254c66ec88fSEmmanuel Vadot 255c66ec88fSEmmanuel Vadot This assumes that the "enable-method" property is set to "psci" in the cpu 256c66ec88fSEmmanuel Vadot node[6] that is responsible for setting up CPU idle management in the OS 257c66ec88fSEmmanuel Vadot implementation. 258c66ec88fSEmmanuel Vadot const: psci 259c66ec88fSEmmanuel Vadot 260c66ec88fSEmmanuel VadotpatternProperties: 261c66ec88fSEmmanuel Vadot "^(cpu|cluster)-": 262c66ec88fSEmmanuel Vadot type: object 263c66ec88fSEmmanuel Vadot description: | 264c66ec88fSEmmanuel Vadot Each state node represents an idle state description and must be defined 265c66ec88fSEmmanuel Vadot as follows. 266c66ec88fSEmmanuel Vadot 267c66ec88fSEmmanuel Vadot The idle state entered by executing the wfi instruction (idle_standby 268c66ec88fSEmmanuel Vadot SBSA,[3][4]) is considered standard on all ARM platforms and therefore 269c66ec88fSEmmanuel Vadot must not be listed. 270c66ec88fSEmmanuel Vadot 271c66ec88fSEmmanuel Vadot In addition to the properties listed above, a state node may require 272c66ec88fSEmmanuel Vadot additional properties specific to the entry-method defined in the 273c66ec88fSEmmanuel Vadot idle-states node. Please refer to the entry-method bindings 274c66ec88fSEmmanuel Vadot documentation for properties definitions. 275c66ec88fSEmmanuel Vadot 276c66ec88fSEmmanuel Vadot properties: 277c66ec88fSEmmanuel Vadot compatible: 278c66ec88fSEmmanuel Vadot const: arm,idle-state 279c66ec88fSEmmanuel Vadot 280c66ec88fSEmmanuel Vadot local-timer-stop: 281c66ec88fSEmmanuel Vadot description: 282c66ec88fSEmmanuel Vadot If present the CPU local timer control logic is 283c66ec88fSEmmanuel Vadot lost on state entry, otherwise it is retained. 284c66ec88fSEmmanuel Vadot type: boolean 285c66ec88fSEmmanuel Vadot 286c66ec88fSEmmanuel Vadot entry-latency-us: 287c66ec88fSEmmanuel Vadot description: 288c66ec88fSEmmanuel Vadot Worst case latency in microseconds required to enter the idle state. 289c66ec88fSEmmanuel Vadot 290c66ec88fSEmmanuel Vadot exit-latency-us: 291c66ec88fSEmmanuel Vadot description: 292c66ec88fSEmmanuel Vadot Worst case latency in microseconds required to exit the idle state. 293c66ec88fSEmmanuel Vadot The exit-latency-us duration may be guaranteed only after 294c66ec88fSEmmanuel Vadot entry-latency-us has passed. 295c66ec88fSEmmanuel Vadot 296c66ec88fSEmmanuel Vadot min-residency-us: 297c66ec88fSEmmanuel Vadot description: 298c66ec88fSEmmanuel Vadot Minimum residency duration in microseconds, inclusive of preparation 299c66ec88fSEmmanuel Vadot and entry, for this idle state to be considered worthwhile energy wise 300c66ec88fSEmmanuel Vadot (refer to section 2 of this document for a complete description). 301c66ec88fSEmmanuel Vadot 302c66ec88fSEmmanuel Vadot wakeup-latency-us: 303c66ec88fSEmmanuel Vadot description: | 304c66ec88fSEmmanuel Vadot Maximum delay between the signaling of a wake-up event and the CPU 305c66ec88fSEmmanuel Vadot being able to execute normal code again. If omitted, this is assumed 306c66ec88fSEmmanuel Vadot to be equal to: 307c66ec88fSEmmanuel Vadot 308c66ec88fSEmmanuel Vadot entry-latency-us + exit-latency-us 309c66ec88fSEmmanuel Vadot 310c66ec88fSEmmanuel Vadot It is important to supply this value on systems where the duration of 311c66ec88fSEmmanuel Vadot PREP phase (see diagram 1, section 2) is non-neglibigle. In such 312c66ec88fSEmmanuel Vadot systems entry-latency-us + exit-latency-us will exceed 313c66ec88fSEmmanuel Vadot wakeup-latency-us by this duration. 314c66ec88fSEmmanuel Vadot 315c66ec88fSEmmanuel Vadot idle-state-name: 316*5def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 317c66ec88fSEmmanuel Vadot description: 318c66ec88fSEmmanuel Vadot A string used as a descriptive name for the idle state. 319c66ec88fSEmmanuel Vadot 320c66ec88fSEmmanuel Vadot required: 321c66ec88fSEmmanuel Vadot - compatible 322c66ec88fSEmmanuel Vadot - entry-latency-us 323c66ec88fSEmmanuel Vadot - exit-latency-us 324c66ec88fSEmmanuel Vadot - min-residency-us 325c66ec88fSEmmanuel Vadot 326c66ec88fSEmmanuel VadotadditionalProperties: false 327c66ec88fSEmmanuel Vadot 328c66ec88fSEmmanuel Vadotexamples: 329c66ec88fSEmmanuel Vadot - | 330c66ec88fSEmmanuel Vadot 331c66ec88fSEmmanuel Vadot cpus { 332c66ec88fSEmmanuel Vadot #size-cells = <0>; 333c66ec88fSEmmanuel Vadot #address-cells = <2>; 334c66ec88fSEmmanuel Vadot 335c66ec88fSEmmanuel Vadot cpu@0 { 336c66ec88fSEmmanuel Vadot device_type = "cpu"; 337c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a57"; 338c66ec88fSEmmanuel Vadot reg = <0x0 0x0>; 339c66ec88fSEmmanuel Vadot enable-method = "psci"; 340c66ec88fSEmmanuel Vadot cpu-idle-states = <&CPU_RETENTION_0_0 &CPU_SLEEP_0_0 341c66ec88fSEmmanuel Vadot &CLUSTER_RETENTION_0 &CLUSTER_SLEEP_0>; 342c66ec88fSEmmanuel Vadot }; 343c66ec88fSEmmanuel Vadot 344c66ec88fSEmmanuel Vadot cpu@1 { 345c66ec88fSEmmanuel Vadot device_type = "cpu"; 346c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a57"; 347c66ec88fSEmmanuel Vadot reg = <0x0 0x1>; 348c66ec88fSEmmanuel Vadot enable-method = "psci"; 349c66ec88fSEmmanuel Vadot cpu-idle-states = <&CPU_RETENTION_0_0 &CPU_SLEEP_0_0 350c66ec88fSEmmanuel Vadot &CLUSTER_RETENTION_0 &CLUSTER_SLEEP_0>; 351c66ec88fSEmmanuel Vadot }; 352c66ec88fSEmmanuel Vadot 353c66ec88fSEmmanuel Vadot cpu@100 { 354c66ec88fSEmmanuel Vadot device_type = "cpu"; 355c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a57"; 356c66ec88fSEmmanuel Vadot reg = <0x0 0x100>; 357c66ec88fSEmmanuel Vadot enable-method = "psci"; 358c66ec88fSEmmanuel Vadot cpu-idle-states = <&CPU_RETENTION_0_0 &CPU_SLEEP_0_0 359c66ec88fSEmmanuel Vadot &CLUSTER_RETENTION_0 &CLUSTER_SLEEP_0>; 360c66ec88fSEmmanuel Vadot }; 361c66ec88fSEmmanuel Vadot 362c66ec88fSEmmanuel Vadot cpu@101 { 363c66ec88fSEmmanuel Vadot device_type = "cpu"; 364c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a57"; 365c66ec88fSEmmanuel Vadot reg = <0x0 0x101>; 366c66ec88fSEmmanuel Vadot enable-method = "psci"; 367c66ec88fSEmmanuel Vadot cpu-idle-states = <&CPU_RETENTION_0_0 &CPU_SLEEP_0_0 368c66ec88fSEmmanuel Vadot &CLUSTER_RETENTION_0 &CLUSTER_SLEEP_0>; 369c66ec88fSEmmanuel Vadot }; 370c66ec88fSEmmanuel Vadot 371c66ec88fSEmmanuel Vadot cpu@10000 { 372c66ec88fSEmmanuel Vadot device_type = "cpu"; 373c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a57"; 374c66ec88fSEmmanuel Vadot reg = <0x0 0x10000>; 375c66ec88fSEmmanuel Vadot enable-method = "psci"; 376c66ec88fSEmmanuel Vadot cpu-idle-states = <&CPU_RETENTION_0_0 &CPU_SLEEP_0_0 377c66ec88fSEmmanuel Vadot &CLUSTER_RETENTION_0 &CLUSTER_SLEEP_0>; 378c66ec88fSEmmanuel Vadot }; 379c66ec88fSEmmanuel Vadot 380c66ec88fSEmmanuel Vadot cpu@10001 { 381c66ec88fSEmmanuel Vadot device_type = "cpu"; 382c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a57"; 383c66ec88fSEmmanuel Vadot reg = <0x0 0x10001>; 384c66ec88fSEmmanuel Vadot enable-method = "psci"; 385c66ec88fSEmmanuel Vadot cpu-idle-states = <&CPU_RETENTION_0_0 &CPU_SLEEP_0_0 386c66ec88fSEmmanuel Vadot &CLUSTER_RETENTION_0 &CLUSTER_SLEEP_0>; 387c66ec88fSEmmanuel Vadot }; 388c66ec88fSEmmanuel Vadot 389c66ec88fSEmmanuel Vadot cpu@10100 { 390c66ec88fSEmmanuel Vadot device_type = "cpu"; 391c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a57"; 392c66ec88fSEmmanuel Vadot reg = <0x0 0x10100>; 393c66ec88fSEmmanuel Vadot enable-method = "psci"; 394c66ec88fSEmmanuel Vadot cpu-idle-states = <&CPU_RETENTION_0_0 &CPU_SLEEP_0_0 395c66ec88fSEmmanuel Vadot &CLUSTER_RETENTION_0 &CLUSTER_SLEEP_0>; 396c66ec88fSEmmanuel Vadot }; 397c66ec88fSEmmanuel Vadot 398c66ec88fSEmmanuel Vadot cpu@10101 { 399c66ec88fSEmmanuel Vadot device_type = "cpu"; 400c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a57"; 401c66ec88fSEmmanuel Vadot reg = <0x0 0x10101>; 402c66ec88fSEmmanuel Vadot enable-method = "psci"; 403c66ec88fSEmmanuel Vadot cpu-idle-states = <&CPU_RETENTION_0_0 &CPU_SLEEP_0_0 404c66ec88fSEmmanuel Vadot &CLUSTER_RETENTION_0 &CLUSTER_SLEEP_0>; 405c66ec88fSEmmanuel Vadot }; 406c66ec88fSEmmanuel Vadot 407c66ec88fSEmmanuel Vadot cpu@100000000 { 408c66ec88fSEmmanuel Vadot device_type = "cpu"; 409c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a53"; 410c66ec88fSEmmanuel Vadot reg = <0x1 0x0>; 411c66ec88fSEmmanuel Vadot enable-method = "psci"; 412c66ec88fSEmmanuel Vadot cpu-idle-states = <&CPU_RETENTION_1_0 &CPU_SLEEP_1_0 413c66ec88fSEmmanuel Vadot &CLUSTER_RETENTION_1 &CLUSTER_SLEEP_1>; 414c66ec88fSEmmanuel Vadot }; 415c66ec88fSEmmanuel Vadot 416c66ec88fSEmmanuel Vadot cpu@100000001 { 417c66ec88fSEmmanuel Vadot device_type = "cpu"; 418c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a53"; 419c66ec88fSEmmanuel Vadot reg = <0x1 0x1>; 420c66ec88fSEmmanuel Vadot enable-method = "psci"; 421c66ec88fSEmmanuel Vadot cpu-idle-states = <&CPU_RETENTION_1_0 &CPU_SLEEP_1_0 422c66ec88fSEmmanuel Vadot &CLUSTER_RETENTION_1 &CLUSTER_SLEEP_1>; 423c66ec88fSEmmanuel Vadot }; 424c66ec88fSEmmanuel Vadot 425c66ec88fSEmmanuel Vadot cpu@100000100 { 426c66ec88fSEmmanuel Vadot device_type = "cpu"; 427c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a53"; 428c66ec88fSEmmanuel Vadot reg = <0x1 0x100>; 429c66ec88fSEmmanuel Vadot enable-method = "psci"; 430c66ec88fSEmmanuel Vadot cpu-idle-states = <&CPU_RETENTION_1_0 &CPU_SLEEP_1_0 431c66ec88fSEmmanuel Vadot &CLUSTER_RETENTION_1 &CLUSTER_SLEEP_1>; 432c66ec88fSEmmanuel Vadot }; 433c66ec88fSEmmanuel Vadot 434c66ec88fSEmmanuel Vadot cpu@100000101 { 435c66ec88fSEmmanuel Vadot device_type = "cpu"; 436c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a53"; 437c66ec88fSEmmanuel Vadot reg = <0x1 0x101>; 438c66ec88fSEmmanuel Vadot enable-method = "psci"; 439c66ec88fSEmmanuel Vadot cpu-idle-states = <&CPU_RETENTION_1_0 &CPU_SLEEP_1_0 440c66ec88fSEmmanuel Vadot &CLUSTER_RETENTION_1 &CLUSTER_SLEEP_1>; 441c66ec88fSEmmanuel Vadot }; 442c66ec88fSEmmanuel Vadot 443c66ec88fSEmmanuel Vadot cpu@100010000 { 444c66ec88fSEmmanuel Vadot device_type = "cpu"; 445c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a53"; 446c66ec88fSEmmanuel Vadot reg = <0x1 0x10000>; 447c66ec88fSEmmanuel Vadot enable-method = "psci"; 448c66ec88fSEmmanuel Vadot cpu-idle-states = <&CPU_RETENTION_1_0 &CPU_SLEEP_1_0 449c66ec88fSEmmanuel Vadot &CLUSTER_RETENTION_1 &CLUSTER_SLEEP_1>; 450c66ec88fSEmmanuel Vadot }; 451c66ec88fSEmmanuel Vadot 452c66ec88fSEmmanuel Vadot cpu@100010001 { 453c66ec88fSEmmanuel Vadot device_type = "cpu"; 454c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a53"; 455c66ec88fSEmmanuel Vadot reg = <0x1 0x10001>; 456c66ec88fSEmmanuel Vadot enable-method = "psci"; 457c66ec88fSEmmanuel Vadot cpu-idle-states = <&CPU_RETENTION_1_0 &CPU_SLEEP_1_0 458c66ec88fSEmmanuel Vadot &CLUSTER_RETENTION_1 &CLUSTER_SLEEP_1>; 459c66ec88fSEmmanuel Vadot }; 460c66ec88fSEmmanuel Vadot 461c66ec88fSEmmanuel Vadot cpu@100010100 { 462c66ec88fSEmmanuel Vadot device_type = "cpu"; 463c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a53"; 464c66ec88fSEmmanuel Vadot reg = <0x1 0x10100>; 465c66ec88fSEmmanuel Vadot enable-method = "psci"; 466c66ec88fSEmmanuel Vadot cpu-idle-states = <&CPU_RETENTION_1_0 &CPU_SLEEP_1_0 467c66ec88fSEmmanuel Vadot &CLUSTER_RETENTION_1 &CLUSTER_SLEEP_1>; 468c66ec88fSEmmanuel Vadot }; 469c66ec88fSEmmanuel Vadot 470c66ec88fSEmmanuel Vadot cpu@100010101 { 471c66ec88fSEmmanuel Vadot device_type = "cpu"; 472c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a53"; 473c66ec88fSEmmanuel Vadot reg = <0x1 0x10101>; 474c66ec88fSEmmanuel Vadot enable-method = "psci"; 475c66ec88fSEmmanuel Vadot cpu-idle-states = <&CPU_RETENTION_1_0 &CPU_SLEEP_1_0 476c66ec88fSEmmanuel Vadot &CLUSTER_RETENTION_1 &CLUSTER_SLEEP_1>; 477c66ec88fSEmmanuel Vadot }; 478c66ec88fSEmmanuel Vadot 479c66ec88fSEmmanuel Vadot idle-states { 480c66ec88fSEmmanuel Vadot entry-method = "psci"; 481c66ec88fSEmmanuel Vadot 482c66ec88fSEmmanuel Vadot CPU_RETENTION_0_0: cpu-retention-0-0 { 483c66ec88fSEmmanuel Vadot compatible = "arm,idle-state"; 484c66ec88fSEmmanuel Vadot arm,psci-suspend-param = <0x0010000>; 485c66ec88fSEmmanuel Vadot entry-latency-us = <20>; 486c66ec88fSEmmanuel Vadot exit-latency-us = <40>; 487c66ec88fSEmmanuel Vadot min-residency-us = <80>; 488c66ec88fSEmmanuel Vadot }; 489c66ec88fSEmmanuel Vadot 490c66ec88fSEmmanuel Vadot CLUSTER_RETENTION_0: cluster-retention-0 { 491c66ec88fSEmmanuel Vadot compatible = "arm,idle-state"; 492c66ec88fSEmmanuel Vadot local-timer-stop; 493c66ec88fSEmmanuel Vadot arm,psci-suspend-param = <0x1010000>; 494c66ec88fSEmmanuel Vadot entry-latency-us = <50>; 495c66ec88fSEmmanuel Vadot exit-latency-us = <100>; 496c66ec88fSEmmanuel Vadot min-residency-us = <250>; 497c66ec88fSEmmanuel Vadot wakeup-latency-us = <130>; 498c66ec88fSEmmanuel Vadot }; 499c66ec88fSEmmanuel Vadot 500c66ec88fSEmmanuel Vadot CPU_SLEEP_0_0: cpu-sleep-0-0 { 501c66ec88fSEmmanuel Vadot compatible = "arm,idle-state"; 502c66ec88fSEmmanuel Vadot local-timer-stop; 503c66ec88fSEmmanuel Vadot arm,psci-suspend-param = <0x0010000>; 504c66ec88fSEmmanuel Vadot entry-latency-us = <250>; 505c66ec88fSEmmanuel Vadot exit-latency-us = <500>; 506c66ec88fSEmmanuel Vadot min-residency-us = <950>; 507c66ec88fSEmmanuel Vadot }; 508c66ec88fSEmmanuel Vadot 509c66ec88fSEmmanuel Vadot CLUSTER_SLEEP_0: cluster-sleep-0 { 510c66ec88fSEmmanuel Vadot compatible = "arm,idle-state"; 511c66ec88fSEmmanuel Vadot local-timer-stop; 512c66ec88fSEmmanuel Vadot arm,psci-suspend-param = <0x1010000>; 513c66ec88fSEmmanuel Vadot entry-latency-us = <600>; 514c66ec88fSEmmanuel Vadot exit-latency-us = <1100>; 515c66ec88fSEmmanuel Vadot min-residency-us = <2700>; 516c66ec88fSEmmanuel Vadot wakeup-latency-us = <1500>; 517c66ec88fSEmmanuel Vadot }; 518c66ec88fSEmmanuel Vadot 519c66ec88fSEmmanuel Vadot CPU_RETENTION_1_0: cpu-retention-1-0 { 520c66ec88fSEmmanuel Vadot compatible = "arm,idle-state"; 521c66ec88fSEmmanuel Vadot arm,psci-suspend-param = <0x0010000>; 522c66ec88fSEmmanuel Vadot entry-latency-us = <20>; 523c66ec88fSEmmanuel Vadot exit-latency-us = <40>; 524c66ec88fSEmmanuel Vadot min-residency-us = <90>; 525c66ec88fSEmmanuel Vadot }; 526c66ec88fSEmmanuel Vadot 527c66ec88fSEmmanuel Vadot CLUSTER_RETENTION_1: cluster-retention-1 { 528c66ec88fSEmmanuel Vadot compatible = "arm,idle-state"; 529c66ec88fSEmmanuel Vadot local-timer-stop; 530c66ec88fSEmmanuel Vadot arm,psci-suspend-param = <0x1010000>; 531c66ec88fSEmmanuel Vadot entry-latency-us = <50>; 532c66ec88fSEmmanuel Vadot exit-latency-us = <100>; 533c66ec88fSEmmanuel Vadot min-residency-us = <270>; 534c66ec88fSEmmanuel Vadot wakeup-latency-us = <100>; 535c66ec88fSEmmanuel Vadot }; 536c66ec88fSEmmanuel Vadot 537c66ec88fSEmmanuel Vadot CPU_SLEEP_1_0: cpu-sleep-1-0 { 538c66ec88fSEmmanuel Vadot compatible = "arm,idle-state"; 539c66ec88fSEmmanuel Vadot local-timer-stop; 540c66ec88fSEmmanuel Vadot arm,psci-suspend-param = <0x0010000>; 541c66ec88fSEmmanuel Vadot entry-latency-us = <70>; 542c66ec88fSEmmanuel Vadot exit-latency-us = <100>; 543c66ec88fSEmmanuel Vadot min-residency-us = <300>; 544c66ec88fSEmmanuel Vadot wakeup-latency-us = <150>; 545c66ec88fSEmmanuel Vadot }; 546c66ec88fSEmmanuel Vadot 547c66ec88fSEmmanuel Vadot CLUSTER_SLEEP_1: cluster-sleep-1 { 548c66ec88fSEmmanuel Vadot compatible = "arm,idle-state"; 549c66ec88fSEmmanuel Vadot local-timer-stop; 550c66ec88fSEmmanuel Vadot arm,psci-suspend-param = <0x1010000>; 551c66ec88fSEmmanuel Vadot entry-latency-us = <500>; 552c66ec88fSEmmanuel Vadot exit-latency-us = <1200>; 553c66ec88fSEmmanuel Vadot min-residency-us = <3500>; 554c66ec88fSEmmanuel Vadot wakeup-latency-us = <1300>; 555c66ec88fSEmmanuel Vadot }; 556c66ec88fSEmmanuel Vadot }; 557c66ec88fSEmmanuel Vadot }; 558c66ec88fSEmmanuel Vadot 559c66ec88fSEmmanuel Vadot - | 560c66ec88fSEmmanuel Vadot // Example 2 (ARM 32-bit, 8-cpu system, two clusters): 561c66ec88fSEmmanuel Vadot 562c66ec88fSEmmanuel Vadot cpus { 563c66ec88fSEmmanuel Vadot #size-cells = <0>; 564c66ec88fSEmmanuel Vadot #address-cells = <1>; 565c66ec88fSEmmanuel Vadot 566c66ec88fSEmmanuel Vadot cpu@0 { 567c66ec88fSEmmanuel Vadot device_type = "cpu"; 568c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a15"; 569c66ec88fSEmmanuel Vadot reg = <0x0>; 570c66ec88fSEmmanuel Vadot cpu-idle-states = <&cpu_sleep_0_0 &cluster_sleep_0>; 571c66ec88fSEmmanuel Vadot }; 572c66ec88fSEmmanuel Vadot 573c66ec88fSEmmanuel Vadot cpu@1 { 574c66ec88fSEmmanuel Vadot device_type = "cpu"; 575c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a15"; 576c66ec88fSEmmanuel Vadot reg = <0x1>; 577c66ec88fSEmmanuel Vadot cpu-idle-states = <&cpu_sleep_0_0 &cluster_sleep_0>; 578c66ec88fSEmmanuel Vadot }; 579c66ec88fSEmmanuel Vadot 580c66ec88fSEmmanuel Vadot cpu@2 { 581c66ec88fSEmmanuel Vadot device_type = "cpu"; 582c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a15"; 583c66ec88fSEmmanuel Vadot reg = <0x2>; 584c66ec88fSEmmanuel Vadot cpu-idle-states = <&cpu_sleep_0_0 &cluster_sleep_0>; 585c66ec88fSEmmanuel Vadot }; 586c66ec88fSEmmanuel Vadot 587c66ec88fSEmmanuel Vadot cpu@3 { 588c66ec88fSEmmanuel Vadot device_type = "cpu"; 589c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a15"; 590c66ec88fSEmmanuel Vadot reg = <0x3>; 591c66ec88fSEmmanuel Vadot cpu-idle-states = <&cpu_sleep_0_0 &cluster_sleep_0>; 592c66ec88fSEmmanuel Vadot }; 593c66ec88fSEmmanuel Vadot 594c66ec88fSEmmanuel Vadot cpu@100 { 595c66ec88fSEmmanuel Vadot device_type = "cpu"; 596c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a7"; 597c66ec88fSEmmanuel Vadot reg = <0x100>; 598c66ec88fSEmmanuel Vadot cpu-idle-states = <&cpu_sleep_1_0 &cluster_sleep_1>; 599c66ec88fSEmmanuel Vadot }; 600c66ec88fSEmmanuel Vadot 601c66ec88fSEmmanuel Vadot cpu@101 { 602c66ec88fSEmmanuel Vadot device_type = "cpu"; 603c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a7"; 604c66ec88fSEmmanuel Vadot reg = <0x101>; 605c66ec88fSEmmanuel Vadot cpu-idle-states = <&cpu_sleep_1_0 &cluster_sleep_1>; 606c66ec88fSEmmanuel Vadot }; 607c66ec88fSEmmanuel Vadot 608c66ec88fSEmmanuel Vadot cpu@102 { 609c66ec88fSEmmanuel Vadot device_type = "cpu"; 610c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a7"; 611c66ec88fSEmmanuel Vadot reg = <0x102>; 612c66ec88fSEmmanuel Vadot cpu-idle-states = <&cpu_sleep_1_0 &cluster_sleep_1>; 613c66ec88fSEmmanuel Vadot }; 614c66ec88fSEmmanuel Vadot 615c66ec88fSEmmanuel Vadot cpu@103 { 616c66ec88fSEmmanuel Vadot device_type = "cpu"; 617c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a7"; 618c66ec88fSEmmanuel Vadot reg = <0x103>; 619c66ec88fSEmmanuel Vadot cpu-idle-states = <&cpu_sleep_1_0 &cluster_sleep_1>; 620c66ec88fSEmmanuel Vadot }; 621c66ec88fSEmmanuel Vadot 622c66ec88fSEmmanuel Vadot idle-states { 623c66ec88fSEmmanuel Vadot cpu_sleep_0_0: cpu-sleep-0-0 { 624c66ec88fSEmmanuel Vadot compatible = "arm,idle-state"; 625c66ec88fSEmmanuel Vadot local-timer-stop; 626c66ec88fSEmmanuel Vadot entry-latency-us = <200>; 627c66ec88fSEmmanuel Vadot exit-latency-us = <100>; 628c66ec88fSEmmanuel Vadot min-residency-us = <400>; 629c66ec88fSEmmanuel Vadot wakeup-latency-us = <250>; 630c66ec88fSEmmanuel Vadot }; 631c66ec88fSEmmanuel Vadot 632c66ec88fSEmmanuel Vadot cluster_sleep_0: cluster-sleep-0 { 633c66ec88fSEmmanuel Vadot compatible = "arm,idle-state"; 634c66ec88fSEmmanuel Vadot local-timer-stop; 635c66ec88fSEmmanuel Vadot entry-latency-us = <500>; 636c66ec88fSEmmanuel Vadot exit-latency-us = <1500>; 637c66ec88fSEmmanuel Vadot min-residency-us = <2500>; 638c66ec88fSEmmanuel Vadot wakeup-latency-us = <1700>; 639c66ec88fSEmmanuel Vadot }; 640c66ec88fSEmmanuel Vadot 641c66ec88fSEmmanuel Vadot cpu_sleep_1_0: cpu-sleep-1-0 { 642c66ec88fSEmmanuel Vadot compatible = "arm,idle-state"; 643c66ec88fSEmmanuel Vadot local-timer-stop; 644c66ec88fSEmmanuel Vadot entry-latency-us = <300>; 645c66ec88fSEmmanuel Vadot exit-latency-us = <500>; 646c66ec88fSEmmanuel Vadot min-residency-us = <900>; 647c66ec88fSEmmanuel Vadot wakeup-latency-us = <600>; 648c66ec88fSEmmanuel Vadot }; 649c66ec88fSEmmanuel Vadot 650c66ec88fSEmmanuel Vadot cluster_sleep_1: cluster-sleep-1 { 651c66ec88fSEmmanuel Vadot compatible = "arm,idle-state"; 652c66ec88fSEmmanuel Vadot local-timer-stop; 653c66ec88fSEmmanuel Vadot entry-latency-us = <800>; 654c66ec88fSEmmanuel Vadot exit-latency-us = <2000>; 655c66ec88fSEmmanuel Vadot min-residency-us = <6500>; 656c66ec88fSEmmanuel Vadot wakeup-latency-us = <2300>; 657c66ec88fSEmmanuel Vadot }; 658c66ec88fSEmmanuel Vadot }; 659c66ec88fSEmmanuel Vadot }; 660c66ec88fSEmmanuel Vadot 661c66ec88fSEmmanuel Vadot... 662