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