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