16be33864SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only
26be33864SEmmanuel Vadot%YAML 1.2
36be33864SEmmanuel Vadot---
46be33864SEmmanuel Vadot$id: http://devicetree.org/schemas/powerpc/sleep.yaml#
56be33864SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
66be33864SEmmanuel Vadot
76be33864SEmmanuel Vadottitle: PowerPC sleep property
86be33864SEmmanuel Vadot
96be33864SEmmanuel Vadotmaintainers:
106be33864SEmmanuel Vadot  - Rob Herring <robh@kernel.org>
116be33864SEmmanuel Vadot
126be33864SEmmanuel Vadotdescription: |
136be33864SEmmanuel Vadot  Devices on SOCs often have mechanisms for placing devices into low-power
146be33864SEmmanuel Vadot  states that are decoupled from the devices' own register blocks.  Sometimes,
156be33864SEmmanuel Vadot  this information is more complicated than a cell-index property can
166be33864SEmmanuel Vadot  reasonably describe.  Thus, each device controlled in such a manner
176be33864SEmmanuel Vadot  may contain a "sleep" property which describes these connections.
186be33864SEmmanuel Vadot
196be33864SEmmanuel Vadot  The sleep property consists of one or more sleep resources, each of
206be33864SEmmanuel Vadot  which consists of a phandle to a sleep controller, followed by a
216be33864SEmmanuel Vadot  controller-specific sleep specifier of zero or more cells.
226be33864SEmmanuel Vadot
236be33864SEmmanuel Vadot  The semantics of what type of low power modes are possible are defined
246be33864SEmmanuel Vadot  by the sleep controller.  Some examples of the types of low power modes
256be33864SEmmanuel Vadot  that may be supported are:
266be33864SEmmanuel Vadot
276be33864SEmmanuel Vadot   - Dynamic: The device may be disabled or enabled at any time.
286be33864SEmmanuel Vadot   - System Suspend: The device may request to be disabled or remain
296be33864SEmmanuel Vadot     awake during system suspend, but will not be disabled until then.
306be33864SEmmanuel Vadot   - Permanent: The device is disabled permanently (until the next hard
316be33864SEmmanuel Vadot     reset).
326be33864SEmmanuel Vadot
336be33864SEmmanuel Vadot  Some devices may share a clock domain with each other, such that they should
346be33864SEmmanuel Vadot  only be suspended when none of the devices are in use.  Where reasonable,
356be33864SEmmanuel Vadot  such nodes should be placed on a virtual bus, where the bus has the sleep
366be33864SEmmanuel Vadot  property.  If the clock domain is shared among devices that cannot be
376be33864SEmmanuel Vadot  reasonably grouped in this manner, then create a virtual sleep controller
386be33864SEmmanuel Vadot  (similar to an interrupt nexus, except that defining a standardized
396be33864SEmmanuel Vadot  sleep-map should wait until its necessity is demonstrated).
406be33864SEmmanuel Vadot
416be33864SEmmanuel Vadotselect: true
426be33864SEmmanuel Vadot
436be33864SEmmanuel Vadotproperties:
446be33864SEmmanuel Vadot  sleep:
45*5def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
466be33864SEmmanuel Vadot
476be33864SEmmanuel VadotadditionalProperties: true
48