2 * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
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
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.
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.
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
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
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.
42 #include <dt-bindings/pwm/pwm.h>
43 #include <dt-bindings/input/input.h>
44 #include "rk3399.dtsi"
45 #include "rk3399-android.dtsi"
48 compatible = "rockchip,rk3399-box","rockchip,rk3399";
50 vcc1v8_s0: vcc1v8-s0 {
51 compatible = "regulator-fixed";
52 regulator-name = "vcc1v8_s0";
53 regulator-min-microvolt = <1800000>;
54 regulator-max-microvolt = <1800000>;
59 compatible = "regulator-fixed";
60 regulator-name = "vcc_sys";
61 regulator-min-microvolt = <5000000>;
62 regulator-max-microvolt = <5000000>;
66 vcc_phy: vcc-phy-regulator {
67 compatible = "regulator-fixed";
68 regulator-name = "vcc_phy";
73 vcc3v3_sys: vcc3v3-sys {
74 compatible = "regulator-fixed";
75 regulator-name = "vcc3v3_sys";
76 regulator-min-microvolt = <3300000>;
77 regulator-max-microvolt = <3300000>;
79 vin-supply = <&vcc_sys>;
82 vcc5v0_host: vcc5v0-host-regulator {
83 compatible = "regulator-fixed";
85 gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
86 pinctrl-names = "default";
87 pinctrl-0 = <&host_vbus_drv>;
88 regulator-name = "vcc5v0_host";
92 compatible = "pwm-regulator";
93 pwms = <&pwm2 0 25000 0>;
94 regulator-name = "vdd_log";
95 regulator-min-microvolt = <800000>;
96 regulator-max-microvolt = <1400000>;
100 /* for rockchip boot on */
101 rockchip,pwm_id= <2>;
102 rockchip,pwm_voltage = <900000>;
104 vin-supply = <&vcc_sys>;
107 clkin_gmac: external-gmac-clock {
108 compatible = "fixed-clock";
109 clock-frequency = <125000000>;
110 clock-output-names = "clkin_gmac";
115 compatible = "rockchip,rk3399-io-voltage-domain";
116 rockchip,grf = <&grf>;
118 bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */
119 audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */
120 sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */
121 gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */
125 compatible = "rockchip,rk3399-pmu-io-voltage-domain";
126 rockchip,grf = <&pmugrf>;
128 pmu1830-supply = <&vcc_1v8>;
133 compatible = "simple-audio-card";
134 simple-audio-card,name = "ROCKCHIP,SPDIF";
135 simple-audio-card,cpu {
136 sound-dai = <&spdif>;
138 simple-audio-card,codec {
139 sound-dai = <&spdif_out>;
143 spdif_out: spdif-out {
145 compatible = "linux,spdif-dit";
146 #sound-dai-cells = <0>;
149 hdmi_sound: hdmi-sound {
151 compatible = "simple-audio-card";
152 simple-audio-card,format = "i2s";
153 simple-audio-card,mclk-fs = <256>;
154 simple-audio-card,name = "rockchip,hdmi";
155 simple-audio-card,cpu {
158 simple-audio-card,codec {
159 sound-dai = <&dw_hdmi_audio>;
163 dw_hdmi_audio: dw-hdmi-audio {
165 compatible = "rockchip,dw-hdmi-audio";
166 #sound-dai-cells = <0>;
169 sdio_pwrseq: sdio-pwrseq {
170 compatible = "mmc-pwrseq-simple";
172 clock-names = "ext_clock";
173 pinctrl-names = "default";
174 pinctrl-0 = <&wifi_enable_h>;
177 * On the module itself this is one of these (depending
178 * on the actual card populated):
179 * - SDIO_RESET_L_WL_REG_ON
180 * - PDN (power down when low)
182 reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
186 compatible = "wlan-platdata";
187 rockchip,grf = <&grf>;
188 wifi_chip_type = "ap6354";
190 WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>;
195 compatible = "bluetooth-platdata";
197 clock-names = "ext_clock";
198 /* wifi-bt-power-toggle; */
199 uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
200 pinctrl-names = "default", "rts_gpio";
201 pinctrl-0 = <&uart0_rts>;
202 pinctrl-1 = <&uart0_gpios>;
203 /* BT,power_gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>; */
204 BT,reset_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
205 BT,wake_gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>;
206 BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>;
216 clock-frequency = <100000000>;
217 clock-freq-min-max = <100000 100000000>;
225 vqmmc-supply = <&vcc_sd>;
226 pinctrl-names = "default";
227 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
228 card-detect-delay = <800>;
233 clock-frequency = <100000000>;
234 clock-freq-min-max = <200000 100000000>;
240 keep-power-in-suspend;
241 mmc-pwrseq = <&sdio_pwrseq>;
244 pinctrl-names = "default";
245 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
251 freq-sel = <200000000>;
262 mmc-hs400-enhanced-strobe;
268 rockchip,i2s-broken-burst-len;
269 rockchip,playback-channels = <8>;
270 rockchip,capture-channels = <8>;
271 #sound-dai-cells = <0>;
275 #sound-dai-cells = <0>;
279 pinctrl-0 = <&spdif_bus_1>;
281 #sound-dai-cells = <0>;
286 opp-hz = /bits/ 64 <408000000>;
287 opp-microvolt = <800000>;
288 clock-latency-ns = <40000>;
291 opp-hz = /bits/ 64 <600000000>;
292 opp-microvolt = <800000>;
293 clock-latency-ns = <40000>;
296 opp-hz = /bits/ 64 <816000000>;
297 opp-microvolt = <800000>;
298 clock-latency-ns = <40000>;
301 opp-hz = /bits/ 64 <1008000000>;
302 opp-microvolt = <875000>;
303 clock-latency-ns = <40000>;
306 opp-hz = /bits/ 64 <1200000000>;
307 opp-microvolt = <925000>;
308 clock-latency-ns = <40000>;
311 opp-hz = /bits/ 64 <1416000000>;
312 opp-microvolt = <1050000>;
313 clock-latency-ns = <40000>;
316 opp-hz = /bits/ 64 <1512000000>;
317 opp-microvolt = <1125000>;
318 clock-latency-ns = <40000>;
324 opp-hz = /bits/ 64 <408000000>;
325 opp-microvolt = <800000>;
326 clock-latency-ns = <40000>;
329 opp-hz = /bits/ 64 <600000000>;
330 opp-microvolt = <800000>;
331 clock-latency-ns = <40000>;
334 opp-hz = /bits/ 64 <816000000>;
335 opp-microvolt = <825000>;
336 clock-latency-ns = <40000>;
339 opp-hz = /bits/ 64 <1008000000>;
340 opp-microvolt = <875000>;
341 clock-latency-ns = <40000>;
344 opp-hz = /bits/ 64 <1200000000>;
345 opp-microvolt = <950000>;
346 clock-latency-ns = <40000>;
349 opp-hz = /bits/ 64 <1416000000>;
350 opp-microvolt = <1025000>;
351 clock-latency-ns = <40000>;
354 opp-hz = /bits/ 64 <1608000000>;
355 opp-microvolt = <1100000>;
356 clock-latency-ns = <40000>;
359 opp-hz = /bits/ 64 <1800000000>;
360 opp-microvolt = <1175000>;
361 clock-latency-ns = <40000>;
364 opp-hz = /bits/ 64 <1992000000>;
365 opp-microvolt = <1250000>;
366 clock-latency-ns = <40000>;
375 518 335 /* 1008MHz */
376 617 428 /* 1200MHz */
377 728 573 /* 1416MHz */
378 827 724 /* 1608MHz */
379 925 900 /* 1800MHz */
380 1024 1108 /* 1992MHz */
411 518 335 /* 1008MHz */
412 617 428 /* 1200MHz */
413 728 573 /* 1416MHz */
414 827 724 /* 1608MHz */
415 925 900 /* 1800MHz */
416 1024 1108 /* 1992MHz */
444 opp-hz = /bits/ 64 <200000000>;
445 opp-microvolt = <800000>;
448 opp-hz = /bits/ 64 <300000000>;
449 opp-microvolt = <800000>;
452 opp-hz = /bits/ 64 <400000000>;
453 opp-microvolt = <800000>;
456 opp-hz = /bits/ 64 <500000000>;
457 opp-microvolt = <900000>;
460 opp-hz = /bits/ 64 <600000000>;
461 opp-microvolt = <900000>;
464 opp-hz = /bits/ 64 <800000000>;
465 opp-microvolt = <1000000>;
471 i2c-scl-rising-time-ns = <168>;
472 i2c-scl-falling-time-ns = <4>;
473 clock-frequency = <400000>;
475 vdd_cpu_b: syr827@40 {
476 compatible = "silergy,syr827";
478 regulator-compatible = "fan53555-reg";
479 regulator-name = "vdd_cpu_b";
480 regulator-min-microvolt = <712500>;
481 regulator-max-microvolt = <1500000>;
482 regulator-ramp-delay = <1000>;
483 fcs,suspend-voltage-selector = <0>;
486 vin-supply = <&vcc_sys>;
487 regulator-state-mem {
488 regulator-off-in-suspend;
493 compatible = "silergy,syr828";
495 regulator-compatible = "fan53555-reg";
496 regulator-name = "vdd_gpu";
497 regulator-min-microvolt = <712500>;
498 regulator-max-microvolt = <1500000>;
499 regulator-ramp-delay = <1000>;
500 fcs,suspend-voltage-selector = <1>;
503 vin-supply = <&vcc_sys>;
504 regulator-initial-mode = <1>; /* 1:force PWM 2:auto */
505 regulator-state-mem {
506 regulator-off-in-suspend;
511 compatible = "rockchip,rk808";
513 interrupt-parent = <&gpio1>;
514 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
515 pinctrl-names = "default";
516 pinctrl-0 = <&pmic_int_l>;
517 rockchip,system-power-controller;
520 clock-output-names = "xin32k", "rk808-clkout2";
522 vcc1-supply = <&vcc_sys>;
523 vcc2-supply = <&vcc_sys>;
524 vcc3-supply = <&vcc_sys>;
525 vcc4-supply = <&vcc_sys>;
526 vcc6-supply = <&vcc_sys>;
527 vcc7-supply = <&vcc_sys>;
528 vcc8-supply = <&vcc3v3_sys>;
529 vcc9-supply = <&vcc_sys>;
530 vcc10-supply = <&vcc_sys>;
531 vcc11-supply = <&vcc_sys>;
532 vcc12-supply = <&vcc3v3_sys>;
533 vddio-supply = <&vcc_1v8>;
536 vdd_center: DCDC_REG1 {
537 regulator-name = "vdd_center";
538 regulator-min-microvolt = <750000>;
539 regulator-max-microvolt = <1350000>;
540 regulator-ramp-delay = <6001>;
543 regulator-state-mem {
544 regulator-off-in-suspend;
548 vdd_cpu_l: DCDC_REG2 {
549 regulator-name = "vdd_cpu_l";
550 regulator-min-microvolt = <750000>;
551 regulator-max-microvolt = <1350000>;
552 regulator-ramp-delay = <6001>;
555 regulator-state-mem {
556 regulator-off-in-suspend;
561 regulator-name = "vcc_ddr";
564 regulator-state-mem {
565 regulator-on-in-suspend;
570 regulator-name = "vcc_1v8";
571 regulator-min-microvolt = <1800000>;
572 regulator-max-microvolt = <1800000>;
575 regulator-state-mem {
576 regulator-on-in-suspend;
577 regulator-suspend-microvolt = <1800000>;
581 vcc1v8_dvp: LDO_REG1 {
582 regulator-name = "vcc1v8_dvp";
583 regulator-min-microvolt = <1800000>;
584 regulator-max-microvolt = <1800000>;
587 regulator-state-mem {
588 regulator-on-in-suspend;
589 regulator-suspend-microvolt = <1800000>;
593 vcca1v8_hdmi: LDO_REG2 {
594 regulator-name = "vcca1v8_hdmi";
595 regulator-min-microvolt = <1800000>;
596 regulator-max-microvolt = <1800000>;
599 regulator-state-mem {
600 regulator-on-in-suspend;
601 regulator-suspend-microvolt = <1800000>;
606 regulator-name = "vcca_1v8";
607 regulator-min-microvolt = <1800000>;
608 regulator-max-microvolt = <1800000>;
611 regulator-state-mem {
612 regulator-on-in-suspend;
613 regulator-suspend-microvolt = <1800000>;
618 regulator-name = "vcc_sd";
619 regulator-min-microvolt = <1800000>;
620 regulator-max-microvolt = <3300000>;
623 regulator-state-mem {
624 regulator-on-in-suspend;
625 regulator-suspend-microvolt = <3300000>;
629 vcc3v0_sd: LDO_REG5 {
630 regulator-name = "vcc3v0_sd";
631 regulator-min-microvolt = <3000000>;
632 regulator-max-microvolt = <3000000>;
635 regulator-state-mem {
636 regulator-on-in-suspend;
637 regulator-suspend-microvolt = <3000000>;
642 regulator-name = "vcc_1v5";
643 regulator-min-microvolt = <1500000>;
644 regulator-max-microvolt = <1500000>;
647 regulator-state-mem {
648 regulator-on-in-suspend;
649 regulator-suspend-microvolt = <1500000>;
653 vcca0v9_hdmi: LDO_REG7 {
654 regulator-name = "vcca0v9_hdmi";
655 regulator-min-microvolt = <900000>;
656 regulator-max-microvolt = <900000>;
659 regulator-state-mem {
660 regulator-on-in-suspend;
661 regulator-suspend-microvolt = <900000>;
666 regulator-name = "vcc_3v0";
667 regulator-min-microvolt = <3000000>;
668 regulator-max-microvolt = <3000000>;
671 regulator-state-mem {
672 regulator-on-in-suspend;
673 regulator-suspend-microvolt = <3000000>;
677 vcc3v3_s3: SWITCH_REG1 {
678 regulator-name = "vcc3v3_s3";
681 regulator-state-mem {
682 regulator-on-in-suspend;
686 vcc3v3_s0: SWITCH_REG2 {
687 regulator-name = "vcc3v3_s0";
690 regulator-state-mem {
691 regulator-on-in-suspend;
699 cpu-supply = <&vdd_cpu_l>;
703 cpu-supply = <&vdd_cpu_l>;
707 cpu-supply = <&vdd_cpu_l>;
711 cpu-supply = <&vdd_cpu_l>;
715 cpu-supply = <&vdd_cpu_b>;
719 cpu-supply = <&vdd_cpu_b>;
724 mali-supply = <&vdd_gpu>;
732 temperature = <85000>;
736 temperature = <100000>;
740 temperature = <105000>;
753 /* tshut mode 0:CRU 1:GPIO */
754 rockchip,hw-tshut-mode = <1>;
755 /* tshut polarity 0:LOW 1:HIGH */
756 rockchip,hw-tshut-polarity = <1>;
757 rockchip,hw-tshut-temp = <110000>;
765 u2phy0_otg: otg-port {
769 u2phy0_host: host-port {
770 phy-supply = <&vcc5v0_host>;
778 u2phy1_otg: otg-port {
782 u2phy1_host: host-port {
783 phy-supply = <&vcc5v0_host>;
789 pinctrl-names = "default";
790 pinctrl-0 = <&uart0_xfer &uart0_cts>;
840 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH 0>;
841 compatible = "rockchip,remotectl-pwm";
846 rockchip,usercode = <0x4040>;
856 <0xe3 KEY_VOLUMEDOWN>,
873 rockchip,usercode = <0xff00>;
883 <0xeb KEY_VOLUMEDOWN>,
888 <0xa9 KEY_VOLUMEDOWN>,
889 <0xa8 KEY_VOLUMEDOWN>,
890 <0xe0 KEY_VOLUMEDOWN>,
891 <0xa5 KEY_VOLUMEDOWN>,
896 <0xed KEY_VOLUMEDOWN>,
898 <0xb3 KEY_VOLUMEDOWN>,
899 <0xf1 KEY_VOLUMEDOWN>,
900 <0xf2 KEY_VOLUMEDOWN>,
902 <0xb4 KEY_VOLUMEDOWN>,
907 rockchip,usercode = <0x1dcc>;
917 <0xfd KEY_VOLUMEDOWN>,
935 <0xb5 KEY_BACKSPACE>;
940 phy-supply = <&vcc_phy>;
942 clock_in_out = "input";
943 snps,reset-gpio = <&gpio3 15 GPIO_ACTIVE_LOW>;
944 snps,reset-active-low;
945 snps,reset-delays-us = <0 10000 50000>;
946 assigned-clocks = <&cru SCLK_RMII_SRC>;
947 assigned-clock-parents = <&clkin_gmac>;
948 pinctrl-names = "default", "sleep";
949 pinctrl-0 = <&rgmii_pins>;
950 pinctrl-1 = <&rgmii_sleep_pins>;
961 #include <dt-bindings/display/screen-timing/lcd-box.dtsi>
965 native-mode = <&timing1>; /* 1080p */
977 rockchip,disp-policy = <DISPLAY_POLICY_BOX>;
982 rockchip,hdmi_video_source = <DISPLAY_SOURCE_LCDC0>;
984 <165000000 0 0 17 18 18 18>,
985 <340000000 0 2 17 14 14 14>,
986 <594000000 0 2 17 9 9 9>;
997 dp_vop_sel = <DISPLAY_SOURCE_LCDC1>;
1006 wifi_enable_h: wifi-enable-h {
1008 <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
1012 wireless-bluetooth {
1013 uart0_gpios: uart0-gpios {
1015 <2 19 RK_FUNC_GPIO &pcfg_pull_none>;
1020 host_vbus_drv: host-vbus-drv {
1022 <4 25 RK_FUNC_GPIO &pcfg_pull_none>;
1027 pmic_int_l: pmic-int-l {
1029 <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
1034 rgmii_sleep_pins: rgmii-sleep-pins {
1036 <3 15 RK_FUNC_GPIO &pcfg_output_low>;