1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2022, Linaro Limited
4 */
5
6#include "msm8996.dtsi"
7
8/ {
9	/delete-node/ opp-table-cluster0;
10	/delete-node/ opp-table-cluster1;
11
12	/*
13	 * On MSM8996 Pro the cpufreq driver shifts speed bins into the high
14	 * nibble of supported hw, so speed bin 0 becomes 0x10, speed bin 1
15	 * becomes 0x20, speed 2 becomes 0x40.
16	 */
17
18	cluster0_opp: opp-table-cluster0 {
19		compatible = "operating-points-v2-kryo-cpu";
20		nvmem-cells = <&speedbin_efuse>;
21		opp-shared;
22
23		opp-307200000 {
24			opp-hz = /bits/ 64 <307200000>;
25			opp-supported-hw = <0x70>;
26			clock-latency-ns = <200000>;
27		};
28		opp-384000000 {
29			opp-hz = /bits/ 64 <384000000>;
30			opp-supported-hw = <0x70>;
31			clock-latency-ns = <200000>;
32		};
33		opp-460800000 {
34			opp-hz = /bits/ 64 <460800000>;
35			opp-supported-hw = <0x70>;
36			clock-latency-ns = <200000>;
37		};
38		opp-537600000 {
39			opp-hz = /bits/ 64 <537600000>;
40			opp-supported-hw = <0x70>;
41			clock-latency-ns = <200000>;
42		};
43		opp-614400000 {
44			opp-hz = /bits/ 64 <614400000>;
45			opp-supported-hw = <0x70>;
46			clock-latency-ns = <200000>;
47		};
48		opp-691200000 {
49			opp-hz = /bits/ 64 <691200000>;
50			opp-supported-hw = <0x70>;
51			clock-latency-ns = <200000>;
52		};
53		opp-768000000 {
54			opp-hz = /bits/ 64 <768000000>;
55			opp-supported-hw = <0x70>;
56			clock-latency-ns = <200000>;
57		};
58		opp-844800000 {
59			opp-hz = /bits/ 64 <844800000>;
60			opp-supported-hw = <0x70>;
61			clock-latency-ns = <200000>;
62		};
63		opp-902400000 {
64			opp-hz = /bits/ 64 <902400000>;
65			opp-supported-hw = <0x70>;
66			clock-latency-ns = <200000>;
67		};
68		opp-979200000 {
69			opp-hz = /bits/ 64 <979200000>;
70			opp-supported-hw = <0x70>;
71			clock-latency-ns = <200000>;
72		};
73		opp-1056000000 {
74			opp-hz = /bits/ 64 <1056000000>;
75			opp-supported-hw = <0x70>;
76			clock-latency-ns = <200000>;
77		};
78		opp-1132800000 {
79			opp-hz = /bits/ 64 <1132800000>;
80			opp-supported-hw = <0x70>;
81			clock-latency-ns = <200000>;
82		};
83		opp-1209600000 {
84			opp-hz = /bits/ 64 <1209600000>;
85			opp-supported-hw = <0x70>;
86			clock-latency-ns = <200000>;
87		};
88		opp-1286400000 {
89			opp-hz = /bits/ 64 <1286400000>;
90			opp-supported-hw = <0x70>;
91			clock-latency-ns = <200000>;
92		};
93		opp-1363200000 {
94			opp-hz = /bits/ 64 <1363200000>;
95			opp-supported-hw = <0x70>;
96			clock-latency-ns = <200000>;
97		};
98		opp-1440000000 {
99			opp-hz = /bits/ 64 <1440000000>;
100			opp-supported-hw = <0x70>;
101			clock-latency-ns = <200000>;
102		};
103		opp-1516800000 {
104			opp-hz = /bits/ 64 <1516800000>;
105			opp-supported-hw = <0x70>;
106			clock-latency-ns = <200000>;
107		};
108		opp-1593600000 {
109			opp-hz = /bits/ 64 <1593600000>;
110			opp-supported-hw = <0x70>;
111			clock-latency-ns = <200000>;
112		};
113		opp-1996800000 {
114			opp-hz = /bits/ 64 <1996800000>;
115			opp-supported-hw = <0x20>;
116			clock-latency-ns = <200000>;
117		};
118		opp-2188800000 {
119			opp-hz = /bits/ 64 <2188800000>;
120			opp-supported-hw = <0x10>;
121			clock-latency-ns = <200000>;
122		};
123	};
124
125	cluster1_opp: opp-table-cluster1 {
126		compatible = "operating-points-v2-kryo-cpu";
127		nvmem-cells = <&speedbin_efuse>;
128		opp-shared;
129
130		opp-307200000 {
131			opp-hz = /bits/ 64 <307200000>;
132			opp-supported-hw = <0x70>;
133			clock-latency-ns = <200000>;
134		};
135		opp-384000000 {
136			opp-hz = /bits/ 64 <384000000>;
137			opp-supported-hw = <0x70>;
138			clock-latency-ns = <200000>;
139		};
140		opp-460800000 {
141			opp-hz = /bits/ 64 <460800000>;
142			opp-supported-hw = <0x70>;
143			clock-latency-ns = <200000>;
144		};
145		opp-537600000 {
146			opp-hz = /bits/ 64 <537600000>;
147			opp-supported-hw = <0x70>;
148			clock-latency-ns = <200000>;
149		};
150		opp-614400000 {
151			opp-hz = /bits/ 64 <614400000>;
152			opp-supported-hw = <0x70>;
153			clock-latency-ns = <200000>;
154		};
155		opp-691200000 {
156			opp-hz = /bits/ 64 <691200000>;
157			opp-supported-hw = <0x70>;
158			clock-latency-ns = <200000>;
159		};
160		opp-748800000 {
161			opp-hz = /bits/ 64 <748800000>;
162			opp-supported-hw = <0x70>;
163			clock-latency-ns = <200000>;
164		};
165		opp-825600000 {
166			opp-hz = /bits/ 64 <825600000>;
167			opp-supported-hw = <0x70>;
168			clock-latency-ns = <200000>;
169		};
170		opp-902400000 {
171			opp-hz = /bits/ 64 <902400000>;
172			opp-supported-hw = <0x70>;
173			clock-latency-ns = <200000>;
174		};
175		opp-979200000 {
176			opp-hz = /bits/ 64 <979200000>;
177			opp-supported-hw = <0x70>;
178			clock-latency-ns = <200000>;
179		};
180		opp-1056000000 {
181			opp-hz = /bits/ 64 <1056000000>;
182			opp-supported-hw = <0x70>;
183			clock-latency-ns = <200000>;
184		};
185		opp-1132800000 {
186			opp-hz = /bits/ 64 <1132800000>;
187			opp-supported-hw = <0x70>;
188			clock-latency-ns = <200000>;
189		};
190		opp-1209600000 {
191			opp-hz = /bits/ 64 <1209600000>;
192			opp-supported-hw = <0x70>;
193			clock-latency-ns = <200000>;
194		};
195		opp-1286400000 {
196			opp-hz = /bits/ 64 <1286400000>;
197			opp-supported-hw = <0x70>;
198			clock-latency-ns = <200000>;
199		};
200		opp-1363200000 {
201			opp-hz = /bits/ 64 <1363200000>;
202			opp-supported-hw = <0x70>;
203			clock-latency-ns = <200000>;
204		};
205		opp-1440000000 {
206			opp-hz = /bits/ 64 <1440000000>;
207			opp-supported-hw = <0x70>;
208			clock-latency-ns = <200000>;
209		};
210		opp-1516800000 {
211			opp-hz = /bits/ 64 <1516800000>;
212			opp-supported-hw = <0x70>;
213			clock-latency-ns = <200000>;
214		};
215		opp-1593600000 {
216			opp-hz = /bits/ 64 <1593600000>;
217			opp-supported-hw = <0x70>;
218			clock-latency-ns = <200000>;
219		};
220		opp-1670400000 {
221			opp-hz = /bits/ 64 <1670400000>;
222			opp-supported-hw = <0x70>;
223			clock-latency-ns = <200000>;
224		};
225		opp-1747200000 {
226			opp-hz = /bits/ 64 <1747200000>;
227			opp-supported-hw = <0x70>;
228			clock-latency-ns = <200000>;
229		};
230		opp-1824000000 {
231			opp-hz = /bits/ 64 <1824000000>;
232			opp-supported-hw = <0x70>;
233			clock-latency-ns = <200000>;
234		};
235		opp-1900800000 {
236			opp-hz = /bits/ 64 <1900800000>;
237			opp-supported-hw = <0x70>;
238			clock-latency-ns = <200000>;
239		};
240		opp-1977600000 {
241			opp-hz = /bits/ 64 <1977600000>;
242			opp-supported-hw = <0x30>;
243			clock-latency-ns = <200000>;
244		};
245		opp-2054400000 {
246			opp-hz = /bits/ 64 <2054400000>;
247			opp-supported-hw = <0x30>;
248			clock-latency-ns = <200000>;
249		};
250		opp-2150400000 {
251			opp-hz = /bits/ 64 <2150400000>;
252			opp-supported-hw = <0x30>;
253			clock-latency-ns = <200000>;
254		};
255		opp-2246400000 {
256			opp-hz = /bits/ 64 <2246400000>;
257			opp-supported-hw = <0x10>;
258			clock-latency-ns = <200000>;
259		};
260		opp-2342400000 {
261			opp-hz = /bits/ 64 <2342400000>;
262			opp-supported-hw = <0x10>;
263			clock-latency-ns = <200000>;
264		};
265	};
266};
267
268&gpu_opp_table {
269	/*
270	 * Unlike CPU opp tables, the GPU driver does not shift speed bins.
271	 *
272	 * 652.8 Mhz is available on speed bin 0 only.
273	 * 624 Mhz and 560 Mhz are available on speed bins 0 and 1.
274	 * All the rest are available on all bins of the hardware (like on
275	 * plain 8996).
276	 */
277
278	opp-652800000 {
279		opp-hz = /bits/ 64 <652800000>;
280		opp-supported-hw = <0x01>;
281	};
282	opp-624000000 {
283		opp-hz = /bits/ 64 <624000000>;
284		opp-supported-hw = <0x03>;
285	};
286	opp-560000000 {
287		opp-hz = /bits/ 64 <560000000>;
288		opp-supported-hw = <0x03>;
289	};
290	/* The rest is inherited from msm8996 */
291};
292