ARM64: dts: rk3399: move opp tables to rk3399-opp.dtsi
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / boot / dts / rockchip / rk3399-opp.dtsi
1 /*
2  * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
3  *
4  * This file is dual-licensed: you can use it either under the terms
5  * of the GPL or the X11 license, at your option. Note that this dual
6  * licensing only applies to this file, and not this project as a
7  * whole.
8  *
9  *  a) This library is free software; you can redistribute it and/or
10  *     modify it under the terms of the GNU General Public License as
11  *     published by the Free Software Foundation; either version 2 of the
12  *     License, or (at your option) any later version.
13  *
14  *     This library is distributed in the hope that it will be useful,
15  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *     GNU General Public License for more details.
18  *
19  * Or, alternatively,
20  *
21  *  b) Permission is hereby granted, free of charge, to any person
22  *     obtaining a copy of this software and associated documentation
23  *     files (the "Software"), to deal in the Software without
24  *     restriction, including without limitation the rights to use,
25  *     copy, modify, merge, publish, distribute, sublicense, and/or
26  *     sell copies of the Software, and to permit persons to whom the
27  *     Software is furnished to do so, subject to the following
28  *     conditions:
29  *
30  *     The above copyright notice and this permission notice shall be
31  *     included in all copies or substantial portions of the Software.
32  *
33  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40  *     OTHER DEALINGS IN THE SOFTWARE.
41  */
42
43 #include "rk3399-sched-energy.dtsi"
44
45 / {
46         cluster0_opp: opp-table0 {
47                 compatible = "operating-points-v2";
48                 opp-shared;
49
50                 opp00 {
51                         opp-hz = /bits/ 64 <408000000>;
52                         opp-microvolt = <800000>;
53                         clock-latency-ns = <40000>;
54                 };
55                 opp01 {
56                         opp-hz = /bits/ 64 <600000000>;
57                         opp-microvolt = <800000>;
58                         clock-latency-ns = <40000>;
59                 };
60                 opp02 {
61                         opp-hz = /bits/ 64 <816000000>;
62                         opp-microvolt = <800000>;
63                         clock-latency-ns = <40000>;
64                 };
65                 opp03 {
66                         opp-hz = /bits/ 64 <1008000000>;
67                         opp-microvolt = <850000>;
68                         clock-latency-ns = <40000>;
69                 };
70                 opp04 {
71                         opp-hz = /bits/ 64 <1200000000>;
72                         opp-microvolt = <925000>;
73                         clock-latency-ns = <40000>;
74                 };
75                 opp05 {
76                         opp-hz = /bits/ 64 <1416000000>;
77                         opp-microvolt = <1050000>;
78                         clock-latency-ns = <40000>;
79                 };
80                 opp06 {
81                         opp-hz = /bits/ 64 <1512000000>;
82                         opp-microvolt = <1125000>;
83                         clock-latency-ns = <40000>;
84                 };
85         };
86
87         cluster1_opp: opp-table1 {
88                 compatible = "operating-points-v2";
89                 opp-shared;
90
91                 opp00 {
92                         opp-hz = /bits/ 64 <408000000>;
93                         opp-microvolt = <800000>;
94                         clock-latency-ns = <40000>;
95                 };
96                 opp01 {
97                         opp-hz = /bits/ 64 <600000000>;
98                         opp-microvolt = <800000>;
99                         clock-latency-ns = <40000>;
100                 };
101                 opp02 {
102                         opp-hz = /bits/ 64 <816000000>;
103                         opp-microvolt = <825000>;
104                         clock-latency-ns = <40000>;
105                 };
106                 opp03 {
107                         opp-hz = /bits/ 64 <1008000000>;
108                         opp-microvolt = <850000>;
109                         clock-latency-ns = <40000>;
110                 };
111                 opp04 {
112                         opp-hz = /bits/ 64 <1200000000>;
113                         opp-microvolt = <900000>;
114                         clock-latency-ns = <40000>;
115                 };
116                 opp05 {
117                         opp-hz = /bits/ 64 <1416000000>;
118                         opp-microvolt = <1000000>;
119                         clock-latency-ns = <40000>;
120                 };
121                 opp06 {
122                         opp-hz = /bits/ 64 <1608000000>;
123                         opp-microvolt = <1050000>;
124                         clock-latency-ns = <40000>;
125                 };
126                 opp07 {
127                         opp-hz = /bits/ 64 <1800000000>;
128                         opp-microvolt = <1150000>;
129                         clock-latency-ns = <40000>;
130                 };
131                 opp08 {
132                         opp-hz = /bits/ 64 <1992000000>;
133                         opp-microvolt = <1225000>;
134                         clock-latency-ns = <40000>;
135                 };
136         };
137
138         gpu_opp_table: opp-table2 {
139                 compatible = "operating-points-v2";
140
141                 opp00 {
142                         opp-hz = /bits/ 64 <200000000>;
143                         opp-microvolt = <800000>;
144                 };
145                 opp01 {
146                         opp-hz = /bits/ 64 <297000000>;
147                         opp-microvolt = <800000>;
148                 };
149                 opp02 {
150                         opp-hz = /bits/ 64 <400000000>;
151                         opp-microvolt = <800000>;
152                 };
153                 opp03 {
154                         opp-hz = /bits/ 64 <500000000>;
155                         opp-microvolt = <825000>;
156                 };
157                 opp04 {
158                         opp-hz = /bits/ 64 <594000000>;
159                         opp-microvolt = <900000>;
160                 };
161                 opp05 {
162                         opp-hz = /bits/ 64 <800000000>;
163                         opp-microvolt = <1050000>;
164                 };
165         };
166
167         dmc_opp_table: opp-table3 {
168                 compatible = "operating-points-v2";
169
170                 opp00 {
171                         opp-hz = /bits/ 64 <200000000>;
172                         opp-microvolt = <825000>;
173                 };
174                 opp01 {
175                         opp-hz = /bits/ 64 <297000000>;
176                         opp-microvolt = <850000>;
177                 };
178                 opp02 {
179                         opp-hz = /bits/ 64 <400000000>;
180                         opp-microvolt = <850000>;
181                 };
182                 opp03 {
183                         opp-hz = /bits/ 64 <594000000>;
184                         opp-microvolt = <900000>;
185                 };
186                 opp04 {
187                         opp-hz = /bits/ 64 <800000000>;
188                         opp-microvolt = <900000>;
189                 };
190         };
191 };
192
193 &cpu_l0 {
194         operating-points-v2 = <&cluster0_opp>;
195         sched-energy-costs = <&RK3399_CPU_COST_0 &RK3399_CLUSTER_COST_0>;
196 };
197
198 &cpu_l1 {
199         operating-points-v2 = <&cluster0_opp>;
200         sched-energy-costs = <&RK3399_CPU_COST_0 &RK3399_CLUSTER_COST_0>;
201 };
202
203 &cpu_l2 {
204         operating-points-v2 = <&cluster0_opp>;
205         sched-energy-costs = <&RK3399_CPU_COST_0 &RK3399_CLUSTER_COST_0>;
206 };
207
208 &cpu_l3 {
209         operating-points-v2 = <&cluster0_opp>;
210         sched-energy-costs = <&RK3399_CPU_COST_0 &RK3399_CLUSTER_COST_0>;
211 };
212
213 &cpu_b0 {
214         operating-points-v2 = <&cluster1_opp>;
215         sched-energy-costs = <&RK3399_CPU_COST_1 &RK3399_CLUSTER_COST_1>;
216 };
217
218 &cpu_b1 {
219         operating-points-v2 = <&cluster1_opp>;
220         sched-energy-costs = <&RK3399_CPU_COST_1 &RK3399_CLUSTER_COST_1>;
221 };
222
223 &gpu {
224         operating-points-v2 = <&gpu_opp_table>;
225 };
226
227 &dmc {
228         operating-points-v2 = <&dmc_opp_table>;
229 };