arm64: dts: rockchip: split the backlight device node to Sapphire SoC board
[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-always-on;
130                                 regulator-boot-on;
131                         };
132                 };
133         };
134
135         rk808: pmic@1b {
136                 compatible = "rockchip,rk808";
137                 reg = <0x1b>;
138                 interrupt-parent = <&gpio1>;
139                 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
140                 pinctrl-names = "default";
141                 pinctrl-0 = <&pmic_int_l &pmic_dvs2>;
142                 rockchip,system-power-controller;
143                 wakeup-source;
144                 #clock-cells = <1>;
145                 clock-output-names = "xin32k", "rk808-clkout2";
146
147                 vcc1-supply = <&vcc3v3_sys>;
148                 vcc2-supply = <&vcc3v3_sys>;
149                 vcc3-supply = <&vcc3v3_sys>;
150                 vcc4-supply = <&vcc3v3_sys>;
151                 vcc6-supply = <&vcc3v3_sys>;
152                 vcc7-supply = <&vcc3v3_sys>;
153                 vcc8-supply = <&vcc3v3_sys>;
154                 vcc9-supply = <&vcc3v3_sys>;
155                 vcc10-supply = <&vcc3v3_sys>;
156                 vcc11-supply = <&vcc3v3_sys>;
157                 vcc12-supply = <&vcc3v3_sys>;
158                 vddio-supply = <&vcc1v8_pmu>;
159
160                 regulators {
161                         vdd_cpu_b: DCDC_REG1 {
162                                 regulator-always-on;
163                                 regulator-boot-on;
164                                 regulator-min-microvolt = <750000>;
165                                 regulator-max-microvolt = <1350000>;
166                                 regulator-name = "vdd_cpu_b";
167                                 regulator-state-mem {
168                                         regulator-off-in-suspend;
169                                 };
170                         };
171
172                         vdd_cpu_l: DCDC_REG2 {
173                                 regulator-always-on;
174                                 regulator-boot-on;
175                                 regulator-min-microvolt = <750000>;
176                                 regulator-max-microvolt = <1350000>;
177                                 regulator-name = "vdd_cpu_l";
178                                 regulator-state-mem {
179                                         regulator-off-in-suspend;
180                                 };
181                         };
182
183                         vcc_ddr: DCDC_REG3 {
184                                 regulator-always-on;
185                                 regulator-boot-on;
186                                 regulator-name = "vcc_ddr";
187                                 regulator-state-mem {
188                                         regulator-on-in-suspend;
189                                 };
190                         };
191
192                         vcc_1v8: DCDC_REG4 {
193                                 regulator-always-on;
194                                 regulator-boot-on;
195                                 regulator-min-microvolt = <1800000>;
196                                 regulator-max-microvolt = <1800000>;
197                                 regulator-name = "vcc_1v8";
198                                 regulator-state-mem {
199                                         regulator-on-in-suspend;
200                                         regulator-suspend-microvolt = <1800000>;
201                                 };
202                         };
203
204                         vcc1v8_dvp: LDO_REG1 {
205                                 regulator-always-on;
206                                 regulator-boot-on;
207                                 regulator-min-microvolt = <1800000>;
208                                 regulator-max-microvolt = <1800000>;
209                                 regulator-name = "vcc1v8_dvp";
210                                 regulator-state-mem {
211                                         regulator-on-in-suspend;
212                                         regulator-suspend-microvolt = <1800000>;
213                                 };
214                         };
215
216                         vcc3v0_tp: LDO_REG2 {
217                                 regulator-always-on;
218                                 regulator-boot-on;
219                                 regulator-min-microvolt = <3000000>;
220                                 regulator-max-microvolt = <3000000>;
221                                 regulator-name = "vcc3v0_tp";
222                                 regulator-state-mem {
223                                         regulator-off-in-suspend;
224                                 };
225                         };
226
227                         vcc1v8_pmu: LDO_REG3 {
228                                 regulator-always-on;
229                                 regulator-boot-on;
230                                 regulator-min-microvolt = <1800000>;
231                                 regulator-max-microvolt = <1800000>;
232                                 regulator-name = "vcc1v8_pmu";
233                                 regulator-state-mem {
234                                         regulator-on-in-suspend;
235                                         regulator-suspend-microvolt = <1800000>;
236                                 };
237                         };
238
239                         vcc_sd: LDO_REG4 {
240                                 regulator-always-on;
241                                 regulator-boot-on;
242                                 regulator-min-microvolt = <1800000>;
243                                 regulator-max-microvolt = <3300000>;
244                                 regulator-name = "vcc_sd";
245                                 regulator-state-mem {
246                                         regulator-on-in-suspend;
247                                         regulator-suspend-microvolt = <3300000>;
248                                 };
249                         };
250
251                         vcca3v0_codec: LDO_REG5 {
252                                 regulator-always-on;
253                                 regulator-boot-on;
254                                 regulator-min-microvolt = <3000000>;
255                                 regulator-max-microvolt = <3000000>;
256                                 regulator-name = "vcca3v0_codec";
257                                 regulator-state-mem {
258                                         regulator-on-in-suspend;
259                                         regulator-suspend-microvolt = <3000000>;
260                                 };
261                         };
262
263                         vcc_1v5: LDO_REG6 {
264                                 regulator-always-on;
265                                 regulator-boot-on;
266                                 regulator-min-microvolt = <1500000>;
267                                 regulator-max-microvolt = <1500000>;
268                                 regulator-name = "vcc_1v5";
269                                 regulator-state-mem {
270                                         regulator-on-in-suspend;
271                                         regulator-suspend-microvolt = <1500000>;
272                                 };
273                         };
274
275                         vcca1v8_codec: LDO_REG7 {
276                                 regulator-always-on;
277                                 regulator-boot-on;
278                                 regulator-min-microvolt = <1800000>;
279                                 regulator-max-microvolt = <1800000>;
280                                 regulator-name = "vcca1v8_codec";
281                                 regulator-state-mem {
282                                         regulator-on-in-suspend;
283                                         regulator-suspend-microvolt = <1800000>;
284                                 };
285                         };
286
287                         vcc_3v0: LDO_REG8 {
288                                 regulator-always-on;
289                                 regulator-boot-on;
290                                 regulator-min-microvolt = <3000000>;
291                                 regulator-max-microvolt = <3000000>;
292                                 regulator-name = "vcc_3v0";
293                                 regulator-state-mem {
294                                         regulator-on-in-suspend;
295                                         regulator-suspend-microvolt = <3000000>;
296                                 };
297                         };
298
299                         vcc3v3_s3: SWITCH_REG1 {
300                                 regulator-always-on;
301                                 regulator-boot-on;
302                                 regulator-name = "vcc3v3_s3";
303                                 regulator-state-mem {
304                                         regulator-on-in-suspend;
305                                 };
306                         };
307
308                         vcc3v3_s0: SWITCH_REG2 {
309                                 regulator-always-on;
310                                 regulator-boot-on;
311                                 regulator-name = "vcc3v3_s0";
312                                 regulator-state-mem {
313                                         regulator-on-in-suspend;
314                                 };
315                         };
316                 };
317         };
318 };
319
320 &i2c4 {
321         fusb1: fusb30x@22 {
322                 compatible = "fairchild,fusb302";
323                 reg = <0x22>;
324                 pinctrl-names = "default";
325                 pinctrl-0 = <&fusb1_int>;
326                 vbus-5v-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
327                 int-n-gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
328         };
329 };
330
331 &pwm2 {
332         status = "okay";
333 };
334
335 &pwm3 {
336         status = "okay";
337 };
338
339 &u2phy0_otg {
340         rockchip,utmi-avalid;
341 };