forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/Documentation/devicetree/bindings/opp/opp.txt
....@@ -83,9 +83,14 @@
8383
8484 Required properties:
8585 - opp-hz: Frequency in Hz, expressed as a 64-bit big-endian integer. This is a
86
- required property for all device nodes but devices like power domains. The
87
- power domain nodes must have another (implementation dependent) property which
88
- uniquely identifies the OPP nodes.
86
+ required property for all device nodes, unless another "required" property to
87
+ uniquely identify the OPP nodes exists. Devices like power domains must have
88
+ another (implementation dependent) property.
89
+
90
+- opp-peak-kBps: Peak bandwidth in kilobytes per second, expressed as an array
91
+ of 32-bit big-endian integers. Each element of the array represents the
92
+ peak bandwidth value of each interconnect path. The number of elements should
93
+ match the number of interconnect paths.
8994
9095 Optional properties:
9196 - opp-microvolt: voltage in micro Volts.
....@@ -129,6 +134,15 @@
129134 - opp-microamp-<name>: Named opp-microamp property. Similar to
130135 opp-microvolt-<name> property, but for microamp instead.
131136
137
+- opp-level: A value representing the performance level of the device,
138
+ expressed as a 32-bit integer.
139
+
140
+- opp-avg-kBps: Average bandwidth in kilobytes per second, expressed as an array
141
+ of 32-bit big-endian integers. Each element of the array represents the
142
+ average bandwidth value of each interconnect path. The number of elements
143
+ should match the number of interconnect paths. This property is only
144
+ meaningful in OPP tables where opp-peak-kBps is present.
145
+
132146 - clock-latency-ns: Specifies the maximum possible transition latency (in
133147 nanoseconds) for switching to this OPP from any other OPP.
134148
....@@ -137,28 +151,30 @@
137151 frequency for a short duration of time limited by the device's power, current
138152 and thermal limits.
139153
140
-- opp-suspend: Marks the OPP to be used during device suspend. Only one OPP in
141
- the table should have this.
154
+- opp-suspend: Marks the OPP to be used during device suspend. If multiple OPPs
155
+ in the table have this, the OPP with highest opp-hz will be used.
142156
143
-- opp-supported-hw: This enables us to select only a subset of OPPs from the
144
- larger OPP table, based on what version of the hardware we are running on. We
145
- still can't have multiple nodes with the same opp-hz value in OPP table.
157
+- opp-supported-hw: This property allows a platform to enable only a subset of
158
+ the OPPs from the larger set present in the OPP table, based on the current
159
+ version of the hardware (already known to the operating system).
146160
147
- It's a user defined array containing a hierarchy of hardware version numbers,
148
- supported by the OPP. For example: a platform with hierarchy of three levels
149
- of versions (A, B and C), this field should be like <X Y Z>, where X
150
- corresponds to Version hierarchy A, Y corresponds to version hierarchy B and Z
151
- corresponds to version hierarchy C.
161
+ Each block present in the array of blocks in this property, represents a
162
+ sub-group of hardware versions supported by the OPP. i.e. <sub-group A>,
163
+ <sub-group B>, etc. The OPP will be enabled if _any_ of these sub-groups match
164
+ the hardware's version.
152165
153
- Each level of hierarchy is represented by a 32 bit value, and so there can be
154
- only 32 different supported version per hierarchy. i.e. 1 bit per version. A
155
- value of 0xFFFFFFFF will enable the OPP for all versions for that hierarchy
156
- level. And a value of 0x00000000 will disable the OPP completely, and so we
157
- never want that to happen.
166
+ Each sub-group is a platform defined array representing the hierarchy of
167
+ hardware versions supported by the platform. For a platform with three
168
+ hierarchical levels of version (X.Y.Z), this field shall look like
158169
159
- If 32 values aren't sufficient for a version hierarchy, than that version
160
- hierarchy can be contained in multiple 32 bit values. i.e. <X Y Z1 Z2> in the
161
- above example, Z1 & Z2 refer to the version hierarchy Z.
170
+ opp-supported-hw = <X1 Y1 Z1>, <X2 Y2 Z2>, <X3 Y3 Z3>.
171
+
172
+ Each level (eg. X1) in version hierarchy is represented by a 32 bit value, one
173
+ bit per version and so there can be maximum 32 versions per level. Logical AND
174
+ (&) operation is performed for each level with the hardware's level version
175
+ and a non-zero output for _all_ the levels in a sub-group means the OPP is
176
+ supported by hardware. A value of 0xFFFFFFFF for each level in the sub-group
177
+ will enable the OPP for all versions for the hardware.
162178
163179 - status: Marks the node enabled/disabled.
164180
....@@ -489,7 +505,6 @@
489505 */
490506 opp-supported-hw = <0xF 0xFFFFFFFF 0xFFFFFFFF>
491507 opp-hz = /bits/ 64 <600000000>;
492
- opp-microvolt = <915000 900000 925000>;
493508 ...
494509 };
495510
....@@ -502,7 +517,17 @@
502517 */
503518 opp-supported-hw = <0x20 0xff0000ff 0x0000f4f0>
504519 opp-hz = /bits/ 64 <800000000>;
505
- opp-microvolt = <915000 900000 925000>;
520
+ ...
521
+ };
522
+
523
+ opp-900000000 {
524
+ /*
525
+ * Supports:
526
+ * - All cuts and substrate where process version is 0x2.
527
+ * - All cuts and process where substrate version is 0x2.
528
+ */
529
+ opp-supported-hw = <0xFFFFFFFF 0xFFFFFFFF 0x02>, <0xFFFFFFFF 0x01 0xFFFFFFFF>
530
+ opp-hz = /bits/ 64 <900000000>;
506531 ...
507532 };
508533 };