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