arm: dts: rk3288-evb: support board with rk818
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3288-evb-rk818.dts
1 /*
2  * Copyright (c) 2017 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 /dts-v1/;
44 #include "rk3288-evb.dtsi"
45 #include "rk3288-android.dtsi"
46
47 / {
48         compatible = "rockchip,rk3288-evb-rk818", "rockchip,rk3288";
49
50         sdio_pwrseq: sdio-pwrseq {
51                 compatible = "mmc-pwrseq-simple";
52                 clocks = <&rk818 1>;
53                 clock-names = "ext_clock";
54
55                 /*
56                  * On the module itself this is one of these (depending
57                  * on the actual card populated):
58                  * - SDIO_RESET_L_WL_REG_ON
59                  * - PDN (power down when low)
60                  */
61                 reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
62         };
63
64         /delete-node/ sdmmc-regulator;
65
66         vcc_lcd: vcc-lcd {
67                 compatible = "regulator-fixed";
68                 enable-active-high;
69                 gpio = <&gpio7 3 GPIO_ACTIVE_HIGH>;
70                 pinctrl-names = "default";
71                 pinctrl-0 = <&lcd_en>;
72                 regulator-name = "vcc_lcd";
73                 vin-supply = <&vcc_io>;
74         };
75 };
76
77 &cpu0 {
78         cpu0-supply = <&vdd_cpu>;
79 };
80
81 &gpu {
82         status = "okay";
83         mali-supply = <&vdd_gpu>;
84 };
85
86 &i2c0 {
87         clock-frequency = <400000>;
88
89         vdd_cpu: syr827@40 {
90                 compatible = "silergy,syr827";
91                 reg = <0x40>;
92                 vin-supply = <&vcc_sys>;
93                 regulator-compatible = "fan53555-reg";
94                 pinctrl-0 = <&vsel1_gpio>;
95                 vsel-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
96                 regulator-name = "vdd_cpu";
97                 regulator-min-microvolt = <712500>;
98                 regulator-max-microvolt = <1500000>;
99                 regulator-ramp-delay = <1000>;
100                 fcs,suspend-voltage-selector = <1>;
101                 regulator-always-on;
102                 regulator-boot-on;
103                 regulator-initial-state = <3>;
104                 regulator-state-mem {
105                         regulator-off-in-suspend;
106                 };
107         };
108
109         rk818: pmic@1c {
110                 compatible = "rockchip,rk818";
111                 reg = <0x1c>;
112                 status = "okay";
113
114                 clock-output-names = "rk808-clkout1", "wifibt_32kin";
115                 interrupt-parent = <&gpio0>;
116                 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
117                 pinctrl-names = "default";
118                 pinctrl-0 = <&pmic_int>;
119                 rockchip,system-power-controller;
120                 wakeup-source;
121                 #clock-cells = <1>;
122
123                 vcc1-supply = <&vcc_sys>;
124                 vcc2-supply = <&vcc_sys>;
125                 vcc3-supply = <&vcc_sys>;
126                 vcc4-supply = <&vcc_sys>;
127                 vcc6-supply = <&vcc_sys>;
128                 vcc7-supply = <&vcc_sys>;
129                 vcc8-supply = <&vcc_sys>;
130                 vcc9-supply = <&vcc_io>;
131
132                 regulators {
133                         vdd_logic: DCDC_REG1 {
134                                 regulator-name = "vdd_logic";
135                                 regulator-always-on;
136                                 regulator-boot-on;
137                                 regulator-min-microvolt = <800000>;
138                                 regulator-max-microvolt = <1250000>;
139                                 regulator-ramp-delay = <6001>;
140                                 regulator-state-mem {
141                                         regulator-on-in-suspend;
142                                         regulator-suspend-microvolt = <1000000>;
143                                 };
144                         };
145
146                         vdd_gpu: DCDC_REG2 {
147                                 regulator-name = "vdd_gpu";
148                                 regulator-always-on;
149                                 regulator-boot-on;
150                                 regulator-min-microvolt = <800000>;
151                                 regulator-max-microvolt = <1250000>;
152                                 regulator-ramp-delay = <6001>;
153                                 regulator-state-mem {
154                                         regulator-on-in-suspend;
155                                         regulator-suspend-microvolt = <1000000>;
156                                 };
157                         };
158
159                         vcc_ddr: DCDC_REG3 {
160                                 regulator-always-on;
161                                 regulator-boot-on;
162                                 regulator-name = "vcc_ddr";
163                                 regulator-state-mem {
164                                         regulator-on-in-suspend;
165                                 };
166                         };
167
168                         vcc_io: DCDC_REG4 {
169                                 regulator-always-on;
170                                 regulator-boot-on;
171                                 regulator-min-microvolt = <3300000>;
172                                 regulator-max-microvolt = <3300000>;
173                                 regulator-name = "vcc_io";
174                                 regulator-state-mem {
175                                         regulator-off-in-suspend;
176                                 };
177                         };
178
179                         vcca_codec: LDO_REG1 {
180                                 regulator-always-on;
181                                 regulator-boot-on;
182                                 regulator-min-microvolt = <3300000>;
183                                 regulator-max-microvolt = <3300000>;
184                                 regulator-name = "vcca_codec";
185                                 regulator-state-mem {
186                                         regulator-off-in-suspend;
187                                 };
188                         };
189
190                         vcc_tp: LDO_REG2 {
191                                 regulator-always-on;
192                                 regulator-boot-on;
193                                 regulator-min-microvolt = <3300000>;
194                                 regulator-max-microvolt = <3300000>;
195                                 regulator-name = "vcc_tp";
196                                 regulator-state-mem {
197                                         regulator-off-in-suspend;
198                                 };
199                         };
200
201                         vdd_10: LDO_REG3 {
202                                 regulator-always-on;
203                                 regulator-boot-on;
204                                 regulator-min-microvolt = <1000000>;
205                                 regulator-max-microvolt = <1000000>;
206                                 regulator-name = "vdd_10";
207                                 regulator-state-mem {
208                                         regulator-on-in-suspend;
209                                         regulator-suspend-microvolt = <1000000>;
210                                 };
211                         };
212
213                         vcc18_lcd: LDO_REG4 {
214                                 regulator-always-on;
215                                 regulator-boot-on;
216                                 regulator-min-microvolt = <1800000>;
217                                 regulator-max-microvolt = <1800000>;
218                                 regulator-name = "vcc18_lcd";
219                                 regulator-state-mem {
220                                         regulator-off-in-suspend;
221                                 };
222                         };
223
224                         vccio_pmu: LDO_REG5 {
225                                 regulator-always-on;
226                                 regulator-boot-on;
227                                 regulator-min-microvolt = <3300000>;
228                                 regulator-max-microvolt = <3300000>;
229                                 regulator-name = "vccio_pmu";
230                                 regulator-state-mem {
231                                         regulator-on-in-suspend;
232                                         regulator-suspend-microvolt = <3300000>;
233                                 };
234                         };
235
236                         vdd10_lcd: LDO_REG6 {
237                                 regulator-always-on;
238                                 regulator-boot-on;
239                                 regulator-min-microvolt = <1000000>;
240                                 regulator-max-microvolt = <1000000>;
241                                 regulator-name = "vdd10_lcd";
242                                 regulator-state-mem {
243                                         regulator-off-in-suspend;
244                                 };
245                         };
246
247                         vcc_18: LDO_REG7 {
248                                 regulator-always-on;
249                                 regulator-boot-on;
250                                 regulator-min-microvolt = <1800000>;
251                                 regulator-max-microvolt = <1800000>;
252                                 regulator-name = "vcc_18";
253                                 regulator-state-mem {
254                                         regulator-on-in-suspend;
255                                         regulator-suspend-microvolt = <1800000>;
256                                 };
257                         };
258
259                         vccio_wl: LDO_REG8 {
260                                 regulator-always-on;
261                                 regulator-boot-on;
262                                 regulator-min-microvolt = <1800000>;
263                                 regulator-max-microvolt = <3300000>;
264                                 regulator-name = "vccio_wl";
265                                 regulator-state-mem {
266                                         regulator-on-in-suspend;
267                                         regulator-suspend-microvolt = <3300000>;
268                                 };
269                         };
270
271                         vccio_sd: LDO_REG9 {
272                                 regulator-always-on;
273                                 regulator-boot-on;
274                                 regulator-min-microvolt = <1800000>;
275                                 regulator-max-microvolt = <3300000>;
276                                 regulator-name = "vccio_sd";
277                                 regulator-state-mem {
278                                         regulator-on-in-suspend;
279                                         regulator-suspend-microvolt = <3300000>;
280                                 };
281                         };
282
283                         vcc_sd: SWITCH_REG {
284                                 regulator-always-on;
285                                 regulator-boot-on;
286                                 regulator-name = "vcc_sd";
287                                 regulator-state-mem {
288                                         regulator-on-in-suspend;
289                                 };
290                         };
291                 };
292         };
293 };
294
295 &i2c1 {
296         status = "okay";
297         clock-frequency = <400000>;
298
299         mpu6050@68 {
300                 compatible = "invensense,mpu6050";
301                 status = "okay";
302                 pinctrl-names = "default";
303                 pinctrl-0 = <&mpu6050_irq_gpio>;
304                 reg = <0x68>;
305                 irq-gpio = <&gpio8 0 IRQ_TYPE_EDGE_RISING>;
306                 mpu-int_config = <0x10>;
307                 mpu-level_shifter = <0>;
308                 mpu-orientation = <0 1 0 1 0 0 0 0 1>;
309                 orientation-x= <0>;
310                 orientation-y= <1>;
311                 orientation-z= <0>;
312                 support-hw-poweroff = <1>;
313                 mpu-debug = <1>;
314         };
315 };
316
317 &lvds_panel {
318         power-supply = <&vcc_lcd>;
319 };
320
321 &panel {
322         power-supply = <&vcc_lcd>;
323 };
324
325 &pinctrl {
326         lcd {
327                 lcd_en: lcd-en  {
328                         rockchip,pins = <7 3 RK_FUNC_GPIO &pcfg_pull_none>;
329                 };
330         };
331
332         mpu6050 {
333                 mpu6050_irq_gpio: mpu6050-irq-gpio {
334                         rockchip,pins = <8 0 RK_FUNC_GPIO &pcfg_pull_none>;
335                 };
336         };
337
338         pmic {
339                 pmic_int: pmic-int {
340                         rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
341                 };
342                 vsel1_gpio: vsel1-gpio {
343                         rockchip,pins = <RK_GPIO0 0 RK_FUNC_GPIO &pcfg_pull_down>;
344                 };
345         };
346 };