d00d8ff37ac0d4da3e8121dd7605b082667b9371
[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-on-in-suspend;
126                                         regulator-suspend-microvolt = <900000>;
127                                 };
128                         };
129
130                         vdd_cpu_l: DCDC_REG2 {
131                                 regulator-always-on;
132                                 regulator-boot-on;
133                                 regulator-min-microvolt = <750000>;
134                                 regulator-max-microvolt = <1350000>;
135                                 regulator-name = "vdd_cpu_l";
136                                 regulator-state-mem {
137                                         regulator-off-in-suspend;
138                                 };
139                         };
140
141                         vcc_ddr: DCDC_REG3 {
142                                 regulator-always-on;
143                                 regulator-boot-on;
144                                 regulator-name = "vcc_ddr";
145                                 regulator-state-mem {
146                                         regulator-on-in-suspend;
147                                 };
148                         };
149
150                         vcc_1v8: DCDC_REG4 {
151                                 regulator-always-on;
152                                 regulator-boot-on;
153                                 regulator-min-microvolt = <1800000>;
154                                 regulator-max-microvolt = <1800000>;
155                                 regulator-name = "vcc_1v8";
156                                 regulator-state-mem {
157                                         regulator-on-in-suspend;
158                                         regulator-suspend-microvolt = <1800000>;
159                                 };
160                         };
161
162                         vcc1v8_dvp: LDO_REG1 {
163                                 regulator-always-on;
164                                 regulator-boot-on;
165                                 regulator-min-microvolt = <1800000>;
166                                 regulator-max-microvolt = <1800000>;
167                                 regulator-name = "vcc1v8_dvp";
168                                 regulator-state-mem {
169                                         regulator-off-in-suspend;
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-off-in-suspend;
216                                 };
217                         };
218
219                         vcc_1v5: LDO_REG6 {
220                                 regulator-always-on;
221                                 regulator-boot-on;
222                                 regulator-min-microvolt = <1500000>;
223                                 regulator-max-microvolt = <1500000>;
224                                 regulator-name = "vcc_1v5";
225                                 regulator-state-mem {
226                                         regulator-on-in-suspend;
227                                         regulator-suspend-microvolt = <1500000>;
228                                 };
229                         };
230
231                         vcca1v8_codec: LDO_REG7 {
232                                 regulator-always-on;
233                                 regulator-boot-on;
234                                 regulator-min-microvolt = <1800000>;
235                                 regulator-max-microvolt = <1800000>;
236                                 regulator-name = "vcca1v8_codec";
237                                 regulator-state-mem {
238                                         regulator-off-in-suspend;
239                                 };
240                         };
241
242                         vcc_3v0: LDO_REG8 {
243                                 regulator-always-on;
244                                 regulator-boot-on;
245                                 regulator-min-microvolt = <3000000>;
246                                 regulator-max-microvolt = <3000000>;
247                                 regulator-name = "vcc_3v0";
248                                 regulator-state-mem {
249                                         regulator-on-in-suspend;
250                                         regulator-suspend-microvolt = <3000000>;
251                                 };
252                         };
253
254                         vcc3v3_s3: SWITCH_REG1 {
255                                 regulator-always-on;
256                                 regulator-boot-on;
257                                 regulator-name = "vcc3v3_s3";
258                                 regulator-state-mem {
259                                         regulator-off-in-suspend;
260                                 };
261                         };
262
263                         vcc3v3_s0: SWITCH_REG2 {
264                                 regulator-always-on;
265                                 regulator-boot-on;
266                                 regulator-name = "vcc3v3_s0";
267                                 regulator-state-mem {
268                                         regulator-off-in-suspend;
269                                 };
270                         };
271                 };
272         };
273 };
274
275 &cpu_l0 {
276         cpu-supply = <&vdd_cpu_l>;
277 };
278
279 &cpu_l1 {
280         cpu-supply = <&vdd_cpu_l>;
281 };
282
283 &cpu_l2 {
284         cpu-supply = <&vdd_cpu_l>;
285 };
286
287 &cpu_l3 {
288         cpu-supply = <&vdd_cpu_l>;
289 };
290
291 &cpu_b0 {
292         cpu-supply = <&vdd_cpu_b>;
293 };
294
295 &cpu_b1 {
296         cpu-supply = <&vdd_cpu_b>;
297 };
298
299 &gpu {
300         status = "okay";
301         mali-supply = <&vdd_gpu>;
302 };
303