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