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