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