arm: dts: fix dts for rk3288-popmetal
[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         supports-sd;
174 };
175
176 &gmac {
177         phy-supply = <&vcc_lan>;
178         phy-mode = "rgmii";
179         clock_in_out = "input";
180         snps,reset-gpio = <&gpio4 7 0>;
181         snps,reset-active-low;
182         snps,reset-delays-us = <0 10000 1000000>;
183         assigned-clocks = <&cru SCLK_MAC>;
184         assigned-clock-parents = <&ext_gmac>;
185         pinctrl-names = "default";
186         pinctrl-0 = <&rgmii_pins>;
187         tx_delay = <0x30>;
188         rx_delay = <0x10>;
189         status = "ok";
190 };
191
192 &gpu {
193         mali-supply = <&vdd_gpu>;
194         status = "okay";
195 };
196
197 &hdmi {
198         ddc-i2c-bus = <&i2c5>;
199         status = "okay";
200 };
201
202 &hevc_service {
203         status = "okay";
204 };
205
206 &i2c0 {
207         status = "okay";
208         clock-frequency = <400000>;
209
210         rk808: pmic@1b {
211                 compatible = "rockchip,rk808";
212                 reg = <0x1b>;
213                 interrupt-parent = <&gpio0>;
214                 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
215                 pinctrl-names = "default";
216                 pinctrl-0 = <&pmic_int &global_pwroff>;
217                 rockchip,system-power-controller;
218                 wakeup-source;
219                 #clock-cells = <1>;
220                 clock-output-names = "xin32k", "rk808-clkout2";
221
222                 vcc1-supply = <&vcc_sys>;
223                 vcc2-supply = <&vcc_sys>;
224                 vcc3-supply = <&vcc_sys>;
225                 vcc4-supply = <&vcc_sys>;
226                 vcc6-supply = <&vcc_sys>;
227                 vcc7-supply = <&vcc_sys>;
228                 vcc8-supply = <&vcc_18>;
229                 vcc9-supply = <&vcc_io>;
230                 vcc10-supply = <&vcc_io>;
231                 vcc11-supply = <&vcc_sys>;
232                 vcc12-supply = <&vcc_io>;
233                 vddio-supply = <&vcc_io>;
234
235                 regulators {
236                         vdd_cpu: DCDC_REG1 {
237                                 regulator-always-on;
238                                 regulator-boot-on;
239                                 regulator-min-microvolt = <750000>;
240                                 regulator-max-microvolt = <1350000>;
241                                 regulator-name = "vdd_arm";
242                                 regulator-state-mem {
243                                         regulator-off-in-suspend;
244                                 };
245                         };
246
247                         vdd_gpu: DCDC_REG2 {
248                                 regulator-always-on;
249                                 regulator-boot-on;
250                                 regulator-min-microvolt = <850000>;
251                                 regulator-max-microvolt = <1250000>;
252                                 regulator-name = "vdd_gpu";
253                                 regulator-ramp-delay = <6000>;
254                                 regulator-state-mem {
255                                         regulator-on-in-suspend;
256                                         regulator-suspend-microvolt = <1000000>;
257                                 };
258                         };
259
260                         vcc_ddr: DCDC_REG3 {
261                                 regulator-always-on;
262                                 regulator-boot-on;
263                                 regulator-name = "vcc_ddr";
264                                 regulator-state-mem {
265                                         regulator-on-in-suspend;
266                                 };
267                         };
268
269                         vcc_io: DCDC_REG4 {
270                                 regulator-always-on;
271                                 regulator-boot-on;
272                                 regulator-min-microvolt = <3300000>;
273                                 regulator-max-microvolt = <3300000>;
274                                 regulator-name = "vcc_io";
275                                 regulator-state-mem {
276                                         regulator-on-in-suspend;
277                                         regulator-suspend-microvolt = <3300000>;
278                                 };
279                         };
280
281                         vcc_lan: LDO_REG1 {
282                                 regulator-always-on;
283                                 regulator-boot-on;
284                                 regulator-min-microvolt = <3300000>;
285                                 regulator-max-microvolt = <3300000>;
286                                 regulator-name = "vcc_lan";
287                                 regulator-state-mem {
288                                         regulator-on-in-suspend;
289                                         regulator-suspend-microvolt = <3300000>;
290                                 };
291                         };
292
293                         vccio_sd: LDO_REG2 {
294                                 regulator-always-on;
295                                 regulator-boot-on;
296                                 regulator-min-microvolt = <3300000>;
297                                 regulator-max-microvolt = <3300000>;
298                                 regulator-name = "vccio_sd";
299                                 regulator-state-mem {
300                                         regulator-off-in-suspend;
301                                 };
302                         };
303
304                         vdd_10: LDO_REG3 {
305                                 regulator-always-on;
306                                 regulator-boot-on;
307                                 regulator-min-microvolt = <1000000>;
308                                 regulator-max-microvolt = <1000000>;
309                                 regulator-name = "vdd_10";
310                                 regulator-state-mem {
311                                         regulator-on-in-suspend;
312                                         regulator-suspend-microvolt = <1000000>;
313                                 };
314                         };
315
316                         vcc18_lcd: LDO_REG4 {
317                                 regulator-always-on;
318                                 regulator-boot-on;
319                                 regulator-min-microvolt = <1800000>;
320                                 regulator-max-microvolt = <1800000>;
321                                 regulator-name = "vcc18_lcd";
322                                 regulator-state-mem {
323                                         regulator-on-in-suspend;
324                                         regulator-suspend-microvolt = <1800000>;
325                                 };
326                         };
327
328                         ldo5: LDO_REG5 {
329                                 regulator-always-on;
330                                 regulator-min-microvolt = <1800000>;
331                                 regulator-max-microvolt = <3300000>;
332                                 regulator-name = "ldo5";
333                         };
334
335                         vdd10_lcd: LDO_REG6 {
336                                 regulator-always-on;
337                                 regulator-boot-on;
338                                 regulator-min-microvolt = <1000000>;
339                                 regulator-max-microvolt = <1000000>;
340                                 regulator-name = "vdd10_lcd";
341                                 regulator-state-mem {
342                                         regulator-on-in-suspend;
343                                         regulator-suspend-microvolt = <1000000>;
344                                 };
345                         };
346
347                         vcc_18: LDO_REG7 {
348                                 regulator-always-on;
349                                 regulator-boot-on;
350                                 regulator-min-microvolt = <1800000>;
351                                 regulator-max-microvolt = <1800000>;
352                                 regulator-name = "vcc_18";
353                                 regulator-state-mem {
354                                         regulator-on-in-suspend;
355                                         regulator-suspend-microvolt = <1800000>;
356                                 };
357                         };
358
359                         vcca_33: LDO_REG8 {
360                                 regulator-always-on;
361                                 regulator-boot-on;
362                                 regulator-min-microvolt = <3300000>;
363                                 regulator-max-microvolt = <3300000>;
364                                 regulator-name = "vcca_33";
365                                 regulator-state-mem {
366                                         regulator-on-in-suspend;
367                                         regulator-suspend-microvolt = <3300000>;
368                                 };
369                         };
370
371                         vccio_wl: SWITCH_REG1 {
372                                 regulator-always-on;
373                                 regulator-boot-on;
374                                 regulator-name = "vccio_wl";
375                                 regulator-state-mem {
376                                         regulator-on-in-suspend;
377                                 };
378                         };
379
380                         vcc_lcd: SWITCH_REG2 {
381                                 regulator-always-on;
382                                 regulator-boot-on;
383                                 regulator-name = "vcc_lcd";
384                                 regulator-state-mem {
385                                         regulator-on-in-suspend;
386                                 };
387                         };
388                 };
389         };
390 };
391
392 &i2c1 {
393         status = "okay";
394         clock-frequency = <400000>;
395
396         ak8963: ak8963@0d {
397                 compatible = "asahi-kasei,ak8975";
398                 reg = <0x0d>;
399                 interrupt-parent = <&gpio8>;
400                 interrupts = <1 IRQ_TYPE_EDGE_RISING>;
401                 pinctrl-names = "default";
402                 pinctrl-0 = <&comp_int>;
403         };
404
405         l3g4200d: l3g4200d@68 {
406                 compatible = "st,l3g4200d-gyro";
407                 st,drdy-int-pin = <2>;
408                 reg = <0x6b>;
409         };
410
411         mma8452: mma8452@1d {
412                 compatible = "fsl,mma8452";
413                 reg = <0x1d>;
414                 interrupt-parent = <&gpio8>;
415                 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
416                 pinctrl-names = "default";
417                 pinctrl-0 = <&gsensor_int>;
418         };
419 };
420
421 &i2c2 {
422         status = "okay";
423 };
424
425 &i2c3 {
426         status = "okay";
427 };
428
429 &i2c4 {
430         status = "okay";
431 };
432
433 &i2c5 {
434         status = "okay";
435 };
436
437 &io_domains {
438         status = "okay";
439
440         audio-supply = <&vcca_33>;
441         bb-supply = <&vcc_io>;
442         dvp-supply = <&vcc18_dvp>;
443         flash0-supply = <&vcc_flash>;
444         flash1-supply = <&vcc_lan>;
445         gpio30-supply = <&vcc_io>;
446         gpio1830-supply = <&vcc_io>;
447         lcdc-supply = <&vcc_io>;
448         sdcard-supply = <&vccio_sd>;
449         wifi-supply = <&vccio_wl>;
450 };
451
452 &rga {
453         status = "okay";
454 };
455
456 &pinctrl {
457         ak8963 {
458                 comp_int: comp-int {
459                         rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_up>;
460                 };
461         };
462
463         buttons {
464                 pwrbtn: pwrbtn {
465                         rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
466                 };
467         };
468
469         dvp {
470                 dvp_pwr: dvp-pwr {
471                         rockchip,pins = <0 17 RK_FUNC_GPIO &pcfg_pull_none>;
472                 };
473         };
474
475         ir {
476                 ir_int: ir-int {
477                         rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_up>;
478                 };
479         };
480
481         mma8452 {
482                 gsensor_int: gsensor-int {
483                         rockchip,pins = <8 0 RK_FUNC_GPIO &pcfg_pull_up>;
484                 };
485         };
486
487         pmic {
488                 pmic_int: pmic-int {
489                         rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
490                 };
491         };
492
493         sdmmc {
494                 sdmmc_pwr: sdmmc-pwr {
495                         rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
496                 };
497         };
498 };
499
500 &tsadc {
501         rockchip,hw-tshut-mode = <0>;
502         rockchip,hw-tshut-polarity = <0>;
503         status = "okay";
504 };
505
506 &vopb {
507         status = "okay";
508 };
509
510 &vopb_mmu {
511         status = "okay";
512 };
513
514 &vopl {
515         status = "okay";
516 };
517
518 &vopl_mmu {
519         status = "okay";
520 };
521
522 &vpu_service {
523         status = "okay";
524 };
525
526 &uart0 {
527         status = "okay";
528 };
529
530 &uart1 {
531         status = "okay";
532 };
533
534 &uart2 {
535         status = "okay";
536 };
537
538 &uart3 {
539         status = "okay";
540 };
541
542 &uart4 {
543         status = "okay";
544 };
545
546 &usbphy {
547         status = "okay";
548 };
549
550 &usb_host0_ehci {
551         no-relinquish-port;
552         status = "okay";
553 };
554
555 &usb_host1 {
556         status = "okay";
557 };
558
559 &usb_otg {
560         status= "okay";
561 };