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