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>;
232 clock-frequency = <100000000>;
233 clock-freq-min-max = <200000 100000000>;
239 keep-power-in-suspend;
240 mmc-pwrseq = <&sdio_pwrseq>;
243 pinctrl-names = "default";
244 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
250 freq-sel = <200000000>;
261 mmc-hs400-enhanced-strobe;
267 rockchip,i2s-broken-burst-len;
268 rockchip,playback-channels = <8>;
269 rockchip,capture-channels = <8>;
270 #sound-dai-cells = <0>;
274 #sound-dai-cells = <0>;
278 pinctrl-0 = <&spdif_bus_1>;
280 #sound-dai-cells = <0>;
285 opp-hz = /bits/ 64 <408000000>;
286 opp-microvolt = <800000>;
287 clock-latency-ns = <40000>;
290 opp-hz = /bits/ 64 <600000000>;
291 opp-microvolt = <800000>;
294 opp-hz = /bits/ 64 <816000000>;
295 opp-microvolt = <800000>;
298 opp-hz = /bits/ 64 <1008000000>;
299 opp-microvolt = <875000>;
302 opp-hz = /bits/ 64 <1200000000>;
303 opp-microvolt = <925000>;
306 opp-hz = /bits/ 64 <1416000000>;
307 opp-microvolt = <1050000>;
310 opp-hz = /bits/ 64 <1512000000>;
311 opp-microvolt = <1125000>;
317 opp-hz = /bits/ 64 <408000000>;
318 opp-microvolt = <800000>;
319 clock-latency-ns = <40000>;
322 opp-hz = /bits/ 64 <600000000>;
323 opp-microvolt = <800000>;
326 opp-hz = /bits/ 64 <816000000>;
327 opp-microvolt = <825000>;
330 opp-hz = /bits/ 64 <1008000000>;
331 opp-microvolt = <875000>;
334 opp-hz = /bits/ 64 <1200000000>;
335 opp-microvolt = <950000>;
338 opp-hz = /bits/ 64 <1416000000>;
339 opp-microvolt = <1025000>;
342 opp-hz = /bits/ 64 <1608000000>;
343 opp-microvolt = <1100000>;
346 opp-hz = /bits/ 64 <1800000000>;
347 opp-microvolt = <1175000>;
350 opp-hz = /bits/ 64 <1992000000>;
351 opp-microvolt = <1250000>;
360 518 335 /* 1008MHz */
361 617 428 /* 1200MHz */
362 728 573 /* 1416MHz */
363 827 724 /* 1608MHz */
364 925 900 /* 1800MHz */
365 1024 1108 /* 1992MHz */
396 518 335 /* 1008MHz */
397 617 428 /* 1200MHz */
398 728 573 /* 1416MHz */
399 827 724 /* 1608MHz */
400 925 900 /* 1800MHz */
401 1024 1108 /* 1992MHz */
429 opp-hz = /bits/ 64 <200000000>;
430 opp-microvolt = <800000>;
433 opp-hz = /bits/ 64 <300000000>;
434 opp-microvolt = <800000>;
437 opp-hz = /bits/ 64 <400000000>;
438 opp-microvolt = <800000>;
441 opp-hz = /bits/ 64 <500000000>;
442 opp-microvolt = <900000>;
445 opp-hz = /bits/ 64 <600000000>;
446 opp-microvolt = <900000>;
449 opp-hz = /bits/ 64 <800000000>;
450 opp-microvolt = <1000000>;
456 i2c-scl-rising-time-ns = <168>;
457 i2c-scl-falling-time-ns = <4>;
458 clock-frequency = <400000>;
460 vdd_cpu_b: syr827@40 {
461 compatible = "silergy,syr827";
463 regulator-compatible = "fan53555-reg";
464 regulator-name = "vdd_cpu_b";
465 regulator-min-microvolt = <712500>;
466 regulator-max-microvolt = <1500000>;
467 regulator-ramp-delay = <1000>;
468 fcs,suspend-voltage-selector = <0>;
471 vin-supply = <&vcc_sys>;
472 regulator-state-mem {
473 regulator-off-in-suspend;
478 compatible = "silergy,syr828";
480 regulator-compatible = "fan53555-reg";
481 regulator-name = "vdd_gpu";
482 regulator-min-microvolt = <712500>;
483 regulator-max-microvolt = <1500000>;
484 regulator-ramp-delay = <1000>;
485 fcs,suspend-voltage-selector = <1>;
488 vin-supply = <&vcc_sys>;
489 regulator-initial-mode = <1>; /* 1:force PWM 2:auto */
490 regulator-state-mem {
491 regulator-off-in-suspend;
496 compatible = "rockchip,rk808";
498 interrupt-parent = <&gpio1>;
499 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
500 pinctrl-names = "default";
501 pinctrl-0 = <&pmic_int_l>;
502 rockchip,system-power-controller;
505 clock-output-names = "xin32k", "rk808-clkout2";
507 vcc1-supply = <&vcc_sys>;
508 vcc2-supply = <&vcc_sys>;
509 vcc3-supply = <&vcc_sys>;
510 vcc4-supply = <&vcc_sys>;
511 vcc6-supply = <&vcc_sys>;
512 vcc7-supply = <&vcc_sys>;
513 vcc8-supply = <&vcc3v3_sys>;
514 vcc9-supply = <&vcc_sys>;
515 vcc10-supply = <&vcc_sys>;
516 vcc11-supply = <&vcc_sys>;
517 vcc12-supply = <&vcc3v3_sys>;
518 vddio-supply = <&vcc_1v8>;
521 vdd_center: DCDC_REG1 {
522 regulator-name = "vdd_center";
523 regulator-min-microvolt = <750000>;
524 regulator-max-microvolt = <1350000>;
527 regulator-state-mem {
528 regulator-off-in-suspend;
532 vdd_cpu_l: DCDC_REG2 {
533 regulator-name = "vdd_cpu_l";
534 regulator-min-microvolt = <750000>;
535 regulator-max-microvolt = <1350000>;
538 regulator-state-mem {
539 regulator-off-in-suspend;
544 regulator-name = "vcc_ddr";
547 regulator-state-mem {
548 regulator-on-in-suspend;
553 regulator-name = "vcc_1v8";
554 regulator-min-microvolt = <1800000>;
555 regulator-max-microvolt = <1800000>;
558 regulator-state-mem {
559 regulator-on-in-suspend;
560 regulator-suspend-microvolt = <1800000>;
564 vcc1v8_dvp: LDO_REG1 {
565 regulator-name = "vcc1v8_dvp";
566 regulator-min-microvolt = <1800000>;
567 regulator-max-microvolt = <1800000>;
570 regulator-state-mem {
571 regulator-on-in-suspend;
572 regulator-suspend-microvolt = <1800000>;
576 vcca1v8_hdmi: LDO_REG2 {
577 regulator-name = "vcca1v8_hdmi";
578 regulator-min-microvolt = <1800000>;
579 regulator-max-microvolt = <1800000>;
582 regulator-state-mem {
583 regulator-on-in-suspend;
584 regulator-suspend-microvolt = <1800000>;
589 regulator-name = "vcca_1v8";
590 regulator-min-microvolt = <1800000>;
591 regulator-max-microvolt = <1800000>;
594 regulator-state-mem {
595 regulator-on-in-suspend;
596 regulator-suspend-microvolt = <1800000>;
601 regulator-name = "vcc_sd";
602 regulator-min-microvolt = <1800000>;
603 regulator-max-microvolt = <3300000>;
606 regulator-state-mem {
607 regulator-on-in-suspend;
608 regulator-suspend-microvolt = <3300000>;
612 vcc3v0_sd: LDO_REG5 {
613 regulator-name = "vcc3v0_sd";
614 regulator-min-microvolt = <3000000>;
615 regulator-max-microvolt = <3000000>;
618 regulator-state-mem {
619 regulator-on-in-suspend;
620 regulator-suspend-microvolt = <3000000>;
625 regulator-name = "vcc_1v5";
626 regulator-min-microvolt = <1500000>;
627 regulator-max-microvolt = <1500000>;
630 regulator-state-mem {
631 regulator-on-in-suspend;
632 regulator-suspend-microvolt = <1500000>;
636 vcca0v9_hdmi: LDO_REG7 {
637 regulator-name = "vcca0v9_hdmi";
638 regulator-min-microvolt = <900000>;
639 regulator-max-microvolt = <900000>;
642 regulator-state-mem {
643 regulator-on-in-suspend;
644 regulator-suspend-microvolt = <900000>;
649 regulator-name = "vcc_3v0";
650 regulator-min-microvolt = <3000000>;
651 regulator-max-microvolt = <3000000>;
654 regulator-state-mem {
655 regulator-on-in-suspend;
656 regulator-suspend-microvolt = <3000000>;
660 vcc3v3_s3: SWITCH_REG1 {
661 regulator-name = "vcc3v3_s3";
664 regulator-state-mem {
665 regulator-on-in-suspend;
669 vcc3v3_s0: SWITCH_REG2 {
670 regulator-name = "vcc3v3_s0";
673 regulator-state-mem {
674 regulator-on-in-suspend;
682 cpu-supply = <&vdd_cpu_l>;
686 cpu-supply = <&vdd_cpu_l>;
690 cpu-supply = <&vdd_cpu_l>;
694 cpu-supply = <&vdd_cpu_l>;
698 cpu-supply = <&vdd_cpu_b>;
702 cpu-supply = <&vdd_cpu_b>;
707 mali-supply = <&vdd_gpu>;
715 temperature = <85000>;
719 temperature = <100000>;
723 temperature = <105000>;
732 /* tshut mode 0:CRU 1:GPIO */
733 rockchip,hw-tshut-mode = <1>;
734 /* tshut polarity 0:LOW 1:HIGH */
735 rockchip,hw-tshut-polarity = <1>;
736 rockchip,hw-tshut-temp = <110000>;
744 u2phy0_otg: otg-port {
748 u2phy0_host: host-port {
749 phy-supply = <&vcc5v0_host>;
757 u2phy1_otg: otg-port {
761 u2phy1_host: host-port {
762 phy-supply = <&vcc5v0_host>;
768 pinctrl-names = "default";
769 pinctrl-0 = <&uart0_xfer &uart0_cts>;
799 dr_mode = "peripheral";
819 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH 0>;
820 compatible = "rockchip,remotectl-pwm";
825 rockchip,usercode = <0x4040>;
835 <0xe3 KEY_VOLUMEDOWN>,
852 rockchip,usercode = <0xff00>;
862 <0xeb KEY_VOLUMEDOWN>,
867 <0xa9 KEY_VOLUMEDOWN>,
868 <0xa8 KEY_VOLUMEDOWN>,
869 <0xe0 KEY_VOLUMEDOWN>,
870 <0xa5 KEY_VOLUMEDOWN>,
875 <0xed KEY_VOLUMEDOWN>,
877 <0xb3 KEY_VOLUMEDOWN>,
878 <0xf1 KEY_VOLUMEDOWN>,
879 <0xf2 KEY_VOLUMEDOWN>,
881 <0xb4 KEY_VOLUMEDOWN>,
886 rockchip,usercode = <0x1dcc>;
896 <0xfd KEY_VOLUMEDOWN>,
914 <0xb5 KEY_BACKSPACE>;
919 phy-supply = <&vcc_phy>;
921 clock_in_out = "input";
922 snps,reset-gpio = <&gpio3 15 GPIO_ACTIVE_LOW>;
923 snps,reset-active-low;
924 snps,reset-delays-us = <0 10000 50000>;
925 assigned-clocks = <&cru SCLK_RMII_SRC>;
926 assigned-clock-parents = <&clkin_gmac>;
927 pinctrl-names = "default";
928 pinctrl-0 = <&rgmii_pins>;
939 #include <dt-bindings/display/screen-timing/lcd-box.dtsi>
943 native-mode = <&timing1>; /* 1080p */
951 rockchip,disp-mode = <NO_DUAL>;
952 rockchip,disp-policy = <DISPLAY_POLICY_BOX>;
957 rockchip,hdmi_video_source = <DISPLAY_SOURCE_LCDC0>;
976 wifi_enable_h: wifi-enable-h {
978 <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
983 uart0_gpios: uart0-gpios {
985 <2 19 RK_FUNC_GPIO &pcfg_pull_none>;
990 host_vbus_drv: host-vbus-drv {
992 <4 25 RK_FUNC_GPIO &pcfg_pull_none>;
997 pmic_int_l: pmic-int-l {
999 <1 21 RK_FUNC_GPIO &pcfg_pull_up>;