ARM: dts: rockchip: use hdmi-ddc for ddc bus in miniarm
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3288-miniarm.dts
1 /*
2  * This file is dual-licensed: you can use it either under the terms
3  * of the GPL or the X11 license, at your option. Note that this dual
4  * licensing only applies to this file, and not this project as a
5  * whole.
6  *
7  *  a) This file is free software; you can redistribute it and/or
8  *     modify it under the terms of the GNU General Public License as
9  *     published by the Free Software Foundation; either version 2 of the
10  *     License, or (at your option) any later version.
11  *
12  *     This file is distributed in the hope that it will be useful,
13  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *     GNU General Public License for more details.
16  *
17  * Or, alternatively,
18  *
19  *  b) Permission is hereby granted, free of charge, to any person
20  *     obtaining a copy of this software and associated documentation
21  *     files (the "Software"), to deal in the Software without
22  *     restriction, including without limitation the rights to use,
23  *     copy, modify, merge, publish, distribute, sublicense, and/or
24  *     sell copies of the Software, and to permit persons to whom the
25  *     Software is furnished to do so, subject to the following
26  *     conditions:
27  *
28  *     The above copyright notice and this permission notice shall be
29  *     included in all copies or substantial portions of the Software.
30  *
31  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
33  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
34  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
35  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
36  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
37  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
38  *     OTHER DEALINGS IN THE SOFTWARE.
39  */
40
41 /dts-v1/;
42 #include "rk3288.dtsi"
43
44 / {
45         compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288";
46
47         memory {
48                 device_type = "memory";
49                 reg = <0x0 0x80000000>;
50         };
51
52         ext_gmac: external-gmac-clock {
53                 compatible = "fixed-clock";
54                 clock-frequency = <125000000>;
55                 clock-output-names = "ext_gmac";
56                 #clock-cells = <0>;
57         };
58
59         gpio-keys {
60                 compatible = "gpio-keys";
61                 #address-cells = <1>;
62                 #size-cells = <0>;
63                 autorepeat;
64
65                 pinctrl-names = "default";
66                 pinctrl-0 = <&pwrbtn>;
67
68                 button@0 {
69                         gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
70                         linux,code = <116>;
71                         label = "GPIO Key Power";
72                         linux,input-type = <1>;
73                         gpio-key,wakeup = <1>;
74                         debounce-interval = <100>;
75                 };
76         };
77
78         gpio-leds {
79                 compatible = "gpio-leds";
80
81                 pwr-led {
82                         gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
83                         linux,default-trigger = "default-on";
84                 };
85
86                 act-led {
87                         gpios=<&gpio2 3 GPIO_ACTIVE_LOW>;
88                         linux,default-trigger="mmc0";
89                 };
90         };
91
92         sound {
93                 compatible = "simple-audio-card";
94                 simple-audio-card,format = "i2s";
95                 simple-audio-card,name = "rockchip,miniarm-codec";
96                 simple-audio-card,mclk-fs = <512>;
97                 simple-audio-card,cpu {
98                         sound-dai = <&i2s>;
99                 };
100                 simple-audio-card,codec {
101                         sound-dai = <&hdmi>;
102                 };
103         };
104
105         vcc_sys: vsys-regulator {
106                 compatible = "regulator-fixed";
107                 regulator-name = "vcc_sys";
108                 regulator-min-microvolt = <5000000>;
109                 regulator-max-microvolt = <5000000>;
110                 regulator-always-on;
111                 regulator-boot-on;
112         };
113
114         /*
115          * NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from
116          * vcc_io directly.  Those boards won't be able to power cycle SD cards
117          * but it shouldn't hurt to toggle this pin there anyway.
118          */
119         vcc_sd: sdmmc-regulator {
120                 compatible = "regulator-fixed";
121                 gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
122                 pinctrl-names = "default";
123                 pinctrl-0 = <&sdmmc_pwr>;
124                 regulator-name = "vcc_sd";
125                 regulator-min-microvolt = <3300000>;
126                 regulator-max-microvolt = <3300000>;
127                 startup-delay-us = <100000>;
128                 vin-supply = <&vcc_io>;
129         };
130 };
131
132 &cpu0 {
133         cpu0-supply = <&vdd_cpu>;
134 };
135
136 &gmac {
137         phy-supply = <&vcc33_lan>;
138         phy-mode = "rgmii";
139         clock_in_out = "input";
140         snps,reset-gpio = <&gpio4 7 0>;
141         snps,reset-active-low;
142         snps,reset-delays-us = <0 10000 1000000>;
143         assigned-clocks = <&cru SCLK_MAC>;
144         assigned-clock-parents = <&ext_gmac>;
145         pinctrl-names = "default";
146         pinctrl-0 = <&rgmii_pins>;
147         tx_delay = <0x30>;
148         rx_delay = <0x10>;
149         status = "ok";
150 };
151
152 &gpu {
153         mali-supply = <&vdd_gpu>;
154         status = "okay";
155 };
156
157 &hdmi {
158         #address-cells = <1>;
159         #size-cells = <0>;
160         #sound-dai-cells = <0>;
161         pinctrl-names = "default";
162         pinctrl-0 = <&hdmi_ddc>;
163         status = "okay";
164         /* Don't use vopl for HDMI */
165         ports {
166                 hdmi_in: port {
167                         /delete-node/ endpoint@1;
168                 };
169         };
170 };
171
172 &hevc_service {
173         status = "okay";
174 };
175
176 &i2c0 {
177         status = "okay";
178         clock-frequency = <400000>;
179
180         rk808: pmic@1b {
181                 compatible = "rockchip,rk808";
182                 reg = <0x1b>;
183                 interrupt-parent = <&gpio0>;
184                 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
185                 pinctrl-names = "default";
186                 pinctrl-0 = <&pmic_int &global_pwroff &dvs_1 &dvs_2>;
187                 dvs-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>,
188                                 <&gpio0 12 GPIO_ACTIVE_HIGH>;
189
190                 rockchip,system-power-controller;
191                 wakeup-source;
192                 #clock-cells = <1>;
193                 clock-output-names = "xin32k", "rk808-clkout2";
194
195                 vcc1-supply = <&vcc_sys>;
196                 vcc2-supply = <&vcc_sys>;
197                 vcc3-supply = <&vcc_sys>;
198                 vcc4-supply = <&vcc_sys>;
199                 vcc6-supply = <&vcc_sys>;
200                 vcc7-supply = <&vcc_sys>;
201                 vcc8-supply = <&vcc_io>;
202                 vcc9-supply = <&vcc_io>;
203                 vcc10-supply = <&vcc_io>;
204                 vcc11-supply = <&vcc_sys>;
205                 vcc12-supply = <&vcc_io>;
206                 vddio-supply = <&vcc_io>;
207
208                 regulators {
209                         vdd_cpu: DCDC_REG1 {
210                                 regulator-always-on;
211                                 regulator-boot-on;
212                                 regulator-min-microvolt = <750000>;
213                                 regulator-max-microvolt = <1350000>;
214                                 regulator-name = "vdd_arm";
215                                 regulator-ramp-delay = <6000>;
216                                 regulator-state-mem {
217                                         regulator-off-in-suspend;
218                                 };
219                         };
220
221                         vdd_gpu: DCDC_REG2 {
222                                 regulator-always-on;
223                                 regulator-boot-on;
224                                 regulator-min-microvolt = <850000>;
225                                 regulator-max-microvolt = <1250000>;
226                                 regulator-name = "vdd_gpu";
227                                 regulator-ramp-delay = <6000>;
228                                 regulator-state-mem {
229                                         regulator-on-in-suspend;
230                                         regulator-suspend-microvolt = <1000000>;
231                                 };
232                         };
233
234                         vcc_ddr: DCDC_REG3 {
235                                 regulator-always-on;
236                                 regulator-boot-on;
237                                 regulator-name = "vcc_ddr";
238                                 regulator-state-mem {
239                                         regulator-on-in-suspend;
240                                 };
241                         };
242
243                         vcc_io: DCDC_REG4 {
244                                 regulator-always-on;
245                                 regulator-boot-on;
246                                 regulator-min-microvolt = <3300000>;
247                                 regulator-max-microvolt = <3300000>;
248                                 regulator-name = "vcc_io";
249                                 regulator-state-mem {
250                                         regulator-on-in-suspend;
251                                         regulator-suspend-microvolt = <3300000>;
252                                 };
253                         };
254
255                         vcc18_ldo1: LDO_REG1 {
256                                 regulator-always-on;
257                                 regulator-boot-on;
258                                 regulator-min-microvolt = <1800000>;
259                                 regulator-max-microvolt = <1800000>;
260                                 regulator-name = "vcc18_ldo1";
261                                 regulator-state-mem {
262                                         regulator-on-in-suspend;
263                                         regulator-suspend-microvolt = <1800000>;
264                                 };
265                         };
266
267                         vcc33_mipi: LDO_REG2 {
268                                 regulator-always-on;
269                                 regulator-boot-on;
270                                 regulator-min-microvolt = <3300000>;
271                                 regulator-max-microvolt = <3300000>;
272                                 regulator-name = "vcc33_mipi";
273                                 regulator-state-mem {
274                                         regulator-off-in-suspend;
275                                 };
276                         };
277
278                         vdd_10: LDO_REG3 {
279                                 regulator-always-on;
280                                 regulator-boot-on;
281                                 regulator-min-microvolt = <1000000>;
282                                 regulator-max-microvolt = <1000000>;
283                                 regulator-name = "vdd_10";
284                                 regulator-state-mem {
285                                         regulator-on-in-suspend;
286                                         regulator-suspend-microvolt = <1000000>;
287                                 };
288                         };
289
290                         vcc18_codec: LDO_REG4 {
291                                 regulator-always-on;
292                                 regulator-boot-on;
293                                 regulator-min-microvolt = <1800000>;
294                                 regulator-max-microvolt = <1800000>;
295                                 regulator-name = "vcc18_codec";
296                                 regulator-state-mem {
297                                         regulator-on-in-suspend;
298                                         regulator-suspend-microvolt = <1800000>;
299                                 };
300                         };
301
302                         vccio_sd: LDO_REG5 {
303                                 regulator-always-on;
304                                 regulator-boot-on;
305                                 regulator-min-microvolt = <1800000>;
306                                 regulator-max-microvolt = <3300000>;
307                                 regulator-name = "vccio_sd";
308                                 regulator-state-mem {
309                                         regulator-on-in-suspend;
310                                         regulator-suspend-microvolt = <3300000>;
311                                 };
312                         };
313
314                         vdd10_lcd: LDO_REG6 {
315                                 regulator-always-on;
316                                 regulator-boot-on;
317                                 regulator-min-microvolt = <1000000>;
318                                 regulator-max-microvolt = <1000000>;
319                                 regulator-name = "vdd10_lcd";
320                                 regulator-state-mem {
321                                         regulator-on-in-suspend;
322                                         regulator-suspend-microvolt = <1000000>;
323                                 };
324                         };
325
326                         vcc_18: LDO_REG7 {
327                                 regulator-always-on;
328                                 regulator-boot-on;
329                                 regulator-min-microvolt = <1800000>;
330                                 regulator-max-microvolt = <1800000>;
331                                 regulator-name = "vcc_18";
332                                 regulator-state-mem {
333                                         regulator-on-in-suspend;
334                                         regulator-suspend-microvolt = <1800000>;
335                                 };
336                         };
337
338                         vcc18_lcd: LDO_REG8 {
339                                 regulator-always-on;
340                                 regulator-boot-on;
341                                 regulator-min-microvolt = <1800000>;
342                                 regulator-max-microvolt = <1800000>;
343                                 regulator-name = "vcc18_lcd";
344                                 regulator-state-mem {
345                                         regulator-on-in-suspend;
346                                         regulator-suspend-microvolt = <1800000>;
347                                 };
348                         };
349
350                         vcc33_sd: SWITCH_REG1 {
351                                 regulator-always-on;
352                                 regulator-boot-on;
353                                 regulator-name = "vcc33_sd";
354                                 regulator-state-mem {
355                                         regulator-on-in-suspend;
356                                 };
357                         };
358
359                         vcc33_lan: SWITCH_REG2 {
360                                 regulator-always-on;
361                                 regulator-boot-on;
362                                 regulator-name = "vcc33_lan";
363                                 regulator-state-mem {
364                                         regulator-on-in-suspend;
365                                 };
366                         };
367                 };
368         };
369 };
370
371 &i2c2 {
372         status = "okay";
373 };
374
375 &i2c5 {
376         status = "okay";
377 };
378
379 &i2s {
380         #sound-dai-cells = <0>;
381         status = "okay";
382 };
383
384 &io_domains {
385         status = "okay";
386
387         sdcard-supply = <&vccio_sd>;
388 };
389
390 &pwm0 {
391         status = "okay";
392 };
393
394 &rga {
395         status = "okay";
396 };
397
398 &saradc {
399         vref-supply = <&vcc18_ldo1>;
400         status ="okay";
401 };
402
403 &sdmmc {
404         bus-width = <4>;
405         cap-mmc-highspeed;
406         cap-sd-highspeed;
407         card-detect-delay = <200>;
408         disable-wp;                     /* wp not hooked up */
409         num-slots = <1>;
410         pinctrl-names = "default";
411         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
412         status = "okay";
413         supports-sd;
414         vmmc-supply = <&vcc33_sd>;
415         vqmmc-supply = <&vccio_sd>;
416 };
417
418 &tsadc {
419         rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
420         rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
421         status = "okay";
422 };
423
424 &uart0 {
425         status = "okay";
426 };
427
428 &uart1 {
429         status = "okay";
430 };
431
432 &uart2 {
433         status = "okay";
434 };
435
436 &uart3 {
437         status = "okay";
438 };
439
440 &uart4 {
441         status = "okay";
442 };
443
444 &usbphy {
445         status = "okay";
446 };
447
448 &usb_host0_ehci {
449         no-relinquish-port;
450         status = "okay";
451 };
452
453 &usb_host1 {
454         status = "okay";
455 };
456
457 &usb_otg {
458         status= "okay";
459 };
460
461 &vopb {
462         status = "okay";
463 };
464
465 &vopb_mmu {
466         status = "okay";
467 };
468
469 &vopl {
470         status = "okay";
471         /* Don't use vopl for HDMI */
472         vopl_out: port {
473                 /delete-node/ endpoint@0;
474         };
475 };
476
477 &vopl_mmu {
478         status = "okay";
479 };
480
481 &vpu_service {
482         status = "okay";
483 };
484
485 &wdt {
486         status = "okay";
487 };
488
489 &pinctrl {
490         pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
491                 drive-strength = <8>;
492         };
493
494         pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
495                 bias-pull-up;
496                 drive-strength = <8>;
497         };
498
499         backlight {
500                 bl_en: bl-en {
501                         rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
502                 };
503         };
504
505         buttons {
506                 pwrbtn: pwrbtn {
507                         rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
508                 };
509         };
510
511         eth_phy {
512                 eth_phy_pwr: eth-phy-pwr {
513                         rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_none>;
514                 };
515         };
516
517         pmic {
518                 pmic_int: pmic-int {
519                         rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
520                 };
521
522                 dvs_1: dvs-1 {
523                         rockchip,pins = <RK_GPIO0 11 RK_FUNC_GPIO &pcfg_pull_down>;
524                 };
525
526                 dvs_2: dvs-2 {
527                         rockchip,pins = <RK_GPIO0 12 RK_FUNC_GPIO &pcfg_pull_down>;
528                 };
529         };
530
531         sdmmc {
532                 /*
533                  * Default drive strength isn't enough to achieve even
534                  * high-speed mode on EVB board so bump up to 8ma.
535                  */
536                 sdmmc_bus4: sdmmc-bus4 {
537                         rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
538                                         <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
539                                         <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
540                                         <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
541                 };
542
543                 sdmmc_clk: sdmmc-clk {
544                         rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>;
545                 };
546
547                 sdmmc_cmd: sdmmc-cmd {
548                         rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
549                 };
550
551                 sdmmc_pwr: sdmmc-pwr {
552                         rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
553                 };
554         };
555
556         usb {
557                 host_vbus_drv: host-vbus-drv {
558                         rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
559                 };
560
561                 pwr_3g: pwr-3g {
562                         rockchip,pins = <7 8 RK_FUNC_GPIO &pcfg_pull_none>;
563                 };
564         };
565 };