ARM64: dts: rk3399: add regulator-ramp-delay for dcdc
[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                 rockchip,pwm_id = <2>;
51                 rockchip,pwm_voltage = <900000>;
52                 pwms = <&pwm2 0 25000 0>;
53                 regulator-name = "vdd_log";
54                 regulator-min-microvolt = <800000>;
55                 regulator-max-microvolt = <1400000>;
56                 regulator-always-on;
57                 regulator-boot-on;
58         };
59
60         vdd_center: vdd-center {
61                 compatible = "pwm-regulator";
62                 rockchip,pwm_id = <3>;
63                 rockchip,pwm_voltage = <900000>;
64                 pwms = <&pwm3 0 25000 0>;
65                 regulator-name = "vdd_center";
66                 regulator-min-microvolt = <800000>;
67                 regulator-max-microvolt = <1400000>;
68                 regulator-always-on;
69                 regulator-boot-on;
70         };
71 };
72
73 &cpu_l0 {
74         dynamic-power-coefficient = <121>;
75 };
76
77 &cpu_b0 {
78         dynamic-power-coefficient = <1068>;
79 };
80
81 &soc_thermal {
82         sustainable-power = <1600>; /* milliwatts */
83
84         cooling-maps {
85                 map0 {
86                         trip = <&target>;
87                         cooling-device =
88                                 <&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
89                         contribution = <10240>;
90                 };
91                 map1 {
92                         trip = <&target>;
93                         cooling-device =
94                                 <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
95                         contribution = <1024>;
96                 };
97                 map2 {
98                         trip = <&target>;
99                         cooling-device =
100                                 <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
101                         contribution = <10240>;
102                 };
103         };
104 };
105
106 &gpu_power_model {
107         dynamic-power = <1780>;
108 };
109
110 &i2c0 {
111         fusb0: fusb30x@22 {
112                 compatible = "fairchild,fusb302";
113                 reg = <0x22>;
114                 pinctrl-names = "default";
115                 pinctrl-0 = <&fusb0_int>;
116                 vbus-5v-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
117                 int-n-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
118                 status = "okay";
119         };
120
121         mp8865: mp8865@68 {
122                 compatible = "mps,mp8865";
123                 reg = <0x68>;
124                 regulators {
125                         vdd_gpu: mp8865_dcdc1 {
126                                 regulator-name = "vdd_gpu";
127                                 regulator-min-microvolt = <712500>;
128                                 regulator-max-microvolt = <1500000>;
129                                 regulator-ramp-delay = <8000>;
130                                 regulator-always-on;
131                                 regulator-boot-on;
132                         };
133                 };
134         };
135
136         rk808: pmic@1b {
137                 compatible = "rockchip,rk808";
138                 reg = <0x1b>;
139                 interrupt-parent = <&gpio1>;
140                 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
141                 pinctrl-names = "default";
142                 pinctrl-0 = <&pmic_int_l &pmic_dvs2>;
143                 rockchip,system-power-controller;
144                 wakeup-source;
145                 #clock-cells = <1>;
146                 clock-output-names = "xin32k", "rk808-clkout2";
147
148                 vcc1-supply = <&vcc3v3_sys>;
149                 vcc2-supply = <&vcc3v3_sys>;
150                 vcc3-supply = <&vcc3v3_sys>;
151                 vcc4-supply = <&vcc3v3_sys>;
152                 vcc6-supply = <&vcc3v3_sys>;
153                 vcc7-supply = <&vcc3v3_sys>;
154                 vcc8-supply = <&vcc3v3_sys>;
155                 vcc9-supply = <&vcc3v3_sys>;
156                 vcc10-supply = <&vcc3v3_sys>;
157                 vcc11-supply = <&vcc3v3_sys>;
158                 vcc12-supply = <&vcc3v3_sys>;
159                 vddio-supply = <&vcc1v8_pmu>;
160
161                 regulators {
162                         vdd_cpu_b: DCDC_REG1 {
163                                 regulator-always-on;
164                                 regulator-boot-on;
165                                 regulator-min-microvolt = <750000>;
166                                 regulator-max-microvolt = <1350000>;
167                                 regulator-ramp-delay = <6001>;
168                                 regulator-name = "vdd_cpu_b";
169                                 regulator-state-mem {
170                                         regulator-off-in-suspend;
171                                 };
172                         };
173
174                         vdd_cpu_l: DCDC_REG2 {
175                                 regulator-always-on;
176                                 regulator-boot-on;
177                                 regulator-min-microvolt = <750000>;
178                                 regulator-max-microvolt = <1350000>;
179                                 regulator-ramp-delay = <6001>;
180                                 regulator-name = "vdd_cpu_l";
181                                 regulator-state-mem {
182                                         regulator-off-in-suspend;
183                                 };
184                         };
185
186                         vcc_ddr: DCDC_REG3 {
187                                 regulator-always-on;
188                                 regulator-boot-on;
189                                 regulator-name = "vcc_ddr";
190                                 regulator-state-mem {
191                                         regulator-on-in-suspend;
192                                 };
193                         };
194
195                         vcc_1v8: DCDC_REG4 {
196                                 regulator-always-on;
197                                 regulator-boot-on;
198                                 regulator-min-microvolt = <1800000>;
199                                 regulator-max-microvolt = <1800000>;
200                                 regulator-name = "vcc_1v8";
201                                 regulator-state-mem {
202                                         regulator-on-in-suspend;
203                                         regulator-suspend-microvolt = <1800000>;
204                                 };
205                         };
206
207                         vcc1v8_dvp: LDO_REG1 {
208                                 regulator-always-on;
209                                 regulator-boot-on;
210                                 regulator-min-microvolt = <1800000>;
211                                 regulator-max-microvolt = <1800000>;
212                                 regulator-name = "vcc1v8_dvp";
213                                 regulator-state-mem {
214                                         regulator-on-in-suspend;
215                                         regulator-suspend-microvolt = <1800000>;
216                                 };
217                         };
218
219                         vcc3v0_tp: LDO_REG2 {
220                                 regulator-always-on;
221                                 regulator-boot-on;
222                                 regulator-min-microvolt = <3000000>;
223                                 regulator-max-microvolt = <3000000>;
224                                 regulator-name = "vcc3v0_tp";
225                                 regulator-state-mem {
226                                         regulator-off-in-suspend;
227                                 };
228                         };
229
230                         vcc1v8_pmu: LDO_REG3 {
231                                 regulator-always-on;
232                                 regulator-boot-on;
233                                 regulator-min-microvolt = <1800000>;
234                                 regulator-max-microvolt = <1800000>;
235                                 regulator-name = "vcc1v8_pmu";
236                                 regulator-state-mem {
237                                         regulator-on-in-suspend;
238                                         regulator-suspend-microvolt = <1800000>;
239                                 };
240                         };
241
242                         vcc_sd: LDO_REG4 {
243                                 regulator-always-on;
244                                 regulator-boot-on;
245                                 regulator-min-microvolt = <1800000>;
246                                 regulator-max-microvolt = <3300000>;
247                                 regulator-name = "vcc_sd";
248                                 regulator-state-mem {
249                                         regulator-on-in-suspend;
250                                         regulator-suspend-microvolt = <3300000>;
251                                 };
252                         };
253
254                         vcca3v0_codec: LDO_REG5 {
255                                 regulator-always-on;
256                                 regulator-boot-on;
257                                 regulator-min-microvolt = <3000000>;
258                                 regulator-max-microvolt = <3000000>;
259                                 regulator-name = "vcca3v0_codec";
260                                 regulator-state-mem {
261                                         regulator-on-in-suspend;
262                                         regulator-suspend-microvolt = <3000000>;
263                                 };
264                         };
265
266                         vcc_1v5: LDO_REG6 {
267                                 regulator-always-on;
268                                 regulator-boot-on;
269                                 regulator-min-microvolt = <1500000>;
270                                 regulator-max-microvolt = <1500000>;
271                                 regulator-name = "vcc_1v5";
272                                 regulator-state-mem {
273                                         regulator-on-in-suspend;
274                                         regulator-suspend-microvolt = <1500000>;
275                                 };
276                         };
277
278                         vcca1v8_codec: LDO_REG7 {
279                                 regulator-always-on;
280                                 regulator-boot-on;
281                                 regulator-min-microvolt = <1800000>;
282                                 regulator-max-microvolt = <1800000>;
283                                 regulator-name = "vcca1v8_codec";
284                                 regulator-state-mem {
285                                         regulator-on-in-suspend;
286                                         regulator-suspend-microvolt = <1800000>;
287                                 };
288                         };
289
290                         vcc_3v0: LDO_REG8 {
291                                 regulator-always-on;
292                                 regulator-boot-on;
293                                 regulator-min-microvolt = <3000000>;
294                                 regulator-max-microvolt = <3000000>;
295                                 regulator-name = "vcc_3v0";
296                                 regulator-state-mem {
297                                         regulator-on-in-suspend;
298                                         regulator-suspend-microvolt = <3000000>;
299                                 };
300                         };
301
302                         vcc3v3_s3: SWITCH_REG1 {
303                                 regulator-always-on;
304                                 regulator-boot-on;
305                                 regulator-name = "vcc3v3_s3";
306                                 regulator-state-mem {
307                                         regulator-on-in-suspend;
308                                 };
309                         };
310
311                         vcc3v3_s0: SWITCH_REG2 {
312                                 regulator-always-on;
313                                 regulator-boot-on;
314                                 regulator-name = "vcc3v3_s0";
315                                 regulator-state-mem {
316                                         regulator-on-in-suspend;
317                                 };
318                         };
319                 };
320         };
321 };
322
323 &i2c4 {
324         fusb1: fusb30x@22 {
325                 compatible = "fairchild,fusb302";
326                 reg = <0x22>;
327                 pinctrl-names = "default";
328                 pinctrl-0 = <&fusb1_int>;
329                 vbus-5v-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
330                 int-n-gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
331         };
332 };
333
334 &pwm2 {
335         status = "okay";
336 };
337
338 &pwm3 {
339         status = "okay";
340 };
341
342 &u2phy0_otg {
343         rockchip,utmi-avalid;
344 };