248 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/opp/opp-v2-base.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Generic OPP (Operating Performance Points) Common Properties8 9maintainers:10 - Viresh Kumar <viresh.kumar@linaro.org>11 12description: |13 Devices work at voltage-current-frequency combinations and some implementations14 have the liberty of choosing these. These combinations are called Operating15 Performance Points aka OPPs. This document defines bindings for these OPPs16 applicable across wide range of devices. For illustration purpose, this document17 uses CPU as a device.18 19 This describes the OPPs belonging to a device.20 21select: false22 23properties:24 $nodename:25 pattern: '^opp-table(-[a-z0-9]+)?$'26 27 opp-shared:28 description:29 Indicates that device nodes using this OPP Table Node's phandle switch30 their DVFS state together, i.e. they share clock/voltage/current lines.31 Missing property means devices have independent clock/voltage/current32 lines, but they share OPP tables.33 type: boolean34 35patternProperties:36 '^opp(-?[0-9]+)*$':37 type: object38 description:39 One or more OPP nodes describing voltage-current-frequency combinations.40 Their name isn't significant but their phandle can be used to reference an41 OPP. These are mandatory except for the case where the OPP table is42 present only to indicate dependency between devices using the opp-shared43 property.44 45 properties:46 opp-hz:47 description:48 Frequency in Hz, expressed as a 64-bit big-endian integer. This is a49 required property for all device nodes, unless another "required"50 property to uniquely identify the OPP nodes exists. Devices like power51 domains must have another (implementation dependent) property.52 53 Entries for multiple clocks shall be provided in the same field, as54 array of frequencies. The OPP binding doesn't provide any provisions55 to relate the values to their clocks or the order in which the clocks56 need to be configured and that is left for the implementation57 specific binding.58 minItems: 159 maxItems: 3260 61 opp-microvolt:62 description: |63 Voltage for the OPP64 65 A single regulator's voltage is specified with an array of size one or three.66 Single entry is for target voltage and three entries are for <target min max>67 voltages.68 69 Entries for multiple regulators shall be provided in the same field separated70 by angular brackets <>. The OPP binding doesn't provide any provisions to71 relate the values to their power supplies or the order in which the supplies72 need to be configured and that is left for the implementation specific73 binding.74 75 Entries for all regulators shall be of the same size, i.e. either all use a76 single value or triplets.77 minItems: 178 maxItems: 8 # Should be enough regulators79 items:80 minItems: 181 maxItems: 382 83 opp-microamp:84 description: |85 The maximum current drawn by the device in microamperes considering86 system specific parameters (such as transients, process, aging,87 maximum operating temperature range etc.) as necessary. This may be88 used to set the most efficient regulator operating mode.89 90 Should only be set if opp-microvolt or opp-microvolt-<name> is set for91 the OPP.92 93 Entries for multiple regulators shall be provided in the same field94 separated by angular brackets <>. If current values aren't required95 for a regulator, then it shall be filled with 0. If current values96 aren't required for any of the regulators, then this field is not97 required. The OPP binding doesn't provide any provisions to relate the98 values to their power supplies or the order in which the supplies need99 to be configured and that is left for the implementation specific100 binding.101 minItems: 1102 maxItems: 8 # Should be enough regulators103 104 opp-microwatt:105 description: |106 The power for the OPP in micro-Watts.107 108 Entries for multiple regulators shall be provided in the same field109 separated by angular brackets <>. If power values aren't required110 for a regulator, then it shall be filled with 0. If power values111 aren't required for any of the regulators, then this field is not112 required. The OPP binding doesn't provide any provisions to relate the113 values to their power supplies or the order in which the supplies need114 to be configured and that is left for the implementation specific115 binding.116 minItems: 1117 maxItems: 8 # Should be enough regulators118 119 opp-level:120 description:121 A value representing the performance level of the device.122 $ref: /schemas/types.yaml#/definitions/uint32123 124 opp-peak-kBps:125 description:126 Peak bandwidth in kilobytes per second, expressed as an array of127 32-bit big-endian integers. Each element of the array represents the128 peak bandwidth value of each interconnect path. The number of elements129 should match the number of interconnect paths.130 minItems: 1131 maxItems: 32 # Should be enough132 133 opp-avg-kBps:134 description:135 Average bandwidth in kilobytes per second, expressed as an array136 of 32-bit big-endian integers. Each element of the array represents the137 average bandwidth value of each interconnect path. The number of elements138 should match the number of interconnect paths. This property is only139 meaningful in OPP tables where opp-peak-kBps is present.140 minItems: 1141 maxItems: 32 # Should be enough142 143 clock-latency-ns:144 description:145 Specifies the maximum possible transition latency (in nanoseconds) for146 switching to this OPP from any other OPP.147 148 turbo-mode:149 description:150 Marks the OPP to be used only for turbo modes. Turbo mode is available151 on some platforms, where the device can run over its operating152 frequency for a short duration of time limited by the device's power,153 current and thermal limits.154 type: boolean155 156 opp-suspend:157 description:158 Marks the OPP to be used during device suspend. If multiple OPPs in159 the table have this, the OPP with highest opp-hz will be used.160 type: boolean161 162 opp-supported-hw:163 description: |164 This property allows a platform to enable only a subset of the OPPs165 from the larger set present in the OPP table, based on the current166 version of the hardware (already known to the operating system).167 168 Each block present in the array of blocks in this property, represents169 a sub-group of hardware versions supported by the OPP. i.e. <sub-group170 A>, <sub-group B>, etc. The OPP will be enabled if _any_ of these171 sub-groups match the hardware's version.172 173 Each sub-group is a platform defined array representing the hierarchy174 of hardware versions supported by the platform. For a platform with175 three hierarchical levels of version (X.Y.Z), this field shall look176 like177 178 opp-supported-hw = <X1 Y1 Z1>, <X2 Y2 Z2>, <X3 Y3 Z3>.179 180 Each level (eg. X1) in version hierarchy is represented by a 32 bit181 value, one bit per version and so there can be maximum 32 versions per182 level. Logical AND (&) operation is performed for each level with the183 hardware's level version and a non-zero output for _all_ the levels in184 a sub-group means the OPP is supported by hardware. A value of185 0xFFFFFFFF for each level in the sub-group will enable the OPP for all186 versions for the hardware.187 $ref: /schemas/types.yaml#/definitions/uint32-matrix188 maxItems: 32189 items:190 minItems: 1191 maxItems: 4192 193 required-opps:194 description:195 This contains phandle to an OPP node in another device's OPP table. It196 may contain an array of phandles, where each phandle points to an OPP197 of a different device. It should not contain multiple phandles to the198 OPP nodes in the same OPP table. This specifies the minimum required199 OPP of the device(s), whose OPP's phandle is present in this property,200 for the functioning of the current device at the current OPP (where201 this property is present).202 $ref: /schemas/types.yaml#/definitions/phandle-array203 items:204 maxItems: 1205 206 patternProperties:207 '^opp-microvolt-':208 description:209 Named opp-microvolt property. This is exactly similar to the above210 opp-microvolt property, but allows multiple voltage ranges to be211 provided for the same OPP. At runtime, the platform can pick a <name>212 and matching opp-microvolt-<name> property will be enabled for all213 OPPs. If the platform doesn't pick a specific <name> or the <name>214 doesn't match with any opp-microvolt-<name> properties, then215 opp-microvolt property shall be used, if present.216 $ref: /schemas/types.yaml#/definitions/uint32-matrix217 minItems: 1218 maxItems: 8 # Should be enough regulators219 items:220 minItems: 1221 maxItems: 3222 223 '^opp-microamp-':224 description:225 Named opp-microamp property. Similar to opp-microvolt-<name> property,226 but for microamp instead.227 $ref: /schemas/types.yaml#/definitions/uint32-array228 minItems: 1229 maxItems: 8 # Should be enough regulators230 231 '^opp-microwatt-':232 description:233 Named opp-microwatt property. Similar to opp-microamp-<name> property,234 but for microwatt instead.235 $ref: /schemas/types.yaml#/definitions/uint32-array236 minItems: 1237 maxItems: 8 # Should be enough regulators238 239 dependencies:240 opp-avg-kBps: [ opp-peak-kBps ]241 242required:243 - compatible244 245additionalProperties: true246 247...248