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