Merge tag 'lsk-v4.4-16.05-android'
[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 &i2c0 {
59         vdd_cpu_b: syr827@40 {
60                 compatible = "silergy,syr827";
61                 reg = <0x40>;
62                 vin-supply = <&vcc5v0_sys>;
63                 regulator-compatible = "fan53555-reg";
64                 regulator-name = "vdd_cpu_b";
65                 regulator-min-microvolt = <712500>;
66                 regulator-max-microvolt = <1500000>;
67                 regulator-ramp-delay = <1000>;
68                 fcs,suspend-voltage-selector = <1>;
69                 regulator-always-on;
70                 regulator-boot-on;
71                 regulator-initial-state = <3>;
72                         regulator-state-mem {
73                         regulator-off-in-suspend;
74                 };
75         };
76
77         lp8752: lp8752@60 {
78                 compatible = "ti,lp8752";
79                 reg = <0x60>;
80                 vin0-supply = <&vcc5v0_sys>;
81                 regulators {
82                         vdd_gpu: lp8752_buck0 {
83                                 regulator-name = "vdd_gpu";
84                                 regulator-min-microvolt = <735000>;
85                                 regulator-max-microvolt = <1400000>;
86                                 regulator-always-on;
87                                 regulator-boot-on;
88                         };
89                 };
90         };
91
92         rk808: pmic@1b {
93                 compatible = "rockchip,rk808";
94                 reg = <0x1b>;
95                 interrupt-parent = <&gpio1>;
96                 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
97                 pinctrl-names = "default";
98                 pinctrl-0 = <&pmic_int_l &pmic_dvs2>;
99                 rockchip,system-power-controller;
100                 wakeup-source;
101                 #clock-cells = <1>;
102                 clock-output-names = "xin32k", "rk808-clkout2";
103
104                 vcc1-supply = <&vcc3v3_sys>;
105                 vcc2-supply = <&vcc3v3_sys>;
106                 vcc3-supply = <&vcc3v3_sys>;
107                 vcc4-supply = <&vcc3v3_sys>;
108                 vcc6-supply = <&vcc3v3_sys>;
109                 vcc7-supply = <&vcc3v3_sys>;
110                 vcc8-supply = <&vcc3v3_sys>;
111                 vcc9-supply = <&vcc3v3_sys>;
112                 vcc10-supply = <&vcc3v3_sys>;
113                 vcc11-supply = <&vcc3v3_sys>;
114                 vcc12-supply = <&vcc3v3_sys>;
115                 vddio-supply = <&vcc1v8_pmu>;
116
117                 regulators {
118                         vdd_log: DCDC_REG1 {
119                                 regulator-always-on;
120                                 regulator-boot-on;
121                                 regulator-min-microvolt = <750000>;
122                                 regulator-max-microvolt = <1350000>;
123                                 regulator-name = "vdd_log";
124                                 regulator-state-mem {
125                                         regulator-off-in-suspend;
126                                 };
127                         };
128
129                         vdd_cpu_l: DCDC_REG2 {
130                                 regulator-always-on;
131                                 regulator-boot-on;
132                                 regulator-min-microvolt = <750000>;
133                                 regulator-max-microvolt = <1350000>;
134                                 regulator-name = "vdd_cpu_l";
135                                 regulator-state-mem {
136                                         regulator-off-in-suspend;
137                                 };
138                         };
139
140                         vcc_ddr: DCDC_REG3 {
141                                 regulator-always-on;
142                                 regulator-boot-on;
143                                 regulator-name = "vcc_ddr";
144                                 regulator-state-mem {
145                                         regulator-on-in-suspend;
146                                 };
147                         };
148
149                         vcc_1v8: DCDC_REG4 {
150                                 regulator-always-on;
151                                 regulator-boot-on;
152                                 regulator-min-microvolt = <1800000>;
153                                 regulator-max-microvolt = <1800000>;
154                                 regulator-name = "vcc_1v8";
155                                 regulator-state-mem {
156                                         regulator-on-in-suspend;
157                                         regulator-suspend-microvolt = <1800000>;
158                                 };
159                         };
160
161                         vcc1v8_dvp: LDO_REG1 {
162                                 regulator-always-on;
163                                 regulator-boot-on;
164                                 regulator-min-microvolt = <1800000>;
165                                 regulator-max-microvolt = <1800000>;
166                                 regulator-name = "vcc1v8_dvp";
167                                 regulator-state-mem {
168                                         regulator-on-in-suspend;
169                                         regulator-suspend-microvolt = <1800000>;
170                                 };
171                         };
172
173                         vcc3v0_tp: LDO_REG2 {
174                                 regulator-always-on;
175                                 regulator-boot-on;
176                                 regulator-min-microvolt = <3000000>;
177                                 regulator-max-microvolt = <3000000>;
178                                 regulator-name = "vcc3v0_tp";
179                                 regulator-state-mem {
180                                         regulator-off-in-suspend;
181                                 };
182                         };
183
184                         vcc1v8_pmu: LDO_REG3 {
185                                 regulator-always-on;
186                                 regulator-boot-on;
187                                 regulator-min-microvolt = <1800000>;
188                                 regulator-max-microvolt = <1800000>;
189                                 regulator-name = "vcc1v8_pmu";
190                                 regulator-state-mem {
191                                         regulator-on-in-suspend;
192                                         regulator-suspend-microvolt = <1800000>;
193                                 };
194                         };
195
196                         vcc_sd: LDO_REG4 {
197                                 regulator-always-on;
198                                 regulator-boot-on;
199                                 regulator-min-microvolt = <1800000>;
200                                 regulator-max-microvolt = <3300000>;
201                                 regulator-name = "vcc_sd";
202                                 regulator-state-mem {
203                                         regulator-on-in-suspend;
204                                         regulator-suspend-microvolt = <3300000>;
205                                 };
206                         };
207
208                         vcca3v0_codec: LDO_REG5 {
209                                 regulator-always-on;
210                                 regulator-boot-on;
211                                 regulator-min-microvolt = <3000000>;
212                                 regulator-max-microvolt = <3000000>;
213                                 regulator-name = "vcca3v0_codec";
214                                 regulator-state-mem {
215                                         regulator-on-in-suspend;
216                                         regulator-suspend-microvolt = <3000000>;
217                                 };
218                         };
219
220                         vcc_1v5: LDO_REG6 {
221                                 regulator-always-on;
222                                 regulator-boot-on;
223                                 regulator-min-microvolt = <1500000>;
224                                 regulator-max-microvolt = <1500000>;
225                                 regulator-name = "vcc_1v5";
226                                 regulator-state-mem {
227                                         regulator-on-in-suspend;
228                                         regulator-suspend-microvolt = <1500000>;
229                                 };
230                         };
231
232                         vcca1v8_codec: LDO_REG7 {
233                                 regulator-always-on;
234                                 regulator-boot-on;
235                                 regulator-min-microvolt = <1800000>;
236                                 regulator-max-microvolt = <1800000>;
237                                 regulator-name = "vcca1v8_codec";
238                                 regulator-state-mem {
239                                         regulator-on-in-suspend;
240                                         regulator-suspend-microvolt = <1800000>;
241                                 };
242                         };
243
244                         vcc_3v0: LDO_REG8 {
245                                 regulator-always-on;
246                                 regulator-boot-on;
247                                 regulator-min-microvolt = <3000000>;
248                                 regulator-max-microvolt = <3000000>;
249                                 regulator-name = "vcc_3v0";
250                                 regulator-state-mem {
251                                         regulator-on-in-suspend;
252                                         regulator-suspend-microvolt = <3000000>;
253                                 };
254                         };
255
256                         vcc3v3_s3: SWITCH_REG1 {
257                                 regulator-always-on;
258                                 regulator-boot-on;
259                                 regulator-name = "vcc3v3_s3";
260                                 regulator-state-mem {
261                                         regulator-on-in-suspend;
262                                 };
263                         };
264
265                         vcc3v3_s0: SWITCH_REG2 {
266                                 regulator-always-on;
267                                 regulator-boot-on;
268                                 regulator-name = "vcc3v3_s0";
269                                 regulator-state-mem {
270                                         regulator-on-in-suspend;
271                                 };
272                         };
273                 };
274         };
275 };
276
277 &cpu_l0 {
278         cpu-supply = <&vdd_cpu_l>;
279 };
280
281 &cpu_l1 {
282         cpu-supply = <&vdd_cpu_l>;
283 };
284
285 &cpu_l2 {
286         cpu-supply = <&vdd_cpu_l>;
287 };
288
289 &cpu_l3 {
290         cpu-supply = <&vdd_cpu_l>;
291 };
292
293 &cpu_b0 {
294         cpu-supply = <&vdd_cpu_b>;
295 };
296
297 &cpu_b1 {
298         cpu-supply = <&vdd_cpu_b>;
299 };
300
301 &gpu {
302         status = "okay";
303         mali-supply = <&vdd_gpu>;
304 };
305