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.
44 #include <dt-bindings/pwm/pwm.h>
45 #include <dt-bindings/sensor-dev.h>
46 #include "rk3399.dtsi"
47 #include "rk3399-android.dtsi"
50 model = "Rockchip RK3399 VR Board";
51 compatible = "rockchip,vr", "rockchip,rk3399";
54 compatible = "pwm-regulator";
55 pwms = <&pwm2 0 25000 0>;
57 rockchip,pwm_voltage = <900000>;
58 regulator-name = "vdd_log";
59 regulator-min-microvolt = <800000>;
60 regulator-max-microvolt = <1400000>;
66 compatible = "regulator-fixed";
67 regulator-name = "vcc_sys";
70 regulator-min-microvolt = <4000000>;
71 regulator-max-microvolt = <4000000>;
74 vcc3v3_sys: vcc3v3-sys {
75 compatible = "regulator-fixed";
76 regulator-name = "vcc3v3_sys";
79 regulator-min-microvolt = <3300000>;
80 regulator-max-microvolt = <3300000>;
83 vcc_phy: vcc-phy-regulator {
84 compatible = "regulator-fixed";
85 regulator-name = "vcc_phy";
90 vcc1v8_s3: vcc1v8-s3-regulator {
91 compatible = "regulator-fixed";
92 regulator-name = "vcc1v8_s3";
96 regulator-off-in-suspend;
101 compatible = "rockchip,rk3399-io-voltage-domain";
102 rockchip,grf = <&grf>;
104 bt656-supply = <&vcc1v8_s3>;
105 audio-supply = <&vcc1v8_s3>;
106 sdmmc-supply = <&vcc_sd>;
107 gpio1830-supply = <&vcc1v8_s3>;
111 compatible = "rockchip,rk3399-pmu-io-voltage-domain";
112 rockchip,grf = <&pmugrf>;
113 pmu1830-supply = <&vcc_1v8>;
116 dw_hdmi_audio: dw-hdmi-audio {
118 compatible = "rockchip,dw-hdmi-audio";
119 #sound-dai-cells = <0>;
122 hdmi_sound: hdmi-sound {
124 compatible = "simple-audio-card";
125 simple-audio-card,format = "i2s";
126 simple-audio-card,mclk-fs = <256>;
127 simple-audio-card,name = "rockchip,hdmi";
129 simple-audio-card,cpu {
132 simple-audio-card,codec {
133 sound-dai = <&dw_hdmi_audio>;
137 sdio_pwrseq: sdio-pwrseq {
138 compatible = "mmc-pwrseq-simple";
140 clock-names = "ext_clock";
141 pinctrl-names = "default";
142 pinctrl-0 = <&wifi_enable_h>;
145 * On the module itself this is one of these (depending
146 * on the actual card populated):
147 * - SDIO_RESET_L_WL_REG_ON
148 * - PDN (power down when low)
150 reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; /* GPIO0_B2 */
154 compatible = "wlan-platdata";
155 rockchip,grf = <&grf>;
156 wifi_chip_type = "ap6330";
158 WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; /* GPIO0_a3 */
163 compatible = "bluetooth-platdata";
165 clock-names = "ext_clock";
166 //wifi-bt-power-toggle;
167 uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; /* GPIO2_C3 */
168 pinctrl-names = "default", "rts_gpio";
169 pinctrl-0 = <&uart0_rts>;
170 pinctrl-1 = <&uart0_gpios>;
171 //BT,power_gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>; /* GPIOx_xx */
172 BT,reset_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>; /* GPIO0_B1 */
173 BT,wake_gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>; /* GPIO2_D2 */
174 BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>; /* GPIO0_A4 */
179 compatible = "rockchip,uboot-charge";
180 rockchip,uboot-charge-on = <0>;
181 rockchip,android-charge-on = <1>;
186 compatible = "inv-hid,mpu6500";
192 opp-hz = /bits/ 64 <408000000>;
193 opp-microvolt = <800000>;
194 clock-latency-ns = <40000>;
197 opp-hz = /bits/ 64 <600000000>;
198 opp-microvolt = <800000>;
199 clock-latency-ns = <40000>;
202 opp-hz = /bits/ 64 <816000000>;
203 opp-microvolt = <800000>;
204 clock-latency-ns = <40000>;
207 opp-hz = /bits/ 64 <1008000000>;
208 opp-microvolt = <850000>;
209 clock-latency-ns = <40000>;
212 opp-hz = /bits/ 64 <1200000000>;
213 opp-microvolt = <925000>;
214 clock-latency-ns = <40000>;
217 opp-hz = /bits/ 64 <1416000000>;
218 opp-microvolt = <1075000>;
219 clock-latency-ns = <40000>;
222 opp-hz = /bits/ 64 <1512000000>;
223 opp-microvolt = <1100000>;
224 clock-latency-ns = <40000>;
231 opp-hz = /bits/ 64 <408000000>;
232 opp-microvolt = <800000>;
233 clock-latency-ns = <40000>;
236 opp-hz = /bits/ 64 <600000000>;
237 opp-microvolt = <800000>;
238 clock-latency-ns = <40000>;
241 opp-hz = /bits/ 64 <816000000>;
242 opp-microvolt = <825000>;
243 clock-latency-ns = <40000>;
246 opp-hz = /bits/ 64 <1008000000>;
247 opp-microvolt = <850000>;
248 clock-latency-ns = <40000>;
251 opp-hz = /bits/ 64 <1200000000>;
252 opp-microvolt = <900000>;
253 clock-latency-ns = <40000>;
256 opp-hz = /bits/ 64 <1416000000>;
257 opp-microvolt = <1000000>;
258 clock-latency-ns = <40000>;
261 opp-hz = /bits/ 64 <1608000000>;
262 opp-microvolt = <1050000>;
263 clock-latency-ns = <40000>;
266 opp-hz = /bits/ 64 <1800000000>;
267 opp-microvolt = <1150000>;
268 clock-latency-ns = <40000>;
271 opp-hz = /bits/ 64 <1992000000>;
272 opp-microvolt = <1225000>;
273 clock-latency-ns = <40000>;
282 518 335 /* 1008MHz */
283 617 428 /* 1200MHz */
284 728 573 /* 1416MHz */
285 827 724 /* 1608MHz */
286 925 900 /* 1800MHz */
287 1024 1108 /* 1992MHz */
318 518 335 /* 1008MHz */
319 617 428 /* 1200MHz */
320 728 573 /* 1416MHz */
321 827 724 /* 1608MHz */
322 925 900 /* 1800MHz */
323 1024 1108 /* 1992MHz */
350 compatible = "operating-points-v2";
353 opp-hz = /bits/ 64 <200000000>;
354 opp-microvolt = <825000>;
357 opp-hz = /bits/ 64 <300000000>;
358 opp-microvolt = <850000>;
361 opp-hz = /bits/ 64 <400000000>;
362 opp-microvolt = <875000>;
365 opp-hz = /bits/ 64 <500000000>;
366 opp-microvolt = <950000>;
369 opp-hz = /bits/ 64 <600000000>;
370 opp-microvolt = <1025000>;
373 opp-hz = /bits/ 64 <800000000>;
374 opp-microvolt = <1125000>;
379 clock-frequency = <150000000>;
380 clock-freq-min-max = <400000 150000000>;
388 vqmmc-supply = <&vcc_sd>;
389 pinctrl-names = "default";
390 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
395 clock-frequency = <50000000>;
396 clock-freq-min-max = <200000 50000000>;
402 keep-power-in-suspend;
403 mmc-pwrseq = <&sdio_pwrseq>;
406 pinctrl-names = "default";
407 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
421 keep-power-in-suspend;
422 mmc-hs400-enhanced-strobe;
428 i2c-scl-rising-time-ns = <219>;
429 i2c-scl-falling-time-ns = <15>;
430 /* clock-frequency = <400000>; */
433 compatible = "fairchild,fusb302";
435 pinctrl-names = "default";
436 pinctrl-0 = <&fusb1_int>;
437 vbus-5v-gpios = <&gpio4 25 GPIO_ACTIVE_HIGH>;
438 int-n-gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
442 vdd_cpu_b: syr827@40 {
443 compatible = "silergy,syr827";
445 vin-supply = <&vcc_sys>;
446 regulator-compatible = "fan53555-reg";
447 pinctrl-0 = <&vsel1_gpio>;
448 vsel-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
449 regulator-name = "vdd_cpu_b";
450 regulator-min-microvolt = <712500>;
451 regulator-max-microvolt = <1500000>;
452 regulator-ramp-delay = <1000>;
453 fcs,suspend-voltage-selector = <1>;
455 regulator-initial-state = <3>;
456 regulator-state-mem {
457 regulator-off-in-suspend;
462 compatible = "silergy,syr828";
464 vin-supply = <&vcc_sys>;
465 regulator-compatible = "fan53555-reg";
466 pinctrl-0 = <&vsel2_gpio>;
467 vsel-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
468 regulator-name = "vdd_gpu";
469 regulator-min-microvolt = <712500>;
470 regulator-max-microvolt = <1500000>;
471 regulator-ramp-delay = <1000>;
472 fcs,suspend-voltage-selector = <1>;
474 regulator-initial-state = <3>;
475 regulator-initial-mode = <1>;/*1:pwm 2: auto mode*/
476 regulator-state-mem {
477 regulator-off-in-suspend;
482 compatible = "rockchip,rk818";
485 clock-output-names = "xin32k", "wifibt_32kin";
486 interrupt-parent = <&gpio1>;
487 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
488 pinctrl-names = "default";
489 pinctrl-0 = <&pmic_int_l>;
490 rockchip,system-power-controller;
495 vcc1-supply = <&vcc_sys>;
496 vcc2-supply = <&vcc_sys>;
497 vcc3-supply = <&vcc_sys>;
498 vcc4-supply = <&vcc_sys>;
499 vcc6-supply = <&vcc_sys>;
500 vcc7-supply = <&vcc3v3_sys>;
501 vcc8-supply = <&vcc_sys>;
502 vcc9-supply = <&vcc3v3_sys>;
505 vdd_cpu_l: DCDC_REG1 {
506 regulator-name = "vdd_cpu_l";
509 regulator-min-microvolt = <750000>;
510 regulator-max-microvolt = <1350000>;
511 regulator-ramp-delay = <6001>;
512 regulator-state-mem {
513 regulator-off-in-suspend;
517 vdd_center: DCDC_REG2 {
518 regulator-name = "vdd_center";
521 regulator-min-microvolt = <800000>;
522 regulator-max-microvolt = <1350000>;
523 regulator-ramp-delay = <6001>;
524 regulator-state-mem {
525 regulator-off-in-suspend;
530 regulator-name = "vcc_ddr";
533 regulator-state-mem {
534 regulator-on-in-suspend;
539 regulator-name = "vcc_1v8";
542 regulator-min-microvolt = <1800000>;
543 regulator-max-microvolt = <1800000>;
544 regulator-state-mem {
545 regulator-on-in-suspend;
546 regulator-suspend-microvolt = <1800000>;
550 vcc1v8_rk1608: LDO_REG1 {
551 //regulator-always-on;
553 regulator-min-microvolt = <1800000>;
554 regulator-max-microvolt = <1800000>;
555 regulator-name = "vcc1v8_rk1608";
556 regulator-state-mem {
557 regulator-off-in-suspend;
561 vdd1v8_rk1608: LDO_REG2 {
562 //regulator-always-on;
564 regulator-min-microvolt = <1800000>;
565 regulator-max-microvolt = <1800000>;
566 regulator-name = "vdd1v8_rk1608";
567 regulator-state-mem {
568 regulator-off-in-suspend;
572 vdd1v0_rk1608: LDO_REG3 {
573 //regulator-always-on;
575 regulator-min-microvolt = <1000000>;
576 regulator-max-microvolt = <1000000>;
577 regulator-name = "vdd1v0_rk1608";
578 regulator-state-mem {
579 regulator-off-in-suspend;
583 vcc_power_on: LDO_REG4 {
586 regulator-min-microvolt = <3300000>;
587 regulator-max-microvolt = <3300000>;
588 regulator-name = "vcc_power_on";
589 regulator-state-mem {
590 regulator-on-in-suspend;
591 regulator-suspend-microvolt = <3300000>;
596 //regulator-always-on;
598 regulator-min-microvolt = <2800000>;
599 regulator-max-microvolt = <2800000>;
600 regulator-name = "vdd_2v8";
601 regulator-state-mem {
602 regulator-on-in-suspend;
603 regulator-suspend-microvolt = <2800000>;
608 //regulator-always-on;
610 regulator-min-microvolt = <1500000>;
611 regulator-max-microvolt = <1500000>;
612 regulator-name = "vcc_1v5";
613 regulator-state-mem {
614 regulator-on-in-suspend;
615 regulator-suspend-microvolt = <1500000>;
619 vcc1v8_dvp: LDO_REG7 {
620 //regulator-always-on;
622 regulator-min-microvolt = <1800000>;
623 regulator-max-microvolt = <1800000>;
624 regulator-name = "vcc1v8_dvp";
625 regulator-state-mem {
626 regulator-on-in-suspend;
627 regulator-suspend-microvolt = <1800000>;
631 vcc3v3_s3: LDO_REG8 {
634 regulator-min-microvolt = <3300000>;
635 regulator-max-microvolt = <3300000>;
636 regulator-name = "vcc3v3_s3";
637 regulator-state-mem {
638 regulator-on-in-suspend;
639 regulator-suspend-microvolt = <3300000>;
646 regulator-min-microvolt = <1800000>;
647 regulator-max-microvolt = <3300000>;
648 regulator-name = "vcc_sd";
649 regulator-state-mem {
650 regulator-on-in-suspend;
651 regulator-suspend-microvolt = <3300000>;
655 vcc3v3_s0: SWITCH_REG {
658 regulator-name = "vcc3v3_s0";
659 regulator-state-mem {
660 regulator-on-in-suspend;
666 compatible = "rk818-battery";
668 3400 3599 3671 3701 3728 3746 3762
669 3772 3781 3792 3816 3836 3866 3910
670 3942 3971 4002 4050 4088 4132 4183>;
671 design_capacity = <4000>;
672 design_qmax = <4100>;
674 max_input_current = <2000>;
675 max_chrg_current = <1800>;
676 max_chrg_voltage = <4200>;
677 sleep_enter_current = <300>;
678 sleep_exit_current = <300>;
679 power_off_thresd = <3400>;
680 zero_algorithm_vol = <3850>;
681 fb_temperature = <115>;
683 max_soc_offset = <60>;
694 i2c-scl-rising-time-ns = <345>;
695 i2c-scl-falling-time-ns = <11>;
698 compatible = "fairchild,fusb302";
700 pinctrl-names = "default";
701 pinctrl-0 = <&fusb0_int>;
702 int-n-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
708 temperature = <85000>; /* millicelsius */
712 temperature = <100000>; /* millicelsius */
716 temperature = <105000>; /* millicelsius */
720 rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
721 rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
722 rockchip,hw-tshut-temp = <110000>;
731 compatible = "rockchip,key";
733 io-channels = <&saradc 1>;
736 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
747 u2phy0_otg: otg-port {
756 u2phy1_otg: otg-port {
762 pinctrl-names = "default";
763 pinctrl-0 = <&uart0_xfer &uart0_cts>;
804 #include <dt-bindings/display/screen-timing/lcd-box.dtsi>
808 native-mode = <&timing0>; /* 720p */
812 screen-width = <130>;
817 rockchip,uboot-logo-on = <1>;
818 rockchip,disp-mode = <NO_DUAL>;
819 //rockchip,disp-policy = <DISPLAY_POLICY_BOX>;
832 rockchip,hdmi_video_source = <DISPLAY_SOURCE_LCDC1>;
837 extcon = <&fusb0>, <&fusb1>;
838 dp_vop_sel = <DISPLAY_SOURCE_LCDC0>;
846 cpu-supply = <&vdd_cpu_l>;
850 cpu-supply = <&vdd_cpu_l>;
854 cpu-supply = <&vdd_cpu_l>;
858 cpu-supply = <&vdd_cpu_l>;
862 cpu-supply = <&vdd_cpu_b>;
866 cpu-supply = <&vdd_cpu_b>;
871 mali-supply = <&vdd_gpu>;
876 wifi_enable_h: wifi-enable-h {
877 rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
882 uart0_gpios: uart0-gpios {
883 rockchip,pins = <2 19 RK_FUNC_GPIO &pcfg_pull_none>;
888 pmic_int_l: pmic-int-l {
890 <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
893 vsel1_gpio: vsel1-gpio {
895 <1 17 RK_FUNC_GPIO &pcfg_pull_down>;
898 vsel2_gpio: vsel2-gpio {
900 <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
905 spi1_gpio: spi1-gpio {
907 <1 7 RK_FUNC_GPIO &pcfg_output_low>,
908 <1 8 RK_FUNC_GPIO &pcfg_output_low>,
909 <1 9 RK_FUNC_GPIO &pcfg_output_low>,
910 <1 10 RK_FUNC_GPIO &pcfg_output_low>;
915 fusb0_int: fusb0-int {
916 rockchip,pins = <1 2 RK_FUNC_GPIO &pcfg_pull_up>;
919 fusb1_int: fusb1-int {
920 rockchip,pins = <1 24 RK_FUNC_GPIO &pcfg_pull_up>;