Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux...
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3288-popmetal.dts
1 /*
2  * Copyright (c) 2014, 2015 Andy Yan <andy.yan@rock-chips.com>
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
45 #include "rk3288.dtsi"
46
47 / {
48         model = "PopMetal-RK3288";
49         compatible = "chipspark,popmetal-rk3288", "rockchip,rk3288";
50
51         memory{
52                 device_type = "memory";
53                 reg = <0 0x80000000>;
54         };
55
56         ext_gmac: external-gmac-clock {
57                 compatible = "fixed-clock";
58                 clock-frequency = <125000000>;
59                 clock-output-names = "ext_gmac";
60                 #clock-cells = <0>;
61         };
62
63         gpio-keys {
64                 compatible = "gpio-keys";
65                 #address-cells = <1>;
66                 #size-cells = <0>;
67                 autorepeat;
68
69                 pinctrl-names = "default";
70                 pinctrl-0 = <&pwrbtn>;
71
72                 button@0 {
73                         gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
74                         linux,code = <116>;
75                         label = "GPIO Key Power";
76                         linux,input-type = <1>;
77                         gpio-key,wakeup = <1>;
78                         debounce-interval = <100>;
79                 };
80         };
81
82         ir: ir-receiver {
83                 compatible = "gpio-ir-receiver";
84                 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
85                 pinctrl-names = "default";
86                 pinctrl-0 = <&ir_int>;
87         };
88
89         vcc_flash: flash-regulator {
90                 compatible = "regulator-fixed";
91                 regulator-name = "vcc_flash";
92                 regulator-min-microvolt = <1800000>;
93                 regulator-max-microvolt = <1800000>;
94                 vin-supply = <&vcc_io>;
95         };
96
97         vcc_sd: sdmmc-regulator {
98                 compatible = "regulator-fixed";
99                 gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
100                 pinctrl-names = "default";
101                 pinctrl-0 = <&sdmmc_pwr>;
102                 regulator-name = "vcc_sd";
103                 regulator-min-microvolt = <3300000>;
104                 regulator-max-microvolt = <3300000>;
105                 startup-delay-us = <100000>;
106                 vin-supply = <&vcc_io>;
107         };
108
109         vcc_sys: vsys-regulator {
110                 compatible = "regulator-fixed";
111                 regulator-name = "vcc_sys";
112                 regulator-min-microvolt = <5000000>;
113                 regulator-max-microvolt = <5000000>;
114                 regulator-always-on;
115                 regulator-boot-on;
116         };
117
118         /*
119          * A PT5128 creates both dovdd_1v8 and vcc28_dvp, controlled
120          * by the dvp_pwr pin.
121          */
122         vcc18_dvp: vcc18-dvp-regulator {
123                 compatible = "regulator-fixed";
124                 regulator-name = "vcc18-dvp";
125                 regulator-min-microvolt = <1800000>;
126                 regulator-max-microvolt = <1800000>;
127                 vin-supply = <&vcc28_dvp>;
128         };
129
130         vcc28_dvp: vcc28-dvp-regulator {
131                 compatible = "regulator-fixed";
132                 enable-active-high;
133                 gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
134                 pinctrl-names = "default";
135                 pinctrl-0 = <&dvp_pwr>;
136                 regulator-name = "vcc28_dvp";
137                 regulator-min-microvolt = <2800000>;
138                 regulator-max-microvolt = <2800000>;
139                 regulator-always-on;
140                 vin-supply = <&vcc_io>;
141         };
142 };
143
144 &cpu0 {
145         cpu0-supply = <&vdd_cpu>;
146 };
147
148 &emmc {
149         bus-width = <8>;
150         cap-mmc-highspeed;
151         disable-wp;
152         non-removable;
153         num-slots = <1>;
154         pinctrl-names = "default";
155         pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
156         vmmc-supply = <&vcc_io>;
157         vqmmc-supply = <&vcc_flash>;
158         status = "okay";
159 };
160
161 &sdmmc {
162         bus-width = <4>;
163         cap-mmc-highspeed;
164         cap-sd-highspeed;
165         card-detect-delay = <200>;
166         disable-wp;                     /* wp not hooked up */
167         num-slots = <1>;
168         pinctrl-names = "default";
169         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
170         vmmc-supply = <&vcc_sd>;
171         vqmmc-supply = <&vccio_sd>;
172         status = "okay";
173 };
174
175 &gmac {
176         phy-supply = <&vcc_lan>;
177         phy-mode = "rgmii";
178         clock_in_out = "input";
179         snps,reset-gpio = <&gpio4 7 0>;
180         snps,reset-active-low;
181         snps,reset-delays-us = <0 10000 1000000>;
182         assigned-clocks = <&cru SCLK_MAC>;
183         assigned-clock-parents = <&ext_gmac>;
184         pinctrl-names = "default";
185         pinctrl-0 = <&rgmii_pins>;
186         tx_delay = <0x30>;
187         rx_delay = <0x10>;
188         status = "ok";
189 };
190
191 &hdmi {
192         ddc-i2c-bus = <&i2c5>;
193         status = "okay";
194 };
195
196 &hevc_service {
197         status = "okay";
198 };
199
200 &i2c0 {
201         status = "okay";
202         clock-frequency = <400000>;
203
204         rk808: pmic@1b {
205                 compatible = "rockchip,rk808";
206                 reg = <0x1b>;
207                 interrupt-parent = <&gpio0>;
208                 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
209                 pinctrl-names = "default";
210                 pinctrl-0 = <&pmic_int &global_pwroff>;
211                 rockchip,system-power-controller;
212                 wakeup-source;
213                 #clock-cells = <1>;
214                 clock-output-names = "xin32k", "rk808-clkout2";
215
216                 vcc1-supply = <&vcc_sys>;
217                 vcc2-supply = <&vcc_sys>;
218                 vcc3-supply = <&vcc_sys>;
219                 vcc4-supply = <&vcc_sys>;
220                 vcc6-supply = <&vcc_sys>;
221                 vcc7-supply = <&vcc_sys>;
222                 vcc8-supply = <&vcc_18>;
223                 vcc9-supply = <&vcc_io>;
224                 vcc10-supply = <&vcc_io>;
225                 vcc11-supply = <&vcc_sys>;
226                 vcc12-supply = <&vcc_io>;
227                 vddio-supply = <&vcc_io>;
228
229                 regulators {
230                         vdd_cpu: DCDC_REG1 {
231                                 regulator-always-on;
232                                 regulator-boot-on;
233                                 regulator-min-microvolt = <750000>;
234                                 regulator-max-microvolt = <1350000>;
235                                 regulator-name = "vdd_arm";
236                                 regulator-state-mem {
237                                         regulator-off-in-suspend;
238                                 };
239                         };
240
241                         vdd_gpu: DCDC_REG2 {
242                                 regulator-always-on;
243                                 regulator-boot-on;
244                                 regulator-min-microvolt = <850000>;
245                                 regulator-max-microvolt = <1250000>;
246                                 regulator-name = "vdd_gpu";
247                                 regulator-ramp-delay = <6000>;
248                                 regulator-state-mem {
249                                         regulator-on-in-suspend;
250                                         regulator-suspend-microvolt = <1000000>;
251                                 };
252                         };
253
254                         vcc_ddr: DCDC_REG3 {
255                                 regulator-always-on;
256                                 regulator-boot-on;
257                                 regulator-name = "vcc_ddr";
258                                 regulator-state-mem {
259                                         regulator-on-in-suspend;
260                                 };
261                         };
262
263                         vcc_io: DCDC_REG4 {
264                                 regulator-always-on;
265                                 regulator-boot-on;
266                                 regulator-min-microvolt = <3300000>;
267                                 regulator-max-microvolt = <3300000>;
268                                 regulator-name = "vcc_io";
269                                 regulator-state-mem {
270                                         regulator-on-in-suspend;
271                                         regulator-suspend-microvolt = <3300000>;
272                                 };
273                         };
274
275                         vcc_lan: LDO_REG1 {
276                                 regulator-always-on;
277                                 regulator-boot-on;
278                                 regulator-min-microvolt = <3300000>;
279                                 regulator-max-microvolt = <3300000>;
280                                 regulator-name = "vcc_lan";
281                                 regulator-state-mem {
282                                         regulator-on-in-suspend;
283                                         regulator-suspend-microvolt = <3300000>;
284                                 };
285                         };
286
287                         vccio_sd: LDO_REG2 {
288                                 regulator-always-on;
289                                 regulator-boot-on;
290                                 regulator-min-microvolt = <3300000>;
291                                 regulator-max-microvolt = <3300000>;
292                                 regulator-name = "vccio_sd";
293                                 regulator-state-mem {
294                                         regulator-off-in-suspend;
295                                 };
296                         };
297
298                         vdd_10: LDO_REG3 {
299                                 regulator-always-on;
300                                 regulator-boot-on;
301                                 regulator-min-microvolt = <1000000>;
302                                 regulator-max-microvolt = <1000000>;
303                                 regulator-name = "vdd_10";
304                                 regulator-state-mem {
305                                         regulator-on-in-suspend;
306                                         regulator-suspend-microvolt = <1000000>;
307                                 };
308                         };
309
310                         vcc18_lcd: LDO_REG4 {
311                                 regulator-always-on;
312                                 regulator-boot-on;
313                                 regulator-min-microvolt = <1800000>;
314                                 regulator-max-microvolt = <1800000>;
315                                 regulator-name = "vcc18_lcd";
316                                 regulator-state-mem {
317                                         regulator-on-in-suspend;
318                                         regulator-suspend-microvolt = <1800000>;
319                                 };
320                         };
321
322                         ldo5: LDO_REG5 {
323                                 regulator-always-on;
324                                 regulator-min-microvolt = <1800000>;
325                                 regulator-max-microvolt = <3300000>;
326                                 regulator-name = "ldo5";
327                         };
328
329                         vdd10_lcd: LDO_REG6 {
330                                 regulator-always-on;
331                                 regulator-boot-on;
332                                 regulator-min-microvolt = <1000000>;
333                                 regulator-max-microvolt = <1000000>;
334                                 regulator-name = "vdd10_lcd";
335                                 regulator-state-mem {
336                                         regulator-on-in-suspend;
337                                         regulator-suspend-microvolt = <1000000>;
338                                 };
339                         };
340
341                         vcc_18: LDO_REG7 {
342                                 regulator-always-on;
343                                 regulator-boot-on;
344                                 regulator-min-microvolt = <1800000>;
345                                 regulator-max-microvolt = <1800000>;
346                                 regulator-name = "vcc_18";
347                                 regulator-state-mem {
348                                         regulator-on-in-suspend;
349                                         regulator-suspend-microvolt = <1800000>;
350                                 };
351                         };
352
353                         vcca_33: LDO_REG8 {
354                                 regulator-always-on;
355                                 regulator-boot-on;
356                                 regulator-min-microvolt = <3300000>;
357                                 regulator-max-microvolt = <3300000>;
358                                 regulator-name = "vcca_33";
359                                 regulator-state-mem {
360                                         regulator-on-in-suspend;
361                                         regulator-suspend-microvolt = <3300000>;
362                                 };
363                         };
364
365                         vccio_wl: SWITCH_REG1 {
366                                 regulator-always-on;
367                                 regulator-boot-on;
368                                 regulator-name = "vccio_wl";
369                                 regulator-state-mem {
370                                         regulator-on-in-suspend;
371                                 };
372                         };
373
374                         vcc_lcd: SWITCH_REG2 {
375                                 regulator-always-on;
376                                 regulator-boot-on;
377                                 regulator-name = "vcc_lcd";
378                                 regulator-state-mem {
379                                         regulator-on-in-suspend;
380                                 };
381                         };
382                 };
383         };
384 };
385
386 &i2c1 {
387         status = "okay";
388         clock-frequency = <400000>;
389
390         ak8963: ak8963@0d {
391                 compatible = "asahi-kasei,ak8975";
392                 reg = <0x0d>;
393                 interrupt-parent = <&gpio8>;
394                 interrupts = <1 IRQ_TYPE_EDGE_RISING>;
395                 pinctrl-names = "default";
396                 pinctrl-0 = <&comp_int>;
397         };
398
399         l3g4200d: l3g4200d@68 {
400                 compatible = "st,l3g4200d-gyro";
401                 st,drdy-int-pin = <2>;
402                 reg = <0x6b>;
403         };
404
405         mma8452: mma8452@1d {
406                 compatible = "fsl,mma8452";
407                 reg = <0x1d>;
408                 interrupt-parent = <&gpio8>;
409                 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
410                 pinctrl-names = "default";
411                 pinctrl-0 = <&gsensor_int>;
412         };
413 };
414
415 &i2c2 {
416         status = "okay";
417 };
418
419 &i2c3 {
420         status = "okay";
421 };
422
423 &i2c4 {
424         status = "okay";
425 };
426
427 &i2c5 {
428         status = "okay";
429 };
430
431 &io_domains {
432         status = "okay";
433
434         audio-supply = <&vcca_33>;
435         bb-supply = <&vcc_io>;
436         dvp-supply = <&vcc18_dvp>;
437         flash0-supply = <&vcc_flash>;
438         flash1-supply = <&vcc_lan>;
439         gpio30-supply = <&vcc_io>;
440         gpio1830-supply = <&vcc_io>;
441         lcdc-supply = <&vcc_io>;
442         sdcard-supply = <&vccio_sd>;
443         wifi-supply = <&vccio_wl>;
444 };
445
446 &rga {
447         status = "okay";
448 };
449
450 &pinctrl {
451         ak8963 {
452                 comp_int: comp-int {
453                         rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_up>;
454                 };
455         };
456
457         buttons {
458                 pwrbtn: pwrbtn {
459                         rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
460                 };
461         };
462
463         dvp {
464                 dvp_pwr: dvp-pwr {
465                         rockchip,pins = <0 17 RK_FUNC_GPIO &pcfg_pull_none>;
466                 };
467         };
468
469         ir {
470                 ir_int: ir-int {
471                         rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_up>;
472                 };
473         };
474
475         mma8452 {
476                 gsensor_int: gsensor-int {
477                         rockchip,pins = <8 0 RK_FUNC_GPIO &pcfg_pull_up>;
478                 };
479         };
480
481         pmic {
482                 pmic_int: pmic-int {
483                         rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
484                 };
485         };
486
487         sdmmc {
488                 sdmmc_pwr: sdmmc-pwr {
489                         rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
490                 };
491         };
492 };
493
494 &tsadc {
495         rockchip,hw-tshut-mode = <0>;
496         rockchip,hw-tshut-polarity = <0>;
497         status = "okay";
498 };
499
500 &vopb {
501         status = "okay";
502 };
503
504 &vopb_mmu {
505         status = "okay";
506 };
507
508 &vopl {
509         status = "okay";
510 };
511
512 &vopl_mmu {
513         status = "okay";
514 };
515
516 &vpu_service {
517         status = "okay";
518 };
519
520 &uart0 {
521         status = "okay";
522 };
523
524 &uart1 {
525         status = "okay";
526 };
527
528 &uart2 {
529         status = "okay";
530 };
531
532 &uart3 {
533         status = "okay";
534 };
535
536 &uart4 {
537         status = "okay";
538 };
539
540 &usbphy {
541         status = "okay";
542 };