xref: /openbmc/linux/Documentation/devicetree/bindings/cpu/idle-states.yaml (revision 2612e3bbc0386368a850140a6c9b990cd496a5ec)
11bd524f7SAnup Patel# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
21bd524f7SAnup Patel%YAML 1.2
31bd524f7SAnup Patel---
41bd524f7SAnup Patel$id: http://devicetree.org/schemas/cpu/idle-states.yaml#
51bd524f7SAnup Patel$schema: http://devicetree.org/meta-schemas/core.yaml#
61bd524f7SAnup Patel
79fa3ad1aSKrzysztof Kozlowskititle: Idle states
81bd524f7SAnup Patel
91bd524f7SAnup Patelmaintainers:
101bd524f7SAnup Patel  - Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
111bd524f7SAnup Patel  - Anup Patel <anup@brainfault.org>
121bd524f7SAnup Patel
131bd524f7SAnup Pateldescription: |+
141bd524f7SAnup Patel  ==========================================
151bd524f7SAnup Patel  1 - Introduction
161bd524f7SAnup Patel  ==========================================
171bd524f7SAnup Patel
181bd524f7SAnup Patel  ARM and RISC-V systems contain HW capable of managing power consumption
191bd524f7SAnup Patel  dynamically, where cores can be put in different low-power states (ranging
201bd524f7SAnup Patel  from simple wfi to power gating) according to OS PM policies. The CPU states
211bd524f7SAnup Patel  representing the range of dynamic idle states that a processor can enter at
221bd524f7SAnup Patel  run-time, can be specified through device tree bindings representing the
231bd524f7SAnup Patel  parameters required to enter/exit specific idle states on a given processor.
241bd524f7SAnup Patel
251bd524f7SAnup Patel  ==========================================
261bd524f7SAnup Patel  2 - ARM idle states
271bd524f7SAnup Patel  ==========================================
281bd524f7SAnup Patel
291bd524f7SAnup Patel  According to the Server Base System Architecture document (SBSA, [3]), the
301bd524f7SAnup Patel  power states an ARM CPU can be put into are identified by the following list:
311bd524f7SAnup Patel
321bd524f7SAnup Patel  - Running
331bd524f7SAnup Patel  - Idle_standby
341bd524f7SAnup Patel  - Idle_retention
351bd524f7SAnup Patel  - Sleep
361bd524f7SAnup Patel  - Off
371bd524f7SAnup Patel
381bd524f7SAnup Patel  The power states described in the SBSA document define the basic CPU states on
391bd524f7SAnup Patel  top of which ARM platforms implement power management schemes that allow an OS
401bd524f7SAnup Patel  PM implementation to put the processor in different idle states (which include
411bd524f7SAnup Patel  states listed above; "off" state is not an idle state since it does not have
421bd524f7SAnup Patel  wake-up capabilities, hence it is not considered in this document).
431bd524f7SAnup Patel
441bd524f7SAnup Patel  Idle state parameters (e.g. entry latency) are platform specific and need to
451bd524f7SAnup Patel  be characterized with bindings that provide the required information to OS PM
461bd524f7SAnup Patel  code so that it can build the required tables and use them at runtime.
471bd524f7SAnup Patel
481bd524f7SAnup Patel  The device tree binding definition for ARM idle states is the subject of this
491bd524f7SAnup Patel  document.
501bd524f7SAnup Patel
511bd524f7SAnup Patel  ==========================================
521bd524f7SAnup Patel  3 - RISC-V idle states
531bd524f7SAnup Patel  ==========================================
541bd524f7SAnup Patel
551bd524f7SAnup Patel  On RISC-V systems, the HARTs (or CPUs) [6] can be put in platform specific
561bd524f7SAnup Patel  suspend (or idle) states (ranging from simple WFI, power gating, etc). The
571bd524f7SAnup Patel  RISC-V SBI v0.3 (or higher) [7] hart state management extension provides a
581bd524f7SAnup Patel  standard mechanism for OS to request HART state transitions.
591bd524f7SAnup Patel
601bd524f7SAnup Patel  The platform specific suspend (or idle) states of a hart can be either
611bd524f7SAnup Patel  retentive or non-rententive in nature. A retentive suspend state will
621bd524f7SAnup Patel  preserve HART registers and CSR values for all privilege modes whereas
631bd524f7SAnup Patel  a non-retentive suspend state will not preserve HART registers and CSR
641bd524f7SAnup Patel  values.
651bd524f7SAnup Patel
661bd524f7SAnup Patel  ===========================================
671bd524f7SAnup Patel  4 - idle-states definitions
681bd524f7SAnup Patel  ===========================================
691bd524f7SAnup Patel
701bd524f7SAnup Patel  Idle states are characterized for a specific system through a set of
711bd524f7SAnup Patel  timing and energy related properties, that underline the HW behaviour
721bd524f7SAnup Patel  triggered upon idle states entry and exit.
731bd524f7SAnup Patel
741bd524f7SAnup Patel  The following diagram depicts the CPU execution phases and related timing
751bd524f7SAnup Patel  properties required to enter and exit an idle state:
761bd524f7SAnup Patel
771bd524f7SAnup Patel  ..__[EXEC]__|__[PREP]__|__[ENTRY]__|__[IDLE]__|__[EXIT]__|__[EXEC]__..
781bd524f7SAnup Patel              |          |           |          |          |
791bd524f7SAnup Patel
801bd524f7SAnup Patel              |<------ entry ------->|
811bd524f7SAnup Patel              |       latency        |
821bd524f7SAnup Patel                                                |<- exit ->|
831bd524f7SAnup Patel                                                |  latency |
841bd524f7SAnup Patel              |<-------- min-residency -------->|
851bd524f7SAnup Patel                         |<-------  wakeup-latency ------->|
861bd524f7SAnup Patel
871bd524f7SAnup Patel      Diagram 1: CPU idle state execution phases
881bd524f7SAnup Patel
891bd524f7SAnup Patel  EXEC:  Normal CPU execution.
901bd524f7SAnup Patel
911bd524f7SAnup Patel  PREP:  Preparation phase before committing the hardware to idle mode
921bd524f7SAnup Patel    like cache flushing. This is abortable on pending wake-up
931bd524f7SAnup Patel    event conditions. The abort latency is assumed to be negligible
941bd524f7SAnup Patel    (i.e. less than the ENTRY + EXIT duration). If aborted, CPU
951bd524f7SAnup Patel    goes back to EXEC. This phase is optional. If not abortable,
961bd524f7SAnup Patel    this should be included in the ENTRY phase instead.
971bd524f7SAnup Patel
981bd524f7SAnup Patel  ENTRY:  The hardware is committed to idle mode. This period must run
991bd524f7SAnup Patel    to completion up to IDLE before anything else can happen.
1001bd524f7SAnup Patel
1011bd524f7SAnup Patel  IDLE:  This is the actual energy-saving idle period. This may last
1021bd524f7SAnup Patel    between 0 and infinite time, until a wake-up event occurs.
1031bd524f7SAnup Patel
1041bd524f7SAnup Patel  EXIT:  Period during which the CPU is brought back to operational
1051bd524f7SAnup Patel    mode (EXEC).
1061bd524f7SAnup Patel
1071bd524f7SAnup Patel  entry-latency: Worst case latency required to enter the idle state. The
1081bd524f7SAnup Patel  exit-latency may be guaranteed only after entry-latency has passed.
1091bd524f7SAnup Patel
1101bd524f7SAnup Patel  min-residency: Minimum period, including preparation and entry, for a given
1111bd524f7SAnup Patel  idle state to be worthwhile energywise.
1121bd524f7SAnup Patel
1131bd524f7SAnup Patel  wakeup-latency: Maximum delay between the signaling of a wake-up event and the
1141bd524f7SAnup Patel  CPU being able to execute normal code again. If not specified, this is assumed
1151bd524f7SAnup Patel  to be entry-latency + exit-latency.
1161bd524f7SAnup Patel
1171bd524f7SAnup Patel  These timing parameters can be used by an OS in different circumstances.
1181bd524f7SAnup Patel
1191bd524f7SAnup Patel  An idle CPU requires the expected min-residency time to select the most
1201bd524f7SAnup Patel  appropriate idle state based on the expected expiry time of the next IRQ
1211bd524f7SAnup Patel  (i.e. wake-up) that causes the CPU to return to the EXEC phase.
1221bd524f7SAnup Patel
1231bd524f7SAnup Patel  An operating system scheduler may need to compute the shortest wake-up delay
1241bd524f7SAnup Patel  for CPUs in the system by detecting how long will it take to get a CPU out
1251bd524f7SAnup Patel  of an idle state, e.g.:
1261bd524f7SAnup Patel
1271bd524f7SAnup Patel  wakeup-delay = exit-latency + max(entry-latency - (now - entry-timestamp), 0)
1281bd524f7SAnup Patel
1291bd524f7SAnup Patel  In other words, the scheduler can make its scheduling decision by selecting
1301bd524f7SAnup Patel  (e.g. waking-up) the CPU with the shortest wake-up delay.
1311bd524f7SAnup Patel  The wake-up delay must take into account the entry latency if that period
1321bd524f7SAnup Patel  has not expired. The abortable nature of the PREP period can be ignored
1331bd524f7SAnup Patel  if it cannot be relied upon (e.g. the PREP deadline may occur much sooner than
1341bd524f7SAnup Patel  the worst case since it depends on the CPU operating conditions, i.e. caches
1351bd524f7SAnup Patel  state).
1361bd524f7SAnup Patel
1371bd524f7SAnup Patel  An OS has to reliably probe the wakeup-latency since some devices can enforce
1381bd524f7SAnup Patel  latency constraint guarantees to work properly, so the OS has to detect the
1391bd524f7SAnup Patel  worst case wake-up latency it can incur if a CPU is allowed to enter an
1401bd524f7SAnup Patel  idle state, and possibly to prevent that to guarantee reliable device
1411bd524f7SAnup Patel  functioning.
1421bd524f7SAnup Patel
1431bd524f7SAnup Patel  The min-residency time parameter deserves further explanation since it is
1441bd524f7SAnup Patel  expressed in time units but must factor in energy consumption coefficients.
1451bd524f7SAnup Patel
1461bd524f7SAnup Patel  The energy consumption of a cpu when it enters a power state can be roughly
1471bd524f7SAnup Patel  characterised by the following graph:
1481bd524f7SAnup Patel
1491bd524f7SAnup Patel                 |
1501bd524f7SAnup Patel                 |
1511bd524f7SAnup Patel                 |
1521bd524f7SAnup Patel             e   |
1531bd524f7SAnup Patel             n   |                                      /---
1541bd524f7SAnup Patel             e   |                               /------
1551bd524f7SAnup Patel             r   |                        /------
1561bd524f7SAnup Patel             g   |                  /-----
1571bd524f7SAnup Patel             y   |           /------
1581bd524f7SAnup Patel                 |       ----
1591bd524f7SAnup Patel                 |      /|
1601bd524f7SAnup Patel                 |     / |
1611bd524f7SAnup Patel                 |    /  |
1621bd524f7SAnup Patel                 |   /   |
1631bd524f7SAnup Patel                 |  /    |
1641bd524f7SAnup Patel                 | /     |
1651bd524f7SAnup Patel                 |/      |
1661bd524f7SAnup Patel            -----|-------+----------------------------------
1671bd524f7SAnup Patel                0|       1                              time(ms)
1681bd524f7SAnup Patel
1691bd524f7SAnup Patel      Graph 1: Energy vs time example
1701bd524f7SAnup Patel
1711bd524f7SAnup Patel  The graph is split in two parts delimited by time 1ms on the X-axis.
1721bd524f7SAnup Patel  The graph curve with X-axis values = { x | 0 < x < 1ms } has a steep slope
1731bd524f7SAnup Patel  and denotes the energy costs incurred while entering and leaving the idle
1741bd524f7SAnup Patel  state.
1751bd524f7SAnup Patel  The graph curve in the area delimited by X-axis values = {x | x > 1ms } has
1761bd524f7SAnup Patel  shallower slope and essentially represents the energy consumption of the idle
1771bd524f7SAnup Patel  state.
1781bd524f7SAnup Patel
1791bd524f7SAnup Patel  min-residency is defined for a given idle state as the minimum expected
1801bd524f7SAnup Patel  residency time for a state (inclusive of preparation and entry) after
1811bd524f7SAnup Patel  which choosing that state become the most energy efficient option. A good
1821bd524f7SAnup Patel  way to visualise this, is by taking the same graph above and comparing some
1831bd524f7SAnup Patel  states energy consumptions plots.
1841bd524f7SAnup Patel
1851bd524f7SAnup Patel  For sake of simplicity, let's consider a system with two idle states IDLE1,
1861bd524f7SAnup Patel  and IDLE2:
1871bd524f7SAnup Patel
1881bd524f7SAnup Patel            |
1891bd524f7SAnup Patel            |
1901bd524f7SAnup Patel            |
1911bd524f7SAnup Patel            |                                                  /-- IDLE1
1921bd524f7SAnup Patel         e  |                                              /---
1931bd524f7SAnup Patel         n  |                                         /----
1941bd524f7SAnup Patel         e  |                                     /---
1951bd524f7SAnup Patel         r  |                                /-----/--------- IDLE2
1961bd524f7SAnup Patel         g  |                    /-------/---------
1971bd524f7SAnup Patel         y  |        ------------    /---|
1981bd524f7SAnup Patel            |       /           /----    |
1991bd524f7SAnup Patel            |      /        /---         |
2001bd524f7SAnup Patel            |     /    /----             |
2011bd524f7SAnup Patel            |    / /---                  |
2021bd524f7SAnup Patel            |   ---                      |
2031bd524f7SAnup Patel            |  /                         |
2041bd524f7SAnup Patel            | /                          |
2051bd524f7SAnup Patel            |/                           |                  time
2061bd524f7SAnup Patel         ---/----------------------------+------------------------
2071bd524f7SAnup Patel            |IDLE1-energy < IDLE2-energy | IDLE2-energy < IDLE1-energy
2081bd524f7SAnup Patel                                         |
2091bd524f7SAnup Patel                                  IDLE2-min-residency
2101bd524f7SAnup Patel
2111bd524f7SAnup Patel      Graph 2: idle states min-residency example
2121bd524f7SAnup Patel
2131bd524f7SAnup Patel  In graph 2 above, that takes into account idle states entry/exit energy
2141bd524f7SAnup Patel  costs, it is clear that if the idle state residency time (i.e. time till next
2151bd524f7SAnup Patel  wake-up IRQ) is less than IDLE2-min-residency, IDLE1 is the better idle state
2161bd524f7SAnup Patel  choice energywise.
2171bd524f7SAnup Patel
2181bd524f7SAnup Patel  This is mainly down to the fact that IDLE1 entry/exit energy costs are lower
2191bd524f7SAnup Patel  than IDLE2.
2201bd524f7SAnup Patel
2211bd524f7SAnup Patel  However, the lower power consumption (i.e. shallower energy curve slope) of
2221bd524f7SAnup Patel  idle state IDLE2 implies that after a suitable time, IDLE2 becomes more energy
2231bd524f7SAnup Patel  efficient.
2241bd524f7SAnup Patel
2251bd524f7SAnup Patel  The time at which IDLE2 becomes more energy efficient than IDLE1 (and other
2261bd524f7SAnup Patel  shallower states in a system with multiple idle states) is defined
2271bd524f7SAnup Patel  IDLE2-min-residency and corresponds to the time when energy consumption of
2281bd524f7SAnup Patel  IDLE1 and IDLE2 states breaks even.
2291bd524f7SAnup Patel
2301bd524f7SAnup Patel  The definitions provided in this section underpin the idle states
2311bd524f7SAnup Patel  properties specification that is the subject of the following sections.
2321bd524f7SAnup Patel
2331bd524f7SAnup Patel  ===========================================
2341bd524f7SAnup Patel  5 - idle-states node
2351bd524f7SAnup Patel  ===========================================
2361bd524f7SAnup Patel
2371bd524f7SAnup Patel  The processor idle states are defined within the idle-states node, which is
2381bd524f7SAnup Patel  a direct child of the cpus node [1] and provides a container where the
2391bd524f7SAnup Patel  processor idle states, defined as device tree nodes, are listed.
2401bd524f7SAnup Patel
2411bd524f7SAnup Patel  On ARM systems, it is a container of processor idle states nodes. If the
2421bd524f7SAnup Patel  system does not provide CPU power management capabilities, or the processor
2431bd524f7SAnup Patel  just supports idle_standby, an idle-states node is not required.
2441bd524f7SAnup Patel
2451bd524f7SAnup Patel  ===========================================
2461bd524f7SAnup Patel  6 - References
2471bd524f7SAnup Patel  ===========================================
2481bd524f7SAnup Patel
2491bd524f7SAnup Patel  [1] ARM Linux Kernel documentation - CPUs bindings
2501bd524f7SAnup Patel      Documentation/devicetree/bindings/arm/cpus.yaml
2511bd524f7SAnup Patel
2521bd524f7SAnup Patel  [2] ARM Linux Kernel documentation - PSCI bindings
2531bd524f7SAnup Patel      Documentation/devicetree/bindings/arm/psci.yaml
2541bd524f7SAnup Patel
2551bd524f7SAnup Patel  [3] ARM Server Base System Architecture (SBSA)
2561bd524f7SAnup Patel      http://infocenter.arm.com/help/index.jsp
2571bd524f7SAnup Patel
2581bd524f7SAnup Patel  [4] ARM Architecture Reference Manuals
2591bd524f7SAnup Patel      http://infocenter.arm.com/help/index.jsp
2601bd524f7SAnup Patel
2611bd524f7SAnup Patel  [5] ARM Linux Kernel documentation - Booting AArch64 Linux
262*a0468d4eSJonathan Corbet      Documentation/arch/arm64/booting.rst
2631bd524f7SAnup Patel
2641bd524f7SAnup Patel  [6] RISC-V Linux Kernel documentation - CPUs bindings
2651bd524f7SAnup Patel      Documentation/devicetree/bindings/riscv/cpus.yaml
2661bd524f7SAnup Patel
2671bd524f7SAnup Patel  [7] RISC-V Supervisor Binary Interface (SBI)
2681bd524f7SAnup Patel      http://github.com/riscv/riscv-sbi-doc/riscv-sbi.adoc
2691bd524f7SAnup Patel
2701bd524f7SAnup Patelproperties:
2711bd524f7SAnup Patel  $nodename:
2721bd524f7SAnup Patel    const: idle-states
2731bd524f7SAnup Patel
2741bd524f7SAnup Patel  entry-method:
2751bd524f7SAnup Patel    description: |
2761bd524f7SAnup Patel      Usage and definition depend on ARM architecture version.
2771bd524f7SAnup Patel
2781bd524f7SAnup Patel      On ARM v8 64-bit this property is required.
2791bd524f7SAnup Patel      On ARM 32-bit systems this property is optional
2801bd524f7SAnup Patel
2811bd524f7SAnup Patel      This assumes that the "enable-method" property is set to "psci" in the cpu
2821bd524f7SAnup Patel      node[5] that is responsible for setting up CPU idle management in the OS
2831bd524f7SAnup Patel      implementation.
2841bd524f7SAnup Patel    const: psci
2851bd524f7SAnup Patel
2861bd524f7SAnup PatelpatternProperties:
2871bd524f7SAnup Patel  "^(cpu|cluster)-":
2881bd524f7SAnup Patel    type: object
2891bd524f7SAnup Patel    description: |
2901bd524f7SAnup Patel      Each state node represents an idle state description and must be defined
2911bd524f7SAnup Patel      as follows.
2921bd524f7SAnup Patel
2931bd524f7SAnup Patel      The idle state entered by executing the wfi instruction (idle_standby
2941bd524f7SAnup Patel      SBSA,[3][4]) is considered standard on all ARM and RISC-V platforms and
2951bd524f7SAnup Patel      therefore must not be listed.
2961bd524f7SAnup Patel
2971bd524f7SAnup Patel      In addition to the properties listed above, a state node may require
2981bd524f7SAnup Patel      additional properties specific to the entry-method defined in the
2991bd524f7SAnup Patel      idle-states node. Please refer to the entry-method bindings
3001bd524f7SAnup Patel      documentation for properties definitions.
3011bd524f7SAnup Patel
3021bd524f7SAnup Patel    properties:
3031bd524f7SAnup Patel      compatible:
3041bd524f7SAnup Patel        enum:
3051bd524f7SAnup Patel          - arm,idle-state
3061bd524f7SAnup Patel          - riscv,idle-state
3071bd524f7SAnup Patel
3081bd524f7SAnup Patel      arm,psci-suspend-param:
3091bd524f7SAnup Patel        $ref: /schemas/types.yaml#/definitions/uint32
3101bd524f7SAnup Patel        description: |
3111bd524f7SAnup Patel          power_state parameter to pass to the ARM PSCI suspend call.
3121bd524f7SAnup Patel
3131bd524f7SAnup Patel          Device tree nodes that require usage of PSCI CPU_SUSPEND function
3141bd524f7SAnup Patel          (i.e. idle states node with entry-method property is set to "psci")
3151bd524f7SAnup Patel          must specify this property.
3161bd524f7SAnup Patel
3171bd524f7SAnup Patel      riscv,sbi-suspend-param:
3181bd524f7SAnup Patel        $ref: /schemas/types.yaml#/definitions/uint32
3191bd524f7SAnup Patel        description: |
3201bd524f7SAnup Patel          suspend_type parameter to pass to the RISC-V SBI HSM suspend call.
3211bd524f7SAnup Patel
3221bd524f7SAnup Patel          This property is required in idle state nodes of device tree meant
3231bd524f7SAnup Patel          for RISC-V systems. For more details on the suspend_type parameter
3241bd524f7SAnup Patel          refer the SBI specifiation v0.3 (or higher) [7].
3251bd524f7SAnup Patel
3261bd524f7SAnup Patel      local-timer-stop:
3271bd524f7SAnup Patel        description:
3281bd524f7SAnup Patel          If present the CPU local timer control logic is
3291bd524f7SAnup Patel             lost on state entry, otherwise it is retained.
3301bd524f7SAnup Patel        type: boolean
3311bd524f7SAnup Patel
3321bd524f7SAnup Patel      entry-latency-us:
3331bd524f7SAnup Patel        description:
3341bd524f7SAnup Patel          Worst case latency in microseconds required to enter the idle state.
3351bd524f7SAnup Patel
3361bd524f7SAnup Patel      exit-latency-us:
3371bd524f7SAnup Patel        description:
3381bd524f7SAnup Patel          Worst case latency in microseconds required to exit the idle state.
3391bd524f7SAnup Patel          The exit-latency-us duration may be guaranteed only after
3401bd524f7SAnup Patel          entry-latency-us has passed.
3411bd524f7SAnup Patel
3421bd524f7SAnup Patel      min-residency-us:
3431bd524f7SAnup Patel        description:
3441bd524f7SAnup Patel          Minimum residency duration in microseconds, inclusive of preparation
3451bd524f7SAnup Patel          and entry, for this idle state to be considered worthwhile energy wise
3461bd524f7SAnup Patel          (refer to section 2 of this document for a complete description).
3471bd524f7SAnup Patel
3481bd524f7SAnup Patel      wakeup-latency-us:
3491bd524f7SAnup Patel        description: |
3501bd524f7SAnup Patel          Maximum delay between the signaling of a wake-up event and the CPU
3511bd524f7SAnup Patel          being able to execute normal code again. If omitted, this is assumed
3521bd524f7SAnup Patel          to be equal to:
3531bd524f7SAnup Patel
3541bd524f7SAnup Patel            entry-latency-us + exit-latency-us
3551bd524f7SAnup Patel
3561bd524f7SAnup Patel          It is important to supply this value on systems where the duration of
3571bd524f7SAnup Patel          PREP phase (see diagram 1, section 2) is non-neglibigle. In such
3581bd524f7SAnup Patel          systems entry-latency-us + exit-latency-us will exceed
3591bd524f7SAnup Patel          wakeup-latency-us by this duration.
3601bd524f7SAnup Patel
3611bd524f7SAnup Patel      idle-state-name:
3621bd524f7SAnup Patel        $ref: /schemas/types.yaml#/definitions/string
3631bd524f7SAnup Patel        description:
3641bd524f7SAnup Patel          A string used as a descriptive name for the idle state.
3651bd524f7SAnup Patel
3661bd524f7SAnup Patel    additionalProperties: false
3671bd524f7SAnup Patel
3681bd524f7SAnup Patel    required:
3691bd524f7SAnup Patel      - compatible
3701bd524f7SAnup Patel      - entry-latency-us
3711bd524f7SAnup Patel      - exit-latency-us
3721bd524f7SAnup Patel      - min-residency-us
3731bd524f7SAnup Patel
3741bd524f7SAnup PateladditionalProperties: false
3751bd524f7SAnup Patel
3761bd524f7SAnup Patelexamples:
3771bd524f7SAnup Patel  - |
3781bd524f7SAnup Patel
3791bd524f7SAnup Patel    cpus {
3801bd524f7SAnup Patel        #size-cells = <0>;
3811bd524f7SAnup Patel        #address-cells = <2>;
3821bd524f7SAnup Patel
3831bd524f7SAnup Patel        cpu@0 {
3841bd524f7SAnup Patel            device_type = "cpu";
3851bd524f7SAnup Patel            compatible = "arm,cortex-a57";
3861bd524f7SAnup Patel            reg = <0x0 0x0>;
3871bd524f7SAnup Patel            enable-method = "psci";
388a3dfc532SLinus Torvalds            cpu-idle-states = <&CPU_RETENTION_0_0>, <&CPU_SLEEP_0_0>,
389a3dfc532SLinus Torvalds                    <&CLUSTER_RETENTION_0>, <&CLUSTER_SLEEP_0>;
3901bd524f7SAnup Patel        };
3911bd524f7SAnup Patel
3921bd524f7SAnup Patel        cpu@1 {
3931bd524f7SAnup Patel            device_type = "cpu";
3941bd524f7SAnup Patel            compatible = "arm,cortex-a57";
3951bd524f7SAnup Patel            reg = <0x0 0x1>;
3961bd524f7SAnup Patel            enable-method = "psci";
397a3dfc532SLinus Torvalds            cpu-idle-states = <&CPU_RETENTION_0_0>, <&CPU_SLEEP_0_0>,
398a3dfc532SLinus Torvalds                    <&CLUSTER_RETENTION_0>, <&CLUSTER_SLEEP_0>;
3991bd524f7SAnup Patel        };
4001bd524f7SAnup Patel
4011bd524f7SAnup Patel        cpu@100 {
4021bd524f7SAnup Patel            device_type = "cpu";
4031bd524f7SAnup Patel            compatible = "arm,cortex-a57";
4041bd524f7SAnup Patel            reg = <0x0 0x100>;
4051bd524f7SAnup Patel            enable-method = "psci";
406a3dfc532SLinus Torvalds            cpu-idle-states = <&CPU_RETENTION_0_0>, <&CPU_SLEEP_0_0>,
407a3dfc532SLinus Torvalds                    <&CLUSTER_RETENTION_0>, <&CLUSTER_SLEEP_0>;
4081bd524f7SAnup Patel        };
4091bd524f7SAnup Patel
4101bd524f7SAnup Patel        cpu@101 {
4111bd524f7SAnup Patel            device_type = "cpu";
4121bd524f7SAnup Patel            compatible = "arm,cortex-a57";
4131bd524f7SAnup Patel            reg = <0x0 0x101>;
4141bd524f7SAnup Patel            enable-method = "psci";
415a3dfc532SLinus Torvalds            cpu-idle-states = <&CPU_RETENTION_0_0>, <&CPU_SLEEP_0_0>,
416a3dfc532SLinus Torvalds                    <&CLUSTER_RETENTION_0>, <&CLUSTER_SLEEP_0>;
4171bd524f7SAnup Patel        };
4181bd524f7SAnup Patel
4191bd524f7SAnup Patel        cpu@10000 {
4201bd524f7SAnup Patel            device_type = "cpu";
4211bd524f7SAnup Patel            compatible = "arm,cortex-a57";
4221bd524f7SAnup Patel            reg = <0x0 0x10000>;
4231bd524f7SAnup Patel            enable-method = "psci";
424a3dfc532SLinus Torvalds            cpu-idle-states = <&CPU_RETENTION_0_0>, <&CPU_SLEEP_0_0>,
425a3dfc532SLinus Torvalds                    <&CLUSTER_RETENTION_0>, <&CLUSTER_SLEEP_0>;
4261bd524f7SAnup Patel        };
4271bd524f7SAnup Patel
4281bd524f7SAnup Patel        cpu@10001 {
4291bd524f7SAnup Patel            device_type = "cpu";
4301bd524f7SAnup Patel            compatible = "arm,cortex-a57";
4311bd524f7SAnup Patel            reg = <0x0 0x10001>;
4321bd524f7SAnup Patel            enable-method = "psci";
433a3dfc532SLinus Torvalds            cpu-idle-states = <&CPU_RETENTION_0_0>, <&CPU_SLEEP_0_0>,
434a3dfc532SLinus Torvalds                    <&CLUSTER_RETENTION_0>, <&CLUSTER_SLEEP_0>;
4351bd524f7SAnup Patel        };
4361bd524f7SAnup Patel
4371bd524f7SAnup Patel        cpu@10100 {
4381bd524f7SAnup Patel            device_type = "cpu";
4391bd524f7SAnup Patel            compatible = "arm,cortex-a57";
4401bd524f7SAnup Patel            reg = <0x0 0x10100>;
4411bd524f7SAnup Patel            enable-method = "psci";
442a3dfc532SLinus Torvalds            cpu-idle-states = <&CPU_RETENTION_0_0>, <&CPU_SLEEP_0_0>,
443a3dfc532SLinus Torvalds                    <&CLUSTER_RETENTION_0>, <&CLUSTER_SLEEP_0>;
4441bd524f7SAnup Patel        };
4451bd524f7SAnup Patel
4461bd524f7SAnup Patel        cpu@10101 {
4471bd524f7SAnup Patel            device_type = "cpu";
4481bd524f7SAnup Patel            compatible = "arm,cortex-a57";
4491bd524f7SAnup Patel            reg = <0x0 0x10101>;
4501bd524f7SAnup Patel            enable-method = "psci";
451a3dfc532SLinus Torvalds            cpu-idle-states = <&CPU_RETENTION_0_0>, <&CPU_SLEEP_0_0>,
452a3dfc532SLinus Torvalds                    <&CLUSTER_RETENTION_0>, <&CLUSTER_SLEEP_0>;
4531bd524f7SAnup Patel        };
4541bd524f7SAnup Patel
4551bd524f7SAnup Patel        cpu@100000000 {
4561bd524f7SAnup Patel            device_type = "cpu";
4571bd524f7SAnup Patel            compatible = "arm,cortex-a53";
4581bd524f7SAnup Patel            reg = <0x1 0x0>;
4591bd524f7SAnup Patel            enable-method = "psci";
460a3dfc532SLinus Torvalds            cpu-idle-states = <&CPU_RETENTION_1_0>, <&CPU_SLEEP_1_0>,
461a3dfc532SLinus Torvalds                    <&CLUSTER_RETENTION_1>, <&CLUSTER_SLEEP_1>;
4621bd524f7SAnup Patel        };
4631bd524f7SAnup Patel
4641bd524f7SAnup Patel        cpu@100000001 {
4651bd524f7SAnup Patel            device_type = "cpu";
4661bd524f7SAnup Patel            compatible = "arm,cortex-a53";
4671bd524f7SAnup Patel            reg = <0x1 0x1>;
4681bd524f7SAnup Patel            enable-method = "psci";
469a3dfc532SLinus Torvalds            cpu-idle-states = <&CPU_RETENTION_1_0>, <&CPU_SLEEP_1_0>,
470a3dfc532SLinus Torvalds                    <&CLUSTER_RETENTION_1>, <&CLUSTER_SLEEP_1>;
4711bd524f7SAnup Patel        };
4721bd524f7SAnup Patel
4731bd524f7SAnup Patel        cpu@100000100 {
4741bd524f7SAnup Patel            device_type = "cpu";
4751bd524f7SAnup Patel            compatible = "arm,cortex-a53";
4761bd524f7SAnup Patel            reg = <0x1 0x100>;
4771bd524f7SAnup Patel            enable-method = "psci";
478a3dfc532SLinus Torvalds            cpu-idle-states = <&CPU_RETENTION_1_0>, <&CPU_SLEEP_1_0>,
479a3dfc532SLinus Torvalds                    <&CLUSTER_RETENTION_1>, <&CLUSTER_SLEEP_1>;
4801bd524f7SAnup Patel        };
4811bd524f7SAnup Patel
4821bd524f7SAnup Patel        cpu@100000101 {
4831bd524f7SAnup Patel            device_type = "cpu";
4841bd524f7SAnup Patel            compatible = "arm,cortex-a53";
4851bd524f7SAnup Patel            reg = <0x1 0x101>;
4861bd524f7SAnup Patel            enable-method = "psci";
487a3dfc532SLinus Torvalds            cpu-idle-states = <&CPU_RETENTION_1_0>, <&CPU_SLEEP_1_0>,
488a3dfc532SLinus Torvalds                    <&CLUSTER_RETENTION_1>, <&CLUSTER_SLEEP_1>;
4891bd524f7SAnup Patel        };
4901bd524f7SAnup Patel
4911bd524f7SAnup Patel        cpu@100010000 {
4921bd524f7SAnup Patel            device_type = "cpu";
4931bd524f7SAnup Patel            compatible = "arm,cortex-a53";
4941bd524f7SAnup Patel            reg = <0x1 0x10000>;
4951bd524f7SAnup Patel            enable-method = "psci";
496a3dfc532SLinus Torvalds            cpu-idle-states = <&CPU_RETENTION_1_0>, <&CPU_SLEEP_1_0>,
497a3dfc532SLinus Torvalds                    <&CLUSTER_RETENTION_1>, <&CLUSTER_SLEEP_1>;
4981bd524f7SAnup Patel        };
4991bd524f7SAnup Patel
5001bd524f7SAnup Patel        cpu@100010001 {
5011bd524f7SAnup Patel            device_type = "cpu";
5021bd524f7SAnup Patel            compatible = "arm,cortex-a53";
5031bd524f7SAnup Patel            reg = <0x1 0x10001>;
5041bd524f7SAnup Patel            enable-method = "psci";
505a3dfc532SLinus Torvalds            cpu-idle-states = <&CPU_RETENTION_1_0>, <&CPU_SLEEP_1_0>,
506a3dfc532SLinus Torvalds                    <&CLUSTER_RETENTION_1>, <&CLUSTER_SLEEP_1>;
5071bd524f7SAnup Patel        };
5081bd524f7SAnup Patel
5091bd524f7SAnup Patel        cpu@100010100 {
5101bd524f7SAnup Patel            device_type = "cpu";
5111bd524f7SAnup Patel            compatible = "arm,cortex-a53";
5121bd524f7SAnup Patel            reg = <0x1 0x10100>;
5131bd524f7SAnup Patel            enable-method = "psci";
514a3dfc532SLinus Torvalds            cpu-idle-states = <&CPU_RETENTION_1_0>, <&CPU_SLEEP_1_0>,
515a3dfc532SLinus Torvalds                    <&CLUSTER_RETENTION_1>, <&CLUSTER_SLEEP_1>;
5161bd524f7SAnup Patel        };
5171bd524f7SAnup Patel
5181bd524f7SAnup Patel        cpu@100010101 {
5191bd524f7SAnup Patel            device_type = "cpu";
5201bd524f7SAnup Patel            compatible = "arm,cortex-a53";
5211bd524f7SAnup Patel            reg = <0x1 0x10101>;
5221bd524f7SAnup Patel            enable-method = "psci";
523a3dfc532SLinus Torvalds            cpu-idle-states = <&CPU_RETENTION_1_0>, <&CPU_SLEEP_1_0>,
524a3dfc532SLinus Torvalds                    <&CLUSTER_RETENTION_1>, <&CLUSTER_SLEEP_1>;
5251bd524f7SAnup Patel        };
5261bd524f7SAnup Patel
5271bd524f7SAnup Patel        idle-states {
5281bd524f7SAnup Patel            entry-method = "psci";
5291bd524f7SAnup Patel
5301bd524f7SAnup Patel            CPU_RETENTION_0_0: cpu-retention-0-0 {
5311bd524f7SAnup Patel                compatible = "arm,idle-state";
5321bd524f7SAnup Patel                arm,psci-suspend-param = <0x0010000>;
5331bd524f7SAnup Patel                entry-latency-us = <20>;
5341bd524f7SAnup Patel                exit-latency-us = <40>;
5351bd524f7SAnup Patel                min-residency-us = <80>;
5361bd524f7SAnup Patel            };
5371bd524f7SAnup Patel
5381bd524f7SAnup Patel            CLUSTER_RETENTION_0: cluster-retention-0 {
5391bd524f7SAnup Patel                compatible = "arm,idle-state";
5401bd524f7SAnup Patel                local-timer-stop;
5411bd524f7SAnup Patel                arm,psci-suspend-param = <0x1010000>;
5421bd524f7SAnup Patel                entry-latency-us = <50>;
5431bd524f7SAnup Patel                exit-latency-us = <100>;
5441bd524f7SAnup Patel                min-residency-us = <250>;
5451bd524f7SAnup Patel                wakeup-latency-us = <130>;
5461bd524f7SAnup Patel            };
5471bd524f7SAnup Patel
5481bd524f7SAnup Patel            CPU_SLEEP_0_0: cpu-sleep-0-0 {
5491bd524f7SAnup Patel                compatible = "arm,idle-state";
5501bd524f7SAnup Patel                local-timer-stop;
5511bd524f7SAnup Patel                arm,psci-suspend-param = <0x0010000>;
5521bd524f7SAnup Patel                entry-latency-us = <250>;
5531bd524f7SAnup Patel                exit-latency-us = <500>;
5541bd524f7SAnup Patel                min-residency-us = <950>;
5551bd524f7SAnup Patel            };
5561bd524f7SAnup Patel
5571bd524f7SAnup Patel            CLUSTER_SLEEP_0: cluster-sleep-0 {
5581bd524f7SAnup Patel                compatible = "arm,idle-state";
5591bd524f7SAnup Patel                local-timer-stop;
5601bd524f7SAnup Patel                arm,psci-suspend-param = <0x1010000>;
5611bd524f7SAnup Patel                entry-latency-us = <600>;
5621bd524f7SAnup Patel                exit-latency-us = <1100>;
5631bd524f7SAnup Patel                min-residency-us = <2700>;
5641bd524f7SAnup Patel                wakeup-latency-us = <1500>;
5651bd524f7SAnup Patel            };
5661bd524f7SAnup Patel
5671bd524f7SAnup Patel            CPU_RETENTION_1_0: cpu-retention-1-0 {
5681bd524f7SAnup Patel                compatible = "arm,idle-state";
5691bd524f7SAnup Patel                arm,psci-suspend-param = <0x0010000>;
5701bd524f7SAnup Patel                entry-latency-us = <20>;
5711bd524f7SAnup Patel                exit-latency-us = <40>;
5721bd524f7SAnup Patel                min-residency-us = <90>;
5731bd524f7SAnup Patel            };
5741bd524f7SAnup Patel
5751bd524f7SAnup Patel            CLUSTER_RETENTION_1: cluster-retention-1 {
5761bd524f7SAnup Patel                compatible = "arm,idle-state";
5771bd524f7SAnup Patel                local-timer-stop;
5781bd524f7SAnup Patel                arm,psci-suspend-param = <0x1010000>;
5791bd524f7SAnup Patel                entry-latency-us = <50>;
5801bd524f7SAnup Patel                exit-latency-us = <100>;
5811bd524f7SAnup Patel                min-residency-us = <270>;
5821bd524f7SAnup Patel                wakeup-latency-us = <100>;
5831bd524f7SAnup Patel            };
5841bd524f7SAnup Patel
5851bd524f7SAnup Patel            CPU_SLEEP_1_0: cpu-sleep-1-0 {
5861bd524f7SAnup Patel                compatible = "arm,idle-state";
5871bd524f7SAnup Patel                local-timer-stop;
5881bd524f7SAnup Patel                arm,psci-suspend-param = <0x0010000>;
5891bd524f7SAnup Patel                entry-latency-us = <70>;
5901bd524f7SAnup Patel                exit-latency-us = <100>;
5911bd524f7SAnup Patel                min-residency-us = <300>;
5921bd524f7SAnup Patel                wakeup-latency-us = <150>;
5931bd524f7SAnup Patel            };
5941bd524f7SAnup Patel
5951bd524f7SAnup Patel            CLUSTER_SLEEP_1: cluster-sleep-1 {
5961bd524f7SAnup Patel                compatible = "arm,idle-state";
5971bd524f7SAnup Patel                local-timer-stop;
5981bd524f7SAnup Patel                arm,psci-suspend-param = <0x1010000>;
5991bd524f7SAnup Patel                entry-latency-us = <500>;
6001bd524f7SAnup Patel                exit-latency-us = <1200>;
6011bd524f7SAnup Patel                min-residency-us = <3500>;
6021bd524f7SAnup Patel                wakeup-latency-us = <1300>;
6031bd524f7SAnup Patel            };
6041bd524f7SAnup Patel        };
6051bd524f7SAnup Patel    };
6061bd524f7SAnup Patel
6071bd524f7SAnup Patel  - |
6081bd524f7SAnup Patel    // Example 2 (ARM 32-bit, 8-cpu system, two clusters):
6091bd524f7SAnup Patel
6101bd524f7SAnup Patel    cpus {
6111bd524f7SAnup Patel        #size-cells = <0>;
6121bd524f7SAnup Patel        #address-cells = <1>;
6131bd524f7SAnup Patel
6141bd524f7SAnup Patel        cpu@0 {
6151bd524f7SAnup Patel            device_type = "cpu";
6161bd524f7SAnup Patel            compatible = "arm,cortex-a15";
6171bd524f7SAnup Patel            reg = <0x0>;
618a3dfc532SLinus Torvalds            cpu-idle-states = <&cpu_sleep_0_0>, <&cluster_sleep_0>;
6191bd524f7SAnup Patel        };
6201bd524f7SAnup Patel
6211bd524f7SAnup Patel        cpu@1 {
6221bd524f7SAnup Patel            device_type = "cpu";
6231bd524f7SAnup Patel            compatible = "arm,cortex-a15";
6241bd524f7SAnup Patel            reg = <0x1>;
625a3dfc532SLinus Torvalds            cpu-idle-states = <&cpu_sleep_0_0>, <&cluster_sleep_0>;
6261bd524f7SAnup Patel        };
6271bd524f7SAnup Patel
6281bd524f7SAnup Patel        cpu@2 {
6291bd524f7SAnup Patel            device_type = "cpu";
6301bd524f7SAnup Patel            compatible = "arm,cortex-a15";
6311bd524f7SAnup Patel            reg = <0x2>;
632a3dfc532SLinus Torvalds            cpu-idle-states = <&cpu_sleep_0_0>, <&cluster_sleep_0>;
6331bd524f7SAnup Patel        };
6341bd524f7SAnup Patel
6351bd524f7SAnup Patel        cpu@3 {
6361bd524f7SAnup Patel            device_type = "cpu";
6371bd524f7SAnup Patel            compatible = "arm,cortex-a15";
6381bd524f7SAnup Patel            reg = <0x3>;
639a3dfc532SLinus Torvalds            cpu-idle-states = <&cpu_sleep_0_0>, <&cluster_sleep_0>;
6401bd524f7SAnup Patel        };
6411bd524f7SAnup Patel
6421bd524f7SAnup Patel        cpu@100 {
6431bd524f7SAnup Patel            device_type = "cpu";
6441bd524f7SAnup Patel            compatible = "arm,cortex-a7";
6451bd524f7SAnup Patel            reg = <0x100>;
646a3dfc532SLinus Torvalds            cpu-idle-states = <&cpu_sleep_1_0>, <&cluster_sleep_1>;
6471bd524f7SAnup Patel        };
6481bd524f7SAnup Patel
6491bd524f7SAnup Patel        cpu@101 {
6501bd524f7SAnup Patel            device_type = "cpu";
6511bd524f7SAnup Patel            compatible = "arm,cortex-a7";
6521bd524f7SAnup Patel            reg = <0x101>;
653a3dfc532SLinus Torvalds            cpu-idle-states = <&cpu_sleep_1_0>, <&cluster_sleep_1>;
6541bd524f7SAnup Patel        };
6551bd524f7SAnup Patel
6561bd524f7SAnup Patel        cpu@102 {
6571bd524f7SAnup Patel            device_type = "cpu";
6581bd524f7SAnup Patel            compatible = "arm,cortex-a7";
6591bd524f7SAnup Patel            reg = <0x102>;
660a3dfc532SLinus Torvalds            cpu-idle-states = <&cpu_sleep_1_0>, <&cluster_sleep_1>;
6611bd524f7SAnup Patel        };
6621bd524f7SAnup Patel
6631bd524f7SAnup Patel        cpu@103 {
6641bd524f7SAnup Patel            device_type = "cpu";
6651bd524f7SAnup Patel            compatible = "arm,cortex-a7";
6661bd524f7SAnup Patel            reg = <0x103>;
667a3dfc532SLinus Torvalds            cpu-idle-states = <&cpu_sleep_1_0>, <&cluster_sleep_1>;
6681bd524f7SAnup Patel        };
6691bd524f7SAnup Patel
6701bd524f7SAnup Patel        idle-states {
6711bd524f7SAnup Patel            cpu_sleep_0_0: cpu-sleep-0-0 {
6721bd524f7SAnup Patel                compatible = "arm,idle-state";
6731bd524f7SAnup Patel                local-timer-stop;
6741bd524f7SAnup Patel                entry-latency-us = <200>;
6751bd524f7SAnup Patel                exit-latency-us = <100>;
6761bd524f7SAnup Patel                min-residency-us = <400>;
6771bd524f7SAnup Patel                wakeup-latency-us = <250>;
6781bd524f7SAnup Patel            };
6791bd524f7SAnup Patel
6801bd524f7SAnup Patel            cluster_sleep_0: cluster-sleep-0 {
6811bd524f7SAnup Patel                compatible = "arm,idle-state";
6821bd524f7SAnup Patel                local-timer-stop;
6831bd524f7SAnup Patel                entry-latency-us = <500>;
6841bd524f7SAnup Patel                exit-latency-us = <1500>;
6851bd524f7SAnup Patel                min-residency-us = <2500>;
6861bd524f7SAnup Patel                wakeup-latency-us = <1700>;
6871bd524f7SAnup Patel            };
6881bd524f7SAnup Patel
6891bd524f7SAnup Patel            cpu_sleep_1_0: cpu-sleep-1-0 {
6901bd524f7SAnup Patel                compatible = "arm,idle-state";
6911bd524f7SAnup Patel                local-timer-stop;
6921bd524f7SAnup Patel                entry-latency-us = <300>;
6931bd524f7SAnup Patel                exit-latency-us = <500>;
6941bd524f7SAnup Patel                min-residency-us = <900>;
6951bd524f7SAnup Patel                wakeup-latency-us = <600>;
6961bd524f7SAnup Patel            };
6971bd524f7SAnup Patel
6981bd524f7SAnup Patel            cluster_sleep_1: cluster-sleep-1 {
6991bd524f7SAnup Patel                compatible = "arm,idle-state";
7001bd524f7SAnup Patel                local-timer-stop;
7011bd524f7SAnup Patel                entry-latency-us = <800>;
7021bd524f7SAnup Patel                exit-latency-us = <2000>;
7031bd524f7SAnup Patel                min-residency-us = <6500>;
7041bd524f7SAnup Patel                wakeup-latency-us = <2300>;
7051bd524f7SAnup Patel            };
7061bd524f7SAnup Patel        };
7071bd524f7SAnup Patel    };
7081bd524f7SAnup Patel
7091bd524f7SAnup Patel  - |
7101bd524f7SAnup Patel    // Example 3 (RISC-V 64-bit, 4-cpu systems, two clusters):
7111bd524f7SAnup Patel
7121bd524f7SAnup Patel    cpus {
7131bd524f7SAnup Patel        #size-cells = <0>;
7141bd524f7SAnup Patel        #address-cells = <1>;
7151bd524f7SAnup Patel
7161bd524f7SAnup Patel        cpu@0 {
7171bd524f7SAnup Patel            device_type = "cpu";
7181bd524f7SAnup Patel            compatible = "riscv";
7191bd524f7SAnup Patel            reg = <0x0>;
7201bd524f7SAnup Patel            riscv,isa = "rv64imafdc";
7211bd524f7SAnup Patel            mmu-type = "riscv,sv48";
7222524257bSPalmer Dabbelt            cpu-idle-states = <&CPU_RET_0_0>, <&CPU_NONRET_0_0>,
7232524257bSPalmer Dabbelt                            <&CLUSTER_RET_0>, <&CLUSTER_NONRET_0>;
7241bd524f7SAnup Patel
7251bd524f7SAnup Patel            cpu_intc0: interrupt-controller {
7261bd524f7SAnup Patel                #interrupt-cells = <1>;
7271bd524f7SAnup Patel                compatible = "riscv,cpu-intc";
7281bd524f7SAnup Patel                interrupt-controller;
7291bd524f7SAnup Patel            };
7301bd524f7SAnup Patel        };
7311bd524f7SAnup Patel
7321bd524f7SAnup Patel        cpu@1 {
7331bd524f7SAnup Patel            device_type = "cpu";
7341bd524f7SAnup Patel            compatible = "riscv";
7351bd524f7SAnup Patel            reg = <0x1>;
7361bd524f7SAnup Patel            riscv,isa = "rv64imafdc";
7371bd524f7SAnup Patel            mmu-type = "riscv,sv48";
7382524257bSPalmer Dabbelt            cpu-idle-states = <&CPU_RET_0_0>, <&CPU_NONRET_0_0>,
7392524257bSPalmer Dabbelt                            <&CLUSTER_RET_0>, <&CLUSTER_NONRET_0>;
7401bd524f7SAnup Patel
7411bd524f7SAnup Patel            cpu_intc1: interrupt-controller {
7421bd524f7SAnup Patel                #interrupt-cells = <1>;
7431bd524f7SAnup Patel                compatible = "riscv,cpu-intc";
7441bd524f7SAnup Patel                interrupt-controller;
7451bd524f7SAnup Patel            };
7461bd524f7SAnup Patel        };
7471bd524f7SAnup Patel
7481bd524f7SAnup Patel        cpu@10 {
7491bd524f7SAnup Patel            device_type = "cpu";
7501bd524f7SAnup Patel            compatible = "riscv";
7511bd524f7SAnup Patel            reg = <0x10>;
7521bd524f7SAnup Patel            riscv,isa = "rv64imafdc";
7531bd524f7SAnup Patel            mmu-type = "riscv,sv48";
7542524257bSPalmer Dabbelt            cpu-idle-states = <&CPU_RET_1_0>, <&CPU_NONRET_1_0>,
7552524257bSPalmer Dabbelt                            <&CLUSTER_RET_1>, <&CLUSTER_NONRET_1>;
7561bd524f7SAnup Patel
7571bd524f7SAnup Patel            cpu_intc10: interrupt-controller {
7581bd524f7SAnup Patel                #interrupt-cells = <1>;
7591bd524f7SAnup Patel                compatible = "riscv,cpu-intc";
7601bd524f7SAnup Patel                interrupt-controller;
7611bd524f7SAnup Patel            };
7621bd524f7SAnup Patel        };
7631bd524f7SAnup Patel
7641bd524f7SAnup Patel        cpu@11 {
7651bd524f7SAnup Patel            device_type = "cpu";
7661bd524f7SAnup Patel            compatible = "riscv";
7671bd524f7SAnup Patel            reg = <0x11>;
7681bd524f7SAnup Patel            riscv,isa = "rv64imafdc";
7691bd524f7SAnup Patel            mmu-type = "riscv,sv48";
7702524257bSPalmer Dabbelt            cpu-idle-states = <&CPU_RET_1_0>, <&CPU_NONRET_1_0>,
7712524257bSPalmer Dabbelt                            <&CLUSTER_RET_1>, <&CLUSTER_NONRET_1>;
7721bd524f7SAnup Patel
7731bd524f7SAnup Patel            cpu_intc11: interrupt-controller {
7741bd524f7SAnup Patel                #interrupt-cells = <1>;
7751bd524f7SAnup Patel                compatible = "riscv,cpu-intc";
7761bd524f7SAnup Patel                interrupt-controller;
7771bd524f7SAnup Patel            };
7781bd524f7SAnup Patel        };
7791bd524f7SAnup Patel
7801bd524f7SAnup Patel        idle-states {
7811bd524f7SAnup Patel            CPU_RET_0_0: cpu-retentive-0-0 {
7821bd524f7SAnup Patel                compatible = "riscv,idle-state";
7831bd524f7SAnup Patel                riscv,sbi-suspend-param = <0x10000000>;
7841bd524f7SAnup Patel                entry-latency-us = <20>;
7851bd524f7SAnup Patel                exit-latency-us = <40>;
7861bd524f7SAnup Patel                min-residency-us = <80>;
7871bd524f7SAnup Patel            };
7881bd524f7SAnup Patel
7891bd524f7SAnup Patel            CPU_NONRET_0_0: cpu-nonretentive-0-0 {
7901bd524f7SAnup Patel                compatible = "riscv,idle-state";
7911bd524f7SAnup Patel                riscv,sbi-suspend-param = <0x90000000>;
7921bd524f7SAnup Patel                entry-latency-us = <250>;
7931bd524f7SAnup Patel                exit-latency-us = <500>;
7941bd524f7SAnup Patel                min-residency-us = <950>;
7951bd524f7SAnup Patel            };
7961bd524f7SAnup Patel
7971bd524f7SAnup Patel            CLUSTER_RET_0: cluster-retentive-0 {
7981bd524f7SAnup Patel                compatible = "riscv,idle-state";
7991bd524f7SAnup Patel                riscv,sbi-suspend-param = <0x11000000>;
8001bd524f7SAnup Patel                local-timer-stop;
8011bd524f7SAnup Patel                entry-latency-us = <50>;
8021bd524f7SAnup Patel                exit-latency-us = <100>;
8031bd524f7SAnup Patel                min-residency-us = <250>;
8041bd524f7SAnup Patel                wakeup-latency-us = <130>;
8051bd524f7SAnup Patel            };
8061bd524f7SAnup Patel
8071bd524f7SAnup Patel            CLUSTER_NONRET_0: cluster-nonretentive-0 {
8081bd524f7SAnup Patel                compatible = "riscv,idle-state";
8091bd524f7SAnup Patel                riscv,sbi-suspend-param = <0x91000000>;
8101bd524f7SAnup Patel                local-timer-stop;
8111bd524f7SAnup Patel                entry-latency-us = <600>;
8121bd524f7SAnup Patel                exit-latency-us = <1100>;
8131bd524f7SAnup Patel                min-residency-us = <2700>;
8141bd524f7SAnup Patel                wakeup-latency-us = <1500>;
8151bd524f7SAnup Patel            };
8161bd524f7SAnup Patel
8171bd524f7SAnup Patel            CPU_RET_1_0: cpu-retentive-1-0 {
8181bd524f7SAnup Patel                compatible = "riscv,idle-state";
8191bd524f7SAnup Patel                riscv,sbi-suspend-param = <0x10000010>;
8201bd524f7SAnup Patel                entry-latency-us = <20>;
8211bd524f7SAnup Patel                exit-latency-us = <40>;
8221bd524f7SAnup Patel                min-residency-us = <80>;
8231bd524f7SAnup Patel            };
8241bd524f7SAnup Patel
8251bd524f7SAnup Patel            CPU_NONRET_1_0: cpu-nonretentive-1-0 {
8261bd524f7SAnup Patel                compatible = "riscv,idle-state";
8271bd524f7SAnup Patel                riscv,sbi-suspend-param = <0x90000010>;
8281bd524f7SAnup Patel                entry-latency-us = <250>;
8291bd524f7SAnup Patel                exit-latency-us = <500>;
8301bd524f7SAnup Patel                min-residency-us = <950>;
8311bd524f7SAnup Patel            };
8321bd524f7SAnup Patel
8331bd524f7SAnup Patel            CLUSTER_RET_1: cluster-retentive-1 {
8341bd524f7SAnup Patel                compatible = "riscv,idle-state";
8351bd524f7SAnup Patel                riscv,sbi-suspend-param = <0x11000010>;
8361bd524f7SAnup Patel                local-timer-stop;
8371bd524f7SAnup Patel                entry-latency-us = <50>;
8381bd524f7SAnup Patel                exit-latency-us = <100>;
8391bd524f7SAnup Patel                min-residency-us = <250>;
8401bd524f7SAnup Patel                wakeup-latency-us = <130>;
8411bd524f7SAnup Patel            };
8421bd524f7SAnup Patel
8431bd524f7SAnup Patel            CLUSTER_NONRET_1: cluster-nonretentive-1 {
8441bd524f7SAnup Patel                compatible = "riscv,idle-state";
8451bd524f7SAnup Patel                riscv,sbi-suspend-param = <0x91000010>;
8461bd524f7SAnup Patel                local-timer-stop;
8471bd524f7SAnup Patel                entry-latency-us = <600>;
8481bd524f7SAnup Patel                exit-latency-us = <1100>;
8491bd524f7SAnup Patel                min-residency-us = <2700>;
8501bd524f7SAnup Patel                wakeup-latency-us = <1500>;
8511bd524f7SAnup Patel            };
8521bd524f7SAnup Patel        };
8531bd524f7SAnup Patel    };
8541bd524f7SAnup Patel
8551bd524f7SAnup Patel...
856