Skip to content

Commit 83d4e04

Browse files
Haxk20vireshk
authored andcommitted
dt-bindings: opp: Describe H616 OPPs and opp-supported-hw
Compared to the existing Allwinner H6 OPP scheme, the H616 uses a similar NVMEM based mechanism to determine the silicon revision, which is required to select the right frequency / voltage pair for the OPPs. However it limits the maximum frequency for some speed bins, also seems to not support all frequencies in all speed bins, which requires us to introduce the opp-supported-hw property. Add this property to the list of allowed properties, also drop the requirement for the revision specific opp-microvolt properties, since they might not be needed if using opp-supported-hw. Also use to opportunity to adjust some wording, and drop a sentence referring to the Linux driver and the OPP subsystem. Shorten the existing example and add another example, showcasing the opp-supported-hw property. Signed-off-by: Martin Botka <[email protected]> Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
1 parent 6ae0774 commit 83d4e04

File tree

1 file changed

+43
-44
lines changed

1 file changed

+43
-44
lines changed

Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,25 @@ maintainers:
1313
description: |
1414
For some SoCs, the CPU frequency subset and voltage value of each
1515
OPP varies based on the silicon variant in use. Allwinner Process
16-
Voltage Scaling Tables defines the voltage and frequency value based
17-
on the speedbin blown in the efuse combination. The
18-
sun50i-cpufreq-nvmem driver reads the efuse value from the SoC to
19-
provide the OPP framework with required information.
16+
Voltage Scaling Tables define the voltage and frequency values based
17+
on the speedbin blown in the efuse combination.
2018
2119
allOf:
2220
- $ref: opp-v2-base.yaml#
2321

2422
properties:
2523
compatible:
26-
const: allwinner,sun50i-h6-operating-points
24+
enum:
25+
- allwinner,sun50i-h6-operating-points
26+
- allwinner,sun50i-h616-operating-points
2727

2828
nvmem-cells:
2929
description: |
3030
A phandle pointing to a nvmem-cells node representing the efuse
31-
registers that has information about the speedbin that is used
31+
register that has information about the speedbin that is used
3232
to select the right frequency/voltage value pair. Please refer
33-
the for nvmem-cells bindings
34-
Documentation/devicetree/bindings/nvmem/nvmem.txt and also
33+
to the nvmem-cells bindings in
34+
Documentation/devicetree/bindings/nvmem/nvmem.yaml and also the
3535
examples below.
3636
3737
opp-shared: true
@@ -47,15 +47,18 @@ patternProperties:
4747
properties:
4848
opp-hz: true
4949
clock-latency-ns: true
50+
opp-microvolt: true
51+
opp-supported-hw:
52+
maxItems: 1
53+
description:
54+
A single 32 bit bitmap value, representing compatible HW, one
55+
bit per speed bin index.
5056

5157
patternProperties:
5258
"^opp-microvolt-speed[0-9]$": true
5359

5460
required:
5561
- opp-hz
56-
- opp-microvolt-speed0
57-
- opp-microvolt-speed1
58-
- opp-microvolt-speed2
5962

6063
unevaluatedProperties: false
6164

@@ -77,58 +80,54 @@ examples:
7780
opp-microvolt-speed2 = <800000>;
7881
};
7982
80-
opp-720000000 {
83+
opp-1080000000 {
8184
clock-latency-ns = <244144>; /* 8 32k periods */
82-
opp-hz = /bits/ 64 <720000000>;
85+
opp-hz = /bits/ 64 <1080000000>;
8386
84-
opp-microvolt-speed0 = <880000>;
85-
opp-microvolt-speed1 = <820000>;
86-
opp-microvolt-speed2 = <800000>;
87+
opp-microvolt-speed0 = <1060000>;
88+
opp-microvolt-speed1 = <880000>;
89+
opp-microvolt-speed2 = <840000>;
8790
};
8891
89-
opp-816000000 {
92+
opp-1488000000 {
9093
clock-latency-ns = <244144>; /* 8 32k periods */
91-
opp-hz = /bits/ 64 <816000000>;
94+
opp-hz = /bits/ 64 <1488000000>;
9295
93-
opp-microvolt-speed0 = <880000>;
94-
opp-microvolt-speed1 = <820000>;
95-
opp-microvolt-speed2 = <800000>;
96+
opp-microvolt-speed0 = <1160000>;
97+
opp-microvolt-speed1 = <1000000>;
98+
opp-microvolt-speed2 = <960000>;
9699
};
100+
};
97101
98-
opp-888000000 {
99-
clock-latency-ns = <244144>; /* 8 32k periods */
100-
opp-hz = /bits/ 64 <888000000>;
101-
102-
opp-microvolt-speed0 = <940000>;
103-
opp-microvolt-speed1 = <820000>;
104-
opp-microvolt-speed2 = <800000>;
105-
};
102+
- |
103+
opp-table {
104+
compatible = "allwinner,sun50i-h616-operating-points";
105+
nvmem-cells = <&speedbin_efuse>;
106+
opp-shared;
106107
107-
opp-1080000000 {
108+
opp-480000000 {
108109
clock-latency-ns = <244144>; /* 8 32k periods */
109-
opp-hz = /bits/ 64 <1080000000>;
110+
opp-hz = /bits/ 64 <480000000>;
110111
111-
opp-microvolt-speed0 = <1060000>;
112-
opp-microvolt-speed1 = <880000>;
113-
opp-microvolt-speed2 = <840000>;
112+
opp-microvolt = <900000>;
113+
opp-supported-hw = <0x1f>;
114114
};
115115
116-
opp-1320000000 {
116+
opp-792000000 {
117117
clock-latency-ns = <244144>; /* 8 32k periods */
118-
opp-hz = /bits/ 64 <1320000000>;
118+
opp-hz = /bits/ 64 <792000000>;
119119
120-
opp-microvolt-speed0 = <1160000>;
121-
opp-microvolt-speed1 = <940000>;
122-
opp-microvolt-speed2 = <900000>;
120+
opp-microvolt-speed1 = <900000>;
121+
opp-microvolt-speed4 = <940000>;
122+
opp-supported-hw = <0x12>;
123123
};
124124
125-
opp-1488000000 {
125+
opp-1512000000 {
126126
clock-latency-ns = <244144>; /* 8 32k periods */
127-
opp-hz = /bits/ 64 <1488000000>;
127+
opp-hz = /bits/ 64 <1512000000>;
128128
129-
opp-microvolt-speed0 = <1160000>;
130-
opp-microvolt-speed1 = <1000000>;
131-
opp-microvolt-speed2 = <960000>;
129+
opp-microvolt = <1100000>;
130+
opp-supported-hw = <0x0a>;
132131
};
133132
};
134133

0 commit comments

Comments
 (0)