ARM64: dts: rk3399: support more frequency for evb2
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / boot / dts / rockchip / rk3399-evb-rev2.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 file 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 file 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-evb.dtsi"
44
45 / {
46         compatible = "rockchip,rk3399-evb-rev2", "rockchip,rk3399";
47
48         vcc5v0_sys: vcc5v0-sys {
49                 compatible = "regulator-fixed";
50                 regulator-name = "vcc5v0_sys";
51                 regulator-always-on;
52                 regulator-boot-on;
53                 regulator-min-microvolt = <5000000>;
54                 regulator-max-microvolt = <5000000>;
55         };
56 };
57
58 &cluster0_opp {
59         opp00 {
60                 opp-hz = /bits/ 64 <408000000>;
61                 opp-microvolt = <800000>;
62                 clock-latency-ns = <40000>;
63         };
64         opp01 {
65                 opp-hz = /bits/ 64 <600000000>;
66                 opp-microvolt = <800000>;
67         };
68         opp02 {
69                 opp-hz = /bits/ 64 <816000000>;
70                 opp-microvolt = <800000>;
71         };
72         opp03 {
73                 opp-hz = /bits/ 64 <1008000000>;
74                 opp-microvolt = <875000>;
75         };
76         opp04 {
77                 opp-hz = /bits/ 64 <1200000000>;
78                 opp-microvolt = <925000>;
79         };
80         opp05 {
81                 opp-hz = /bits/ 64 <1416000000>;
82                 opp-microvolt = <1025000>;
83         };
84         opp06 {
85                 opp-hz = /bits/ 64 <1512000000>;
86                 opp-microvolt = <1075000>;
87         };
88 };
89
90 &cluster1_opp {
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         };
100         opp02 {
101                 opp-hz = /bits/ 64 <816000000>;
102                 opp-microvolt = <800000>;
103         };
104         opp03 {
105                 opp-hz = /bits/ 64 <1008000000>;
106                 opp-microvolt = <850000>;
107         };
108         opp04 {
109                 opp-hz = /bits/ 64 <1200000000>;
110                 opp-microvolt = <925000>;
111         };
112         opp05 {
113                 opp-hz = /bits/ 64 <1416000000>;
114                 opp-microvolt = <1025000>;
115         };
116         opp06 {
117                 opp-hz = /bits/ 64 <1608000000>;
118                 opp-microvolt = <1125000>;
119         };
120         opp07 {
121                 opp-hz = /bits/ 64 <1800000000>;
122                 opp-microvolt = <1200000>;
123         };
124 };
125
126 &CPU_COST_A72 {
127         busy-cost-data = <
128                 232   349       /*  408MHz */
129                 341   547       /*  600MHz */
130                 464   794       /*  816MHz */
131                 573   1141      /* 1008MHz */
132                 683   1850      /* 1200MHz */
133                 805   2499      /* 1416MHz */
134                 915   2922      /* 1608MHz */
135                 1024  3416      /* 1800MHz */
136         >;
137         idle-cost-data = <
138               15
139                0
140         >;
141 };
142
143 &CPU_COST_A53 {
144         busy-cost-data = <
145                 121    40       /*  408M */
146                 179    62       /*  600M */
147                 243    90       /*  816M */
148                 300    126      /* 1008M */
149                 357    196      /* 1200M */
150                 421    246      /* 1416M */
151                 449    263      /* 1512M */
152         >;
153         idle-cost-data = <
154               6
155               0
156         >;
157 };
158
159 &CLUSTER_COST_A72 {
160         busy-cost-data = <
161                 232   349       /*  408MHz */
162                 341   547       /*  600MHz */
163                 464   794       /*  816MHz */
164                 573   1141      /* 1008MHz */
165                 683   1850      /* 1200MHz */
166                 805   2499      /* 1416MHz */
167                 915   2922      /* 1608MHz */
168                 1024  3416      /* 1800MHz */
169         >;
170         idle-cost-data = <
171                  65
172                  65
173         >;
174 };
175
176 &CLUSTER_COST_A53 {
177         busy-cost-data = <
178                 121    40       /*  408M */
179                 179    62       /*  600M */
180                 243    90       /*  816M */
181                 300    126      /* 1008M */
182                 357    196      /* 1200M */
183                 421    246      /* 1416M */
184                 449    263      /* 1512M */
185         >;
186         idle-cost-data = <
187                 56
188                 56
189         >;
190 };
191
192 &i2c0 {
193         vdd_cpu_b: syr827@40 {
194                 compatible = "silergy,syr827";
195                 reg = <0x40>;
196                 vin-supply = <&vcc5v0_sys>;
197                 regulator-compatible = "fan53555-reg";
198                 regulator-name = "vdd_cpu_b";
199                 regulator-min-microvolt = <712500>;
200                 regulator-max-microvolt = <1500000>;
201                 regulator-ramp-delay = <1000>;
202                 fcs,suspend-voltage-selector = <1>;
203                 regulator-always-on;
204                 regulator-boot-on;
205                 regulator-initial-state = <3>;
206                         regulator-state-mem {
207                         regulator-off-in-suspend;
208                 };
209         };
210
211         lp8752: lp8752@60 {
212                 compatible = "ti,lp8752";
213                 reg = <0x60>;
214                 vin0-supply = <&vcc5v0_sys>;
215                 regulators {
216                         vdd_gpu: lp8752_buck0 {
217                                 regulator-name = "vdd_gpu";
218                                 regulator-min-microvolt = <735000>;
219                                 regulator-max-microvolt = <1400000>;
220                                 regulator-always-on;
221                                 regulator-boot-on;
222                         };
223                 };
224         };
225
226         rk808: pmic@1b {
227                 compatible = "rockchip,rk808";
228                 reg = <0x1b>;
229                 interrupt-parent = <&gpio1>;
230                 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
231                 pinctrl-names = "default";
232                 pinctrl-0 = <&pmic_int_l &pmic_dvs2>;
233                 rockchip,system-power-controller;
234                 wakeup-source;
235                 #clock-cells = <1>;
236                 clock-output-names = "xin32k", "rk808-clkout2";
237
238                 vcc1-supply = <&vcc3v3_sys>;
239                 vcc2-supply = <&vcc3v3_sys>;
240                 vcc3-supply = <&vcc3v3_sys>;
241                 vcc4-supply = <&vcc3v3_sys>;
242                 vcc6-supply = <&vcc3v3_sys>;
243                 vcc7-supply = <&vcc3v3_sys>;
244                 vcc8-supply = <&vcc3v3_sys>;
245                 vcc9-supply = <&vcc3v3_sys>;
246                 vcc10-supply = <&vcc3v3_sys>;
247                 vcc11-supply = <&vcc3v3_sys>;
248                 vcc12-supply = <&vcc3v3_sys>;
249                 vddio-supply = <&vcc1v8_pmu>;
250
251                 regulators {
252                         vdd_log: DCDC_REG1 {
253                                 regulator-always-on;
254                                 regulator-boot-on;
255                                 regulator-min-microvolt = <750000>;
256                                 regulator-max-microvolt = <1350000>;
257                                 regulator-name = "vdd_log";
258                                 regulator-state-mem {
259                                         regulator-on-in-suspend;
260                                         regulator-suspend-microvolt = <900000>;
261                                 };
262                         };
263
264                         vdd_cpu_l: DCDC_REG2 {
265                                 regulator-always-on;
266                                 regulator-boot-on;
267                                 regulator-min-microvolt = <750000>;
268                                 regulator-max-microvolt = <1350000>;
269                                 regulator-name = "vdd_cpu_l";
270                                 regulator-state-mem {
271                                         regulator-off-in-suspend;
272                                 };
273                         };
274
275                         vcc_ddr: DCDC_REG3 {
276                                 regulator-always-on;
277                                 regulator-boot-on;
278                                 regulator-name = "vcc_ddr";
279                                 regulator-state-mem {
280                                         regulator-on-in-suspend;
281                                 };
282                         };
283
284                         vcc_1v8: DCDC_REG4 {
285                                 regulator-always-on;
286                                 regulator-boot-on;
287                                 regulator-min-microvolt = <1800000>;
288                                 regulator-max-microvolt = <1800000>;
289                                 regulator-name = "vcc_1v8";
290                                 regulator-state-mem {
291                                         regulator-on-in-suspend;
292                                         regulator-suspend-microvolt = <1800000>;
293                                 };
294                         };
295
296                         vcc1v8_dvp: LDO_REG1 {
297                                 regulator-always-on;
298                                 regulator-boot-on;
299                                 regulator-min-microvolt = <1800000>;
300                                 regulator-max-microvolt = <1800000>;
301                                 regulator-name = "vcc1v8_dvp";
302                                 regulator-state-mem {
303                                         regulator-off-in-suspend;
304                                 };
305                         };
306
307                         vcc3v0_tp: LDO_REG2 {
308                                 regulator-always-on;
309                                 regulator-boot-on;
310                                 regulator-min-microvolt = <3000000>;
311                                 regulator-max-microvolt = <3000000>;
312                                 regulator-name = "vcc3v0_tp";
313                                 regulator-state-mem {
314                                         regulator-off-in-suspend;
315                                 };
316                         };
317
318                         vcc1v8_pmu: LDO_REG3 {
319                                 regulator-always-on;
320                                 regulator-boot-on;
321                                 regulator-min-microvolt = <1800000>;
322                                 regulator-max-microvolt = <1800000>;
323                                 regulator-name = "vcc1v8_pmu";
324                                 regulator-state-mem {
325                                         regulator-on-in-suspend;
326                                         regulator-suspend-microvolt = <1800000>;
327                                 };
328                         };
329
330                         vcc_sd: LDO_REG4 {
331                                 regulator-always-on;
332                                 regulator-boot-on;
333                                 regulator-min-microvolt = <1800000>;
334                                 regulator-max-microvolt = <3300000>;
335                                 regulator-name = "vcc_sd";
336                                 regulator-state-mem {
337                                         regulator-on-in-suspend;
338                                         regulator-suspend-microvolt = <3300000>;
339                                 };
340                         };
341
342                         vcca3v0_codec: LDO_REG5 {
343                                 regulator-always-on;
344                                 regulator-boot-on;
345                                 regulator-min-microvolt = <3000000>;
346                                 regulator-max-microvolt = <3000000>;
347                                 regulator-name = "vcca3v0_codec";
348                                 regulator-state-mem {
349                                         regulator-off-in-suspend;
350                                 };
351                         };
352
353                         vcc_1v5: LDO_REG6 {
354                                 regulator-always-on;
355                                 regulator-boot-on;
356                                 regulator-min-microvolt = <1500000>;
357                                 regulator-max-microvolt = <1500000>;
358                                 regulator-name = "vcc_1v5";
359                                 regulator-state-mem {
360                                         regulator-on-in-suspend;
361                                         regulator-suspend-microvolt = <1500000>;
362                                 };
363                         };
364
365                         vcca1v8_codec: LDO_REG7 {
366                                 regulator-always-on;
367                                 regulator-boot-on;
368                                 regulator-min-microvolt = <1800000>;
369                                 regulator-max-microvolt = <1800000>;
370                                 regulator-name = "vcca1v8_codec";
371                                 regulator-state-mem {
372                                         regulator-off-in-suspend;
373                                 };
374                         };
375
376                         vcc_3v0: LDO_REG8 {
377                                 regulator-always-on;
378                                 regulator-boot-on;
379                                 regulator-min-microvolt = <3000000>;
380                                 regulator-max-microvolt = <3000000>;
381                                 regulator-name = "vcc_3v0";
382                                 regulator-state-mem {
383                                         regulator-on-in-suspend;
384                                         regulator-suspend-microvolt = <3000000>;
385                                 };
386                         };
387
388                         vcc3v3_s3: SWITCH_REG1 {
389                                 regulator-always-on;
390                                 regulator-boot-on;
391                                 regulator-name = "vcc3v3_s3";
392                                 regulator-state-mem {
393                                         regulator-off-in-suspend;
394                                 };
395                         };
396
397                         vcc3v3_s0: SWITCH_REG2 {
398                                 regulator-always-on;
399                                 regulator-boot-on;
400                                 regulator-name = "vcc3v3_s0";
401                                 regulator-state-mem {
402                                         regulator-off-in-suspend;
403                                 };
404                         };
405                 };
406         };
407 };
408
409 &cpu_l0 {
410         cpu-supply = <&vdd_cpu_l>;
411 };
412
413 &cpu_l1 {
414         cpu-supply = <&vdd_cpu_l>;
415 };
416
417 &cpu_l2 {
418         cpu-supply = <&vdd_cpu_l>;
419 };
420
421 &cpu_l3 {
422         cpu-supply = <&vdd_cpu_l>;
423 };
424
425 &cpu_b0 {
426         cpu-supply = <&vdd_cpu_b>;
427 };
428
429 &cpu_b1 {
430         cpu-supply = <&vdd_cpu_b>;
431 };
432
433 &gpu {
434         status = "okay";
435         mali-supply = <&vdd_gpu>;
436 };
437