1c66ec88fSEmmanuel VadotGeneric OPP (Operating Performance Points) Bindings 2c66ec88fSEmmanuel Vadot---------------------------------------------------- 3c66ec88fSEmmanuel Vadot 4c66ec88fSEmmanuel VadotDevices work at voltage-current-frequency combinations and some implementations 5c66ec88fSEmmanuel Vadothave the liberty of choosing these. These combinations are called Operating 6c66ec88fSEmmanuel VadotPerformance Points aka OPPs. This document defines bindings for these OPPs 7c66ec88fSEmmanuel Vadotapplicable across wide range of devices. For illustration purpose, this document 8c66ec88fSEmmanuel Vadotuses CPU as a device. 9c66ec88fSEmmanuel Vadot 10c66ec88fSEmmanuel VadotThis document contain multiple versions of OPP binding and only one of them 11c66ec88fSEmmanuel Vadotshould be used per device. 12c66ec88fSEmmanuel Vadot 13c66ec88fSEmmanuel VadotBinding 1: operating-points 14c66ec88fSEmmanuel Vadot============================ 15c66ec88fSEmmanuel Vadot 16c66ec88fSEmmanuel VadotThis binding only supports voltage-frequency pairs. 17c66ec88fSEmmanuel Vadot 18c66ec88fSEmmanuel VadotProperties: 19c66ec88fSEmmanuel Vadot- operating-points: An array of 2-tuples items, and each item consists 20c66ec88fSEmmanuel Vadot of frequency and voltage like <freq-kHz vol-uV>. 21c66ec88fSEmmanuel Vadot freq: clock frequency in kHz 22c66ec88fSEmmanuel Vadot vol: voltage in microvolt 23c66ec88fSEmmanuel Vadot 24c66ec88fSEmmanuel VadotExamples: 25c66ec88fSEmmanuel Vadot 26c66ec88fSEmmanuel Vadotcpu@0 { 27c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a9"; 28c66ec88fSEmmanuel Vadot reg = <0>; 29c66ec88fSEmmanuel Vadot next-level-cache = <&L2>; 30c66ec88fSEmmanuel Vadot operating-points = < 31c66ec88fSEmmanuel Vadot /* kHz uV */ 32c66ec88fSEmmanuel Vadot 792000 1100000 33c66ec88fSEmmanuel Vadot 396000 950000 34c66ec88fSEmmanuel Vadot 198000 850000 35c66ec88fSEmmanuel Vadot >; 36c66ec88fSEmmanuel Vadot}; 37c66ec88fSEmmanuel Vadot 38c66ec88fSEmmanuel Vadot 39c66ec88fSEmmanuel VadotBinding 2: operating-points-v2 40c66ec88fSEmmanuel Vadot============================ 41c66ec88fSEmmanuel Vadot 42c66ec88fSEmmanuel Vadot* Property: operating-points-v2 43c66ec88fSEmmanuel Vadot 44c66ec88fSEmmanuel VadotDevices supporting OPPs must set their "operating-points-v2" property with 45c66ec88fSEmmanuel Vadotphandle to a OPP table in their DT node. The OPP core will use this phandle to 46c66ec88fSEmmanuel Vadotfind the operating points for the device. 47c66ec88fSEmmanuel Vadot 48c66ec88fSEmmanuel VadotThis can contain more than one phandle for power domain providers that provide 49c66ec88fSEmmanuel Vadotmultiple power domains. That is, one phandle for each power domain. If only one 50c66ec88fSEmmanuel Vadotphandle is available, then the same OPP table will be used for all power domains 51c66ec88fSEmmanuel Vadotprovided by the power domain provider. 52c66ec88fSEmmanuel Vadot 53c66ec88fSEmmanuel VadotIf required, this can be extended for SoC vendor specific bindings. Such bindings 54c66ec88fSEmmanuel Vadotshould be documented as Documentation/devicetree/bindings/power/<vendor>-opp.txt 55c66ec88fSEmmanuel Vadotand should have a compatible description like: "operating-points-v2-<vendor>". 56c66ec88fSEmmanuel Vadot 57c66ec88fSEmmanuel Vadot* OPP Table Node 58c66ec88fSEmmanuel Vadot 59c66ec88fSEmmanuel VadotThis describes the OPPs belonging to a device. This node can have following 60c66ec88fSEmmanuel Vadotproperties: 61c66ec88fSEmmanuel Vadot 62c66ec88fSEmmanuel VadotRequired properties: 63c66ec88fSEmmanuel Vadot- compatible: Allow OPPs to express their compatibility. It should be: 64c66ec88fSEmmanuel Vadot "operating-points-v2". 65c66ec88fSEmmanuel Vadot 66c66ec88fSEmmanuel Vadot- OPP nodes: One or more OPP nodes describing voltage-current-frequency 67c66ec88fSEmmanuel Vadot combinations. Their name isn't significant but their phandle can be used to 68*5def4c47SEmmanuel Vadot reference an OPP. These are mandatory except for the case where the OPP table 69*5def4c47SEmmanuel Vadot is present only to indicate dependency between devices using the opp-shared 70*5def4c47SEmmanuel Vadot property. 71c66ec88fSEmmanuel Vadot 72c66ec88fSEmmanuel VadotOptional properties: 73c66ec88fSEmmanuel Vadot- opp-shared: Indicates that device nodes using this OPP Table Node's phandle 74c66ec88fSEmmanuel Vadot switch their DVFS state together, i.e. they share clock/voltage/current lines. 75c66ec88fSEmmanuel Vadot Missing property means devices have independent clock/voltage/current lines, 76c66ec88fSEmmanuel Vadot but they share OPP tables. 77c66ec88fSEmmanuel Vadot 78c66ec88fSEmmanuel Vadot- status: Marks the OPP table enabled/disabled. 79c66ec88fSEmmanuel Vadot 80c66ec88fSEmmanuel Vadot 81c66ec88fSEmmanuel Vadot* OPP Node 82c66ec88fSEmmanuel Vadot 83c66ec88fSEmmanuel VadotThis defines voltage-current-frequency combinations along with other related 84c66ec88fSEmmanuel Vadotproperties. 85c66ec88fSEmmanuel Vadot 86c66ec88fSEmmanuel VadotRequired properties: 87c66ec88fSEmmanuel Vadot- opp-hz: Frequency in Hz, expressed as a 64-bit big-endian integer. This is a 88c66ec88fSEmmanuel Vadot required property for all device nodes, unless another "required" property to 89c66ec88fSEmmanuel Vadot uniquely identify the OPP nodes exists. Devices like power domains must have 90c66ec88fSEmmanuel Vadot another (implementation dependent) property. 91c66ec88fSEmmanuel Vadot 92c66ec88fSEmmanuel Vadot- opp-peak-kBps: Peak bandwidth in kilobytes per second, expressed as an array 93c66ec88fSEmmanuel Vadot of 32-bit big-endian integers. Each element of the array represents the 94c66ec88fSEmmanuel Vadot peak bandwidth value of each interconnect path. The number of elements should 95c66ec88fSEmmanuel Vadot match the number of interconnect paths. 96c66ec88fSEmmanuel Vadot 97c66ec88fSEmmanuel VadotOptional properties: 98c66ec88fSEmmanuel Vadot- opp-microvolt: voltage in micro Volts. 99c66ec88fSEmmanuel Vadot 100c66ec88fSEmmanuel Vadot A single regulator's voltage is specified with an array of size one or three. 101c66ec88fSEmmanuel Vadot Single entry is for target voltage and three entries are for <target min max> 102c66ec88fSEmmanuel Vadot voltages. 103c66ec88fSEmmanuel Vadot 104c66ec88fSEmmanuel Vadot Entries for multiple regulators shall be provided in the same field separated 105c66ec88fSEmmanuel Vadot by angular brackets <>. The OPP binding doesn't provide any provisions to 106c66ec88fSEmmanuel Vadot relate the values to their power supplies or the order in which the supplies 107c66ec88fSEmmanuel Vadot need to be configured and that is left for the implementation specific 108c66ec88fSEmmanuel Vadot binding. 109c66ec88fSEmmanuel Vadot 110c66ec88fSEmmanuel Vadot Entries for all regulators shall be of the same size, i.e. either all use a 111c66ec88fSEmmanuel Vadot single value or triplets. 112c66ec88fSEmmanuel Vadot 113c66ec88fSEmmanuel Vadot- opp-microvolt-<name>: Named opp-microvolt property. This is exactly similar to 114c66ec88fSEmmanuel Vadot the above opp-microvolt property, but allows multiple voltage ranges to be 115c66ec88fSEmmanuel Vadot provided for the same OPP. At runtime, the platform can pick a <name> and 116c66ec88fSEmmanuel Vadot matching opp-microvolt-<name> property will be enabled for all OPPs. If the 117c66ec88fSEmmanuel Vadot platform doesn't pick a specific <name> or the <name> doesn't match with any 118c66ec88fSEmmanuel Vadot opp-microvolt-<name> properties, then opp-microvolt property shall be used, if 119c66ec88fSEmmanuel Vadot present. 120c66ec88fSEmmanuel Vadot 121c66ec88fSEmmanuel Vadot- opp-microamp: The maximum current drawn by the device in microamperes 122c66ec88fSEmmanuel Vadot considering system specific parameters (such as transients, process, aging, 123c66ec88fSEmmanuel Vadot maximum operating temperature range etc.) as necessary. This may be used to 124c66ec88fSEmmanuel Vadot set the most efficient regulator operating mode. 125c66ec88fSEmmanuel Vadot 126c66ec88fSEmmanuel Vadot Should only be set if opp-microvolt is set for the OPP. 127c66ec88fSEmmanuel Vadot 128c66ec88fSEmmanuel Vadot Entries for multiple regulators shall be provided in the same field separated 129c66ec88fSEmmanuel Vadot by angular brackets <>. If current values aren't required for a regulator, 130c66ec88fSEmmanuel Vadot then it shall be filled with 0. If current values aren't required for any of 131c66ec88fSEmmanuel Vadot the regulators, then this field is not required. The OPP binding doesn't 132c66ec88fSEmmanuel Vadot provide any provisions to relate the values to their power supplies or the 133c66ec88fSEmmanuel Vadot order in which the supplies need to be configured and that is left for the 134c66ec88fSEmmanuel Vadot implementation specific binding. 135c66ec88fSEmmanuel Vadot 136c66ec88fSEmmanuel Vadot- opp-microamp-<name>: Named opp-microamp property. Similar to 137c66ec88fSEmmanuel Vadot opp-microvolt-<name> property, but for microamp instead. 138c66ec88fSEmmanuel Vadot 139c66ec88fSEmmanuel Vadot- opp-level: A value representing the performance level of the device, 140c66ec88fSEmmanuel Vadot expressed as a 32-bit integer. 141c66ec88fSEmmanuel Vadot 142c66ec88fSEmmanuel Vadot- opp-avg-kBps: Average bandwidth in kilobytes per second, expressed as an array 143c66ec88fSEmmanuel Vadot of 32-bit big-endian integers. Each element of the array represents the 144c66ec88fSEmmanuel Vadot average bandwidth value of each interconnect path. The number of elements 145c66ec88fSEmmanuel Vadot should match the number of interconnect paths. This property is only 146c66ec88fSEmmanuel Vadot meaningful in OPP tables where opp-peak-kBps is present. 147c66ec88fSEmmanuel Vadot 148c66ec88fSEmmanuel Vadot- clock-latency-ns: Specifies the maximum possible transition latency (in 149c66ec88fSEmmanuel Vadot nanoseconds) for switching to this OPP from any other OPP. 150c66ec88fSEmmanuel Vadot 151c66ec88fSEmmanuel Vadot- turbo-mode: Marks the OPP to be used only for turbo modes. Turbo mode is 152c66ec88fSEmmanuel Vadot available on some platforms, where the device can run over its operating 153c66ec88fSEmmanuel Vadot frequency for a short duration of time limited by the device's power, current 154c66ec88fSEmmanuel Vadot and thermal limits. 155c66ec88fSEmmanuel Vadot 156c66ec88fSEmmanuel Vadot- opp-suspend: Marks the OPP to be used during device suspend. If multiple OPPs 157c66ec88fSEmmanuel Vadot in the table have this, the OPP with highest opp-hz will be used. 158c66ec88fSEmmanuel Vadot 1596be33864SEmmanuel Vadot- opp-supported-hw: This property allows a platform to enable only a subset of 1606be33864SEmmanuel Vadot the OPPs from the larger set present in the OPP table, based on the current 1616be33864SEmmanuel Vadot version of the hardware (already known to the operating system). 162c66ec88fSEmmanuel Vadot 1636be33864SEmmanuel Vadot Each block present in the array of blocks in this property, represents a 1646be33864SEmmanuel Vadot sub-group of hardware versions supported by the OPP. i.e. <sub-group A>, 1656be33864SEmmanuel Vadot <sub-group B>, etc. The OPP will be enabled if _any_ of these sub-groups match 1666be33864SEmmanuel Vadot the hardware's version. 167c66ec88fSEmmanuel Vadot 1686be33864SEmmanuel Vadot Each sub-group is a platform defined array representing the hierarchy of 1696be33864SEmmanuel Vadot hardware versions supported by the platform. For a platform with three 1706be33864SEmmanuel Vadot hierarchical levels of version (X.Y.Z), this field shall look like 171c66ec88fSEmmanuel Vadot 1726be33864SEmmanuel Vadot opp-supported-hw = <X1 Y1 Z1>, <X2 Y2 Z2>, <X3 Y3 Z3>. 1736be33864SEmmanuel Vadot 1746be33864SEmmanuel Vadot Each level (eg. X1) in version hierarchy is represented by a 32 bit value, one 1756be33864SEmmanuel Vadot bit per version and so there can be maximum 32 versions per level. Logical AND 1766be33864SEmmanuel Vadot (&) operation is performed for each level with the hardware's level version 1776be33864SEmmanuel Vadot and a non-zero output for _all_ the levels in a sub-group means the OPP is 1786be33864SEmmanuel Vadot supported by hardware. A value of 0xFFFFFFFF for each level in the sub-group 1796be33864SEmmanuel Vadot will enable the OPP for all versions for the hardware. 180c66ec88fSEmmanuel Vadot 181c66ec88fSEmmanuel Vadot- status: Marks the node enabled/disabled. 182c66ec88fSEmmanuel Vadot 183c66ec88fSEmmanuel Vadot- required-opps: This contains phandle to an OPP node in another device's OPP 184c66ec88fSEmmanuel Vadot table. It may contain an array of phandles, where each phandle points to an 185c66ec88fSEmmanuel Vadot OPP of a different device. It should not contain multiple phandles to the OPP 186c66ec88fSEmmanuel Vadot nodes in the same OPP table. This specifies the minimum required OPP of the 187c66ec88fSEmmanuel Vadot device(s), whose OPP's phandle is present in this property, for the 188c66ec88fSEmmanuel Vadot functioning of the current device at the current OPP (where this property is 189c66ec88fSEmmanuel Vadot present). 190c66ec88fSEmmanuel Vadot 191c66ec88fSEmmanuel VadotExample 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together. 192c66ec88fSEmmanuel Vadot 193c66ec88fSEmmanuel Vadot/ { 194c66ec88fSEmmanuel Vadot cpus { 195c66ec88fSEmmanuel Vadot #address-cells = <1>; 196c66ec88fSEmmanuel Vadot #size-cells = <0>; 197c66ec88fSEmmanuel Vadot 198c66ec88fSEmmanuel Vadot cpu@0 { 199c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a9"; 200c66ec88fSEmmanuel Vadot reg = <0>; 201c66ec88fSEmmanuel Vadot next-level-cache = <&L2>; 202c66ec88fSEmmanuel Vadot clocks = <&clk_controller 0>; 203c66ec88fSEmmanuel Vadot clock-names = "cpu"; 204c66ec88fSEmmanuel Vadot cpu-supply = <&cpu_supply0>; 205c66ec88fSEmmanuel Vadot operating-points-v2 = <&cpu0_opp_table>; 206c66ec88fSEmmanuel Vadot }; 207c66ec88fSEmmanuel Vadot 208c66ec88fSEmmanuel Vadot cpu@1 { 209c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a9"; 210c66ec88fSEmmanuel Vadot reg = <1>; 211c66ec88fSEmmanuel Vadot next-level-cache = <&L2>; 212c66ec88fSEmmanuel Vadot clocks = <&clk_controller 0>; 213c66ec88fSEmmanuel Vadot clock-names = "cpu"; 214c66ec88fSEmmanuel Vadot cpu-supply = <&cpu_supply0>; 215c66ec88fSEmmanuel Vadot operating-points-v2 = <&cpu0_opp_table>; 216c66ec88fSEmmanuel Vadot }; 217c66ec88fSEmmanuel Vadot }; 218c66ec88fSEmmanuel Vadot 219c66ec88fSEmmanuel Vadot cpu0_opp_table: opp_table0 { 220c66ec88fSEmmanuel Vadot compatible = "operating-points-v2"; 221c66ec88fSEmmanuel Vadot opp-shared; 222c66ec88fSEmmanuel Vadot 223c66ec88fSEmmanuel Vadot opp-1000000000 { 224c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <1000000000>; 225c66ec88fSEmmanuel Vadot opp-microvolt = <975000 970000 985000>; 226c66ec88fSEmmanuel Vadot opp-microamp = <70000>; 227c66ec88fSEmmanuel Vadot clock-latency-ns = <300000>; 228c66ec88fSEmmanuel Vadot opp-suspend; 229c66ec88fSEmmanuel Vadot }; 230c66ec88fSEmmanuel Vadot opp-1100000000 { 231c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <1100000000>; 232c66ec88fSEmmanuel Vadot opp-microvolt = <1000000 980000 1010000>; 233c66ec88fSEmmanuel Vadot opp-microamp = <80000>; 234c66ec88fSEmmanuel Vadot clock-latency-ns = <310000>; 235c66ec88fSEmmanuel Vadot }; 236c66ec88fSEmmanuel Vadot opp-1200000000 { 237c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <1200000000>; 238c66ec88fSEmmanuel Vadot opp-microvolt = <1025000>; 239c66ec88fSEmmanuel Vadot clock-latency-ns = <290000>; 240c66ec88fSEmmanuel Vadot turbo-mode; 241c66ec88fSEmmanuel Vadot }; 242c66ec88fSEmmanuel Vadot }; 243c66ec88fSEmmanuel Vadot}; 244c66ec88fSEmmanuel Vadot 245c66ec88fSEmmanuel VadotExample 2: Single cluster, Quad-core Qualcom-krait, switches DVFS states 246c66ec88fSEmmanuel Vadotindependently. 247c66ec88fSEmmanuel Vadot 248c66ec88fSEmmanuel Vadot/ { 249c66ec88fSEmmanuel Vadot cpus { 250c66ec88fSEmmanuel Vadot #address-cells = <1>; 251c66ec88fSEmmanuel Vadot #size-cells = <0>; 252c66ec88fSEmmanuel Vadot 253c66ec88fSEmmanuel Vadot cpu@0 { 254c66ec88fSEmmanuel Vadot compatible = "qcom,krait"; 255c66ec88fSEmmanuel Vadot reg = <0>; 256c66ec88fSEmmanuel Vadot next-level-cache = <&L2>; 257c66ec88fSEmmanuel Vadot clocks = <&clk_controller 0>; 258c66ec88fSEmmanuel Vadot clock-names = "cpu"; 259c66ec88fSEmmanuel Vadot cpu-supply = <&cpu_supply0>; 260c66ec88fSEmmanuel Vadot operating-points-v2 = <&cpu_opp_table>; 261c66ec88fSEmmanuel Vadot }; 262c66ec88fSEmmanuel Vadot 263c66ec88fSEmmanuel Vadot cpu@1 { 264c66ec88fSEmmanuel Vadot compatible = "qcom,krait"; 265c66ec88fSEmmanuel Vadot reg = <1>; 266c66ec88fSEmmanuel Vadot next-level-cache = <&L2>; 267c66ec88fSEmmanuel Vadot clocks = <&clk_controller 1>; 268c66ec88fSEmmanuel Vadot clock-names = "cpu"; 269c66ec88fSEmmanuel Vadot cpu-supply = <&cpu_supply1>; 270c66ec88fSEmmanuel Vadot operating-points-v2 = <&cpu_opp_table>; 271c66ec88fSEmmanuel Vadot }; 272c66ec88fSEmmanuel Vadot 273c66ec88fSEmmanuel Vadot cpu@2 { 274c66ec88fSEmmanuel Vadot compatible = "qcom,krait"; 275c66ec88fSEmmanuel Vadot reg = <2>; 276c66ec88fSEmmanuel Vadot next-level-cache = <&L2>; 277c66ec88fSEmmanuel Vadot clocks = <&clk_controller 2>; 278c66ec88fSEmmanuel Vadot clock-names = "cpu"; 279c66ec88fSEmmanuel Vadot cpu-supply = <&cpu_supply2>; 280c66ec88fSEmmanuel Vadot operating-points-v2 = <&cpu_opp_table>; 281c66ec88fSEmmanuel Vadot }; 282c66ec88fSEmmanuel Vadot 283c66ec88fSEmmanuel Vadot cpu@3 { 284c66ec88fSEmmanuel Vadot compatible = "qcom,krait"; 285c66ec88fSEmmanuel Vadot reg = <3>; 286c66ec88fSEmmanuel Vadot next-level-cache = <&L2>; 287c66ec88fSEmmanuel Vadot clocks = <&clk_controller 3>; 288c66ec88fSEmmanuel Vadot clock-names = "cpu"; 289c66ec88fSEmmanuel Vadot cpu-supply = <&cpu_supply3>; 290c66ec88fSEmmanuel Vadot operating-points-v2 = <&cpu_opp_table>; 291c66ec88fSEmmanuel Vadot }; 292c66ec88fSEmmanuel Vadot }; 293c66ec88fSEmmanuel Vadot 294c66ec88fSEmmanuel Vadot cpu_opp_table: opp_table { 295c66ec88fSEmmanuel Vadot compatible = "operating-points-v2"; 296c66ec88fSEmmanuel Vadot 297c66ec88fSEmmanuel Vadot /* 298c66ec88fSEmmanuel Vadot * Missing opp-shared property means CPUs switch DVFS states 299c66ec88fSEmmanuel Vadot * independently. 300c66ec88fSEmmanuel Vadot */ 301c66ec88fSEmmanuel Vadot 302c66ec88fSEmmanuel Vadot opp-1000000000 { 303c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <1000000000>; 304c66ec88fSEmmanuel Vadot opp-microvolt = <975000 970000 985000>; 305c66ec88fSEmmanuel Vadot opp-microamp = <70000>; 306c66ec88fSEmmanuel Vadot clock-latency-ns = <300000>; 307c66ec88fSEmmanuel Vadot opp-suspend; 308c66ec88fSEmmanuel Vadot }; 309c66ec88fSEmmanuel Vadot opp-1100000000 { 310c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <1100000000>; 311c66ec88fSEmmanuel Vadot opp-microvolt = <1000000 980000 1010000>; 312c66ec88fSEmmanuel Vadot opp-microamp = <80000>; 313c66ec88fSEmmanuel Vadot clock-latency-ns = <310000>; 314c66ec88fSEmmanuel Vadot }; 315c66ec88fSEmmanuel Vadot opp-1200000000 { 316c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <1200000000>; 317c66ec88fSEmmanuel Vadot opp-microvolt = <1025000>; 318c66ec88fSEmmanuel Vadot opp-microamp = <90000; 319c66ec88fSEmmanuel Vadot lock-latency-ns = <290000>; 320c66ec88fSEmmanuel Vadot turbo-mode; 321c66ec88fSEmmanuel Vadot }; 322c66ec88fSEmmanuel Vadot }; 323c66ec88fSEmmanuel Vadot}; 324c66ec88fSEmmanuel Vadot 325c66ec88fSEmmanuel VadotExample 3: Dual-cluster, Dual-core per cluster. CPUs within a cluster switch 326c66ec88fSEmmanuel VadotDVFS state together. 327c66ec88fSEmmanuel Vadot 328c66ec88fSEmmanuel Vadot/ { 329c66ec88fSEmmanuel Vadot cpus { 330c66ec88fSEmmanuel Vadot #address-cells = <1>; 331c66ec88fSEmmanuel Vadot #size-cells = <0>; 332c66ec88fSEmmanuel Vadot 333c66ec88fSEmmanuel Vadot cpu@0 { 334c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a7"; 335c66ec88fSEmmanuel Vadot reg = <0>; 336c66ec88fSEmmanuel Vadot next-level-cache = <&L2>; 337c66ec88fSEmmanuel Vadot clocks = <&clk_controller 0>; 338c66ec88fSEmmanuel Vadot clock-names = "cpu"; 339c66ec88fSEmmanuel Vadot cpu-supply = <&cpu_supply0>; 340c66ec88fSEmmanuel Vadot operating-points-v2 = <&cluster0_opp>; 341c66ec88fSEmmanuel Vadot }; 342c66ec88fSEmmanuel Vadot 343c66ec88fSEmmanuel Vadot cpu@1 { 344c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a7"; 345c66ec88fSEmmanuel Vadot reg = <1>; 346c66ec88fSEmmanuel Vadot next-level-cache = <&L2>; 347c66ec88fSEmmanuel Vadot clocks = <&clk_controller 0>; 348c66ec88fSEmmanuel Vadot clock-names = "cpu"; 349c66ec88fSEmmanuel Vadot cpu-supply = <&cpu_supply0>; 350c66ec88fSEmmanuel Vadot operating-points-v2 = <&cluster0_opp>; 351c66ec88fSEmmanuel Vadot }; 352c66ec88fSEmmanuel Vadot 353c66ec88fSEmmanuel Vadot cpu@100 { 354c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a15"; 355c66ec88fSEmmanuel Vadot reg = <100>; 356c66ec88fSEmmanuel Vadot next-level-cache = <&L2>; 357c66ec88fSEmmanuel Vadot clocks = <&clk_controller 1>; 358c66ec88fSEmmanuel Vadot clock-names = "cpu"; 359c66ec88fSEmmanuel Vadot cpu-supply = <&cpu_supply1>; 360c66ec88fSEmmanuel Vadot operating-points-v2 = <&cluster1_opp>; 361c66ec88fSEmmanuel Vadot }; 362c66ec88fSEmmanuel Vadot 363c66ec88fSEmmanuel Vadot cpu@101 { 364c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a15"; 365c66ec88fSEmmanuel Vadot reg = <101>; 366c66ec88fSEmmanuel Vadot next-level-cache = <&L2>; 367c66ec88fSEmmanuel Vadot clocks = <&clk_controller 1>; 368c66ec88fSEmmanuel Vadot clock-names = "cpu"; 369c66ec88fSEmmanuel Vadot cpu-supply = <&cpu_supply1>; 370c66ec88fSEmmanuel Vadot operating-points-v2 = <&cluster1_opp>; 371c66ec88fSEmmanuel Vadot }; 372c66ec88fSEmmanuel Vadot }; 373c66ec88fSEmmanuel Vadot 374c66ec88fSEmmanuel Vadot cluster0_opp: opp_table0 { 375c66ec88fSEmmanuel Vadot compatible = "operating-points-v2"; 376c66ec88fSEmmanuel Vadot opp-shared; 377c66ec88fSEmmanuel Vadot 378c66ec88fSEmmanuel Vadot opp-1000000000 { 379c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <1000000000>; 380c66ec88fSEmmanuel Vadot opp-microvolt = <975000 970000 985000>; 381c66ec88fSEmmanuel Vadot opp-microamp = <70000>; 382c66ec88fSEmmanuel Vadot clock-latency-ns = <300000>; 383c66ec88fSEmmanuel Vadot opp-suspend; 384c66ec88fSEmmanuel Vadot }; 385c66ec88fSEmmanuel Vadot opp-1100000000 { 386c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <1100000000>; 387c66ec88fSEmmanuel Vadot opp-microvolt = <1000000 980000 1010000>; 388c66ec88fSEmmanuel Vadot opp-microamp = <80000>; 389c66ec88fSEmmanuel Vadot clock-latency-ns = <310000>; 390c66ec88fSEmmanuel Vadot }; 391c66ec88fSEmmanuel Vadot opp-1200000000 { 392c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <1200000000>; 393c66ec88fSEmmanuel Vadot opp-microvolt = <1025000>; 394c66ec88fSEmmanuel Vadot opp-microamp = <90000>; 395c66ec88fSEmmanuel Vadot clock-latency-ns = <290000>; 396c66ec88fSEmmanuel Vadot turbo-mode; 397c66ec88fSEmmanuel Vadot }; 398c66ec88fSEmmanuel Vadot }; 399c66ec88fSEmmanuel Vadot 400c66ec88fSEmmanuel Vadot cluster1_opp: opp_table1 { 401c66ec88fSEmmanuel Vadot compatible = "operating-points-v2"; 402c66ec88fSEmmanuel Vadot opp-shared; 403c66ec88fSEmmanuel Vadot 404c66ec88fSEmmanuel Vadot opp-1300000000 { 405c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <1300000000>; 406c66ec88fSEmmanuel Vadot opp-microvolt = <1050000 1045000 1055000>; 407c66ec88fSEmmanuel Vadot opp-microamp = <95000>; 408c66ec88fSEmmanuel Vadot clock-latency-ns = <400000>; 409c66ec88fSEmmanuel Vadot opp-suspend; 410c66ec88fSEmmanuel Vadot }; 411c66ec88fSEmmanuel Vadot opp-1400000000 { 412c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <1400000000>; 413c66ec88fSEmmanuel Vadot opp-microvolt = <1075000>; 414c66ec88fSEmmanuel Vadot opp-microamp = <100000>; 415c66ec88fSEmmanuel Vadot clock-latency-ns = <400000>; 416c66ec88fSEmmanuel Vadot }; 417c66ec88fSEmmanuel Vadot opp-1500000000 { 418c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <1500000000>; 419c66ec88fSEmmanuel Vadot opp-microvolt = <1100000 1010000 1110000>; 420c66ec88fSEmmanuel Vadot opp-microamp = <95000>; 421c66ec88fSEmmanuel Vadot clock-latency-ns = <400000>; 422c66ec88fSEmmanuel Vadot turbo-mode; 423c66ec88fSEmmanuel Vadot }; 424c66ec88fSEmmanuel Vadot }; 425c66ec88fSEmmanuel Vadot}; 426c66ec88fSEmmanuel Vadot 427c66ec88fSEmmanuel VadotExample 4: Handling multiple regulators 428c66ec88fSEmmanuel Vadot 429c66ec88fSEmmanuel Vadot/ { 430c66ec88fSEmmanuel Vadot cpus { 431c66ec88fSEmmanuel Vadot cpu@0 { 432c66ec88fSEmmanuel Vadot compatible = "vendor,cpu-type"; 433c66ec88fSEmmanuel Vadot ... 434c66ec88fSEmmanuel Vadot 435c66ec88fSEmmanuel Vadot vcc0-supply = <&cpu_supply0>; 436c66ec88fSEmmanuel Vadot vcc1-supply = <&cpu_supply1>; 437c66ec88fSEmmanuel Vadot vcc2-supply = <&cpu_supply2>; 438c66ec88fSEmmanuel Vadot operating-points-v2 = <&cpu0_opp_table>; 439c66ec88fSEmmanuel Vadot }; 440c66ec88fSEmmanuel Vadot }; 441c66ec88fSEmmanuel Vadot 442c66ec88fSEmmanuel Vadot cpu0_opp_table: opp_table0 { 443c66ec88fSEmmanuel Vadot compatible = "operating-points-v2"; 444c66ec88fSEmmanuel Vadot opp-shared; 445c66ec88fSEmmanuel Vadot 446c66ec88fSEmmanuel Vadot opp-1000000000 { 447c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <1000000000>; 448c66ec88fSEmmanuel Vadot opp-microvolt = <970000>, /* Supply 0 */ 449c66ec88fSEmmanuel Vadot <960000>, /* Supply 1 */ 450c66ec88fSEmmanuel Vadot <960000>; /* Supply 2 */ 451c66ec88fSEmmanuel Vadot opp-microamp = <70000>, /* Supply 0 */ 452c66ec88fSEmmanuel Vadot <70000>, /* Supply 1 */ 453c66ec88fSEmmanuel Vadot <70000>; /* Supply 2 */ 454c66ec88fSEmmanuel Vadot clock-latency-ns = <300000>; 455c66ec88fSEmmanuel Vadot }; 456c66ec88fSEmmanuel Vadot 457c66ec88fSEmmanuel Vadot /* OR */ 458c66ec88fSEmmanuel Vadot 459c66ec88fSEmmanuel Vadot opp-1000000000 { 460c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <1000000000>; 461c66ec88fSEmmanuel Vadot opp-microvolt = <975000 970000 985000>, /* Supply 0 */ 462c66ec88fSEmmanuel Vadot <965000 960000 975000>, /* Supply 1 */ 463c66ec88fSEmmanuel Vadot <965000 960000 975000>; /* Supply 2 */ 464c66ec88fSEmmanuel Vadot opp-microamp = <70000>, /* Supply 0 */ 465c66ec88fSEmmanuel Vadot <70000>, /* Supply 1 */ 466c66ec88fSEmmanuel Vadot <70000>; /* Supply 2 */ 467c66ec88fSEmmanuel Vadot clock-latency-ns = <300000>; 468c66ec88fSEmmanuel Vadot }; 469c66ec88fSEmmanuel Vadot 470c66ec88fSEmmanuel Vadot /* OR */ 471c66ec88fSEmmanuel Vadot 472c66ec88fSEmmanuel Vadot opp-1000000000 { 473c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <1000000000>; 474c66ec88fSEmmanuel Vadot opp-microvolt = <975000 970000 985000>, /* Supply 0 */ 475c66ec88fSEmmanuel Vadot <965000 960000 975000>, /* Supply 1 */ 476c66ec88fSEmmanuel Vadot <965000 960000 975000>; /* Supply 2 */ 477c66ec88fSEmmanuel Vadot opp-microamp = <70000>, /* Supply 0 */ 478c66ec88fSEmmanuel Vadot <0>, /* Supply 1 doesn't need this */ 479c66ec88fSEmmanuel Vadot <70000>; /* Supply 2 */ 480c66ec88fSEmmanuel Vadot clock-latency-ns = <300000>; 481c66ec88fSEmmanuel Vadot }; 482c66ec88fSEmmanuel Vadot }; 483c66ec88fSEmmanuel Vadot}; 484c66ec88fSEmmanuel Vadot 485c66ec88fSEmmanuel VadotExample 5: opp-supported-hw 486c66ec88fSEmmanuel Vadot(example: three level hierarchy of versions: cuts, substrate and process) 487c66ec88fSEmmanuel Vadot 488c66ec88fSEmmanuel Vadot/ { 489c66ec88fSEmmanuel Vadot cpus { 490c66ec88fSEmmanuel Vadot cpu@0 { 491c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a7"; 492c66ec88fSEmmanuel Vadot ... 493c66ec88fSEmmanuel Vadot 494c66ec88fSEmmanuel Vadot cpu-supply = <&cpu_supply> 495c66ec88fSEmmanuel Vadot operating-points-v2 = <&cpu0_opp_table_slow>; 496c66ec88fSEmmanuel Vadot }; 497c66ec88fSEmmanuel Vadot }; 498c66ec88fSEmmanuel Vadot 499c66ec88fSEmmanuel Vadot opp_table { 500c66ec88fSEmmanuel Vadot compatible = "operating-points-v2"; 501c66ec88fSEmmanuel Vadot opp-shared; 502c66ec88fSEmmanuel Vadot 503c66ec88fSEmmanuel Vadot opp-600000000 { 504c66ec88fSEmmanuel Vadot /* 505c66ec88fSEmmanuel Vadot * Supports all substrate and process versions for 0xF 506c66ec88fSEmmanuel Vadot * cuts, i.e. only first four cuts. 507c66ec88fSEmmanuel Vadot */ 508c66ec88fSEmmanuel Vadot opp-supported-hw = <0xF 0xFFFFFFFF 0xFFFFFFFF> 509c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <600000000>; 510c66ec88fSEmmanuel Vadot ... 511c66ec88fSEmmanuel Vadot }; 512c66ec88fSEmmanuel Vadot 513c66ec88fSEmmanuel Vadot opp-800000000 { 514c66ec88fSEmmanuel Vadot /* 515c66ec88fSEmmanuel Vadot * Supports: 516c66ec88fSEmmanuel Vadot * - cuts: only one, 6th cut (represented by 6th bit). 517c66ec88fSEmmanuel Vadot * - substrate: supports 16 different substrate versions 518c66ec88fSEmmanuel Vadot * - process: supports 9 different process versions 519c66ec88fSEmmanuel Vadot */ 520c66ec88fSEmmanuel Vadot opp-supported-hw = <0x20 0xff0000ff 0x0000f4f0> 521c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <800000000>; 5226be33864SEmmanuel Vadot ... 5236be33864SEmmanuel Vadot }; 5246be33864SEmmanuel Vadot 5256be33864SEmmanuel Vadot opp-900000000 { 5266be33864SEmmanuel Vadot /* 5276be33864SEmmanuel Vadot * Supports: 5286be33864SEmmanuel Vadot * - All cuts and substrate where process version is 0x2. 5296be33864SEmmanuel Vadot * - All cuts and process where substrate version is 0x2. 5306be33864SEmmanuel Vadot */ 5316be33864SEmmanuel Vadot opp-supported-hw = <0xFFFFFFFF 0xFFFFFFFF 0x02>, <0xFFFFFFFF 0x01 0xFFFFFFFF> 5326be33864SEmmanuel Vadot opp-hz = /bits/ 64 <900000000>; 533c66ec88fSEmmanuel Vadot ... 534c66ec88fSEmmanuel Vadot }; 535c66ec88fSEmmanuel Vadot }; 536c66ec88fSEmmanuel Vadot}; 537c66ec88fSEmmanuel Vadot 538c66ec88fSEmmanuel VadotExample 6: opp-microvolt-<name>, opp-microamp-<name>: 539c66ec88fSEmmanuel Vadot(example: device with two possible microvolt ranges: slow and fast) 540c66ec88fSEmmanuel Vadot 541c66ec88fSEmmanuel Vadot/ { 542c66ec88fSEmmanuel Vadot cpus { 543c66ec88fSEmmanuel Vadot cpu@0 { 544c66ec88fSEmmanuel Vadot compatible = "arm,cortex-a7"; 545c66ec88fSEmmanuel Vadot ... 546c66ec88fSEmmanuel Vadot 547c66ec88fSEmmanuel Vadot operating-points-v2 = <&cpu0_opp_table>; 548c66ec88fSEmmanuel Vadot }; 549c66ec88fSEmmanuel Vadot }; 550c66ec88fSEmmanuel Vadot 551c66ec88fSEmmanuel Vadot cpu0_opp_table: opp_table0 { 552c66ec88fSEmmanuel Vadot compatible = "operating-points-v2"; 553c66ec88fSEmmanuel Vadot opp-shared; 554c66ec88fSEmmanuel Vadot 555c66ec88fSEmmanuel Vadot opp-1000000000 { 556c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <1000000000>; 557c66ec88fSEmmanuel Vadot opp-microvolt-slow = <915000 900000 925000>; 558c66ec88fSEmmanuel Vadot opp-microvolt-fast = <975000 970000 985000>; 559c66ec88fSEmmanuel Vadot opp-microamp-slow = <70000>; 560c66ec88fSEmmanuel Vadot opp-microamp-fast = <71000>; 561c66ec88fSEmmanuel Vadot }; 562c66ec88fSEmmanuel Vadot 563c66ec88fSEmmanuel Vadot opp-1200000000 { 564c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <1200000000>; 565c66ec88fSEmmanuel Vadot opp-microvolt-slow = <915000 900000 925000>, /* Supply vcc0 */ 566c66ec88fSEmmanuel Vadot <925000 910000 935000>; /* Supply vcc1 */ 567c66ec88fSEmmanuel Vadot opp-microvolt-fast = <975000 970000 985000>, /* Supply vcc0 */ 568c66ec88fSEmmanuel Vadot <965000 960000 975000>; /* Supply vcc1 */ 569c66ec88fSEmmanuel Vadot opp-microamp = <70000>; /* Will be used for both slow/fast */ 570c66ec88fSEmmanuel Vadot }; 571c66ec88fSEmmanuel Vadot }; 572c66ec88fSEmmanuel Vadot}; 573*5def4c47SEmmanuel Vadot 574*5def4c47SEmmanuel VadotExample 7: Single cluster Quad-core ARM cortex A53, OPP points from firmware, 575*5def4c47SEmmanuel Vadotdistinct clock controls but two sets of clock/voltage/current lines. 576*5def4c47SEmmanuel Vadot 577*5def4c47SEmmanuel Vadot/ { 578*5def4c47SEmmanuel Vadot cpus { 579*5def4c47SEmmanuel Vadot #address-cells = <2>; 580*5def4c47SEmmanuel Vadot #size-cells = <0>; 581*5def4c47SEmmanuel Vadot 582*5def4c47SEmmanuel Vadot cpu@0 { 583*5def4c47SEmmanuel Vadot compatible = "arm,cortex-a53"; 584*5def4c47SEmmanuel Vadot reg = <0x0 0x100>; 585*5def4c47SEmmanuel Vadot next-level-cache = <&A53_L2>; 586*5def4c47SEmmanuel Vadot clocks = <&dvfs_controller 0>; 587*5def4c47SEmmanuel Vadot operating-points-v2 = <&cpu_opp0_table>; 588*5def4c47SEmmanuel Vadot }; 589*5def4c47SEmmanuel Vadot cpu@1 { 590*5def4c47SEmmanuel Vadot compatible = "arm,cortex-a53"; 591*5def4c47SEmmanuel Vadot reg = <0x0 0x101>; 592*5def4c47SEmmanuel Vadot next-level-cache = <&A53_L2>; 593*5def4c47SEmmanuel Vadot clocks = <&dvfs_controller 1>; 594*5def4c47SEmmanuel Vadot operating-points-v2 = <&cpu_opp0_table>; 595*5def4c47SEmmanuel Vadot }; 596*5def4c47SEmmanuel Vadot cpu@2 { 597*5def4c47SEmmanuel Vadot compatible = "arm,cortex-a53"; 598*5def4c47SEmmanuel Vadot reg = <0x0 0x102>; 599*5def4c47SEmmanuel Vadot next-level-cache = <&A53_L2>; 600*5def4c47SEmmanuel Vadot clocks = <&dvfs_controller 2>; 601*5def4c47SEmmanuel Vadot operating-points-v2 = <&cpu_opp1_table>; 602*5def4c47SEmmanuel Vadot }; 603*5def4c47SEmmanuel Vadot cpu@3 { 604*5def4c47SEmmanuel Vadot compatible = "arm,cortex-a53"; 605*5def4c47SEmmanuel Vadot reg = <0x0 0x103>; 606*5def4c47SEmmanuel Vadot next-level-cache = <&A53_L2>; 607*5def4c47SEmmanuel Vadot clocks = <&dvfs_controller 3>; 608*5def4c47SEmmanuel Vadot operating-points-v2 = <&cpu_opp1_table>; 609*5def4c47SEmmanuel Vadot }; 610*5def4c47SEmmanuel Vadot 611*5def4c47SEmmanuel Vadot }; 612*5def4c47SEmmanuel Vadot 613*5def4c47SEmmanuel Vadot cpu_opp0_table: opp0_table { 614*5def4c47SEmmanuel Vadot compatible = "operating-points-v2"; 615*5def4c47SEmmanuel Vadot opp-shared; 616*5def4c47SEmmanuel Vadot }; 617*5def4c47SEmmanuel Vadot 618*5def4c47SEmmanuel Vadot cpu_opp1_table: opp1_table { 619*5def4c47SEmmanuel Vadot compatible = "operating-points-v2"; 620*5def4c47SEmmanuel Vadot opp-shared; 621*5def4c47SEmmanuel Vadot }; 622*5def4c47SEmmanuel Vadot}; 623