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-6.0.dtsi"
48 #include "rk3399-opp.dtsi"
51 model = "Rockchip RK3399 VR Board";
52 compatible = "rockchip,vr", "rockchip,rk3399";
55 compatible = "pwm-regulator";
56 pwms = <&pwm2 0 25000 1>;
58 rockchip,pwm_voltage = <900000>;
59 regulator-name = "vdd_log";
60 regulator-min-microvolt = <800000>;
61 regulator-max-microvolt = <1400000>;
67 compatible = "regulator-fixed";
68 regulator-name = "vcc_sys";
71 regulator-min-microvolt = <4000000>;
72 regulator-max-microvolt = <4000000>;
75 vcc3v3_sys: vcc3v3-sys {
76 compatible = "regulator-fixed";
77 regulator-name = "vcc3v3_sys";
80 regulator-min-microvolt = <3300000>;
81 regulator-max-microvolt = <3300000>;
84 vcc_phy: vcc-phy-regulator {
85 compatible = "regulator-fixed";
86 regulator-name = "vcc_phy";
91 vcc1v8_s3: vcc1v8-s3-regulator {
92 compatible = "regulator-fixed";
93 regulator-name = "vcc1v8_s3";
97 regulator-off-in-suspend;
101 dw_hdmi_audio: dw-hdmi-audio {
103 compatible = "rockchip,dw-hdmi-audio";
104 #sound-dai-cells = <0>;
107 hdmi_sound: hdmi-sound {
109 compatible = "simple-audio-card";
110 simple-audio-card,format = "i2s";
111 simple-audio-card,mclk-fs = <256>;
112 simple-audio-card,name = "rockchip,hdmi";
114 simple-audio-card,cpu {
117 simple-audio-card,codec {
118 sound-dai = <&dw_hdmi_audio>;
122 sdio_pwrseq: sdio-pwrseq {
123 compatible = "mmc-pwrseq-simple";
125 clock-names = "ext_clock";
126 pinctrl-names = "default";
127 pinctrl-0 = <&wifi_enable_h>;
130 * On the module itself this is one of these (depending
131 * on the actual card populated):
132 * - SDIO_RESET_L_WL_REG_ON
133 * - PDN (power down when low)
135 reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; /* GPIO0_B2 */
139 compatible = "wlan-platdata";
140 rockchip,grf = <&grf>;
141 wifi_chip_type = "ap6330";
143 WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; /* GPIO0_a3 */
148 compatible = "bluetooth-platdata";
150 clock-names = "ext_clock";
151 //wifi-bt-power-toggle;
152 uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; /* GPIO2_C3 */
153 pinctrl-names = "default", "rts_gpio";
154 pinctrl-0 = <&uart0_rts>;
155 pinctrl-1 = <&uart0_gpios>;
156 //BT,power_gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>; /* GPIOx_xx */
157 BT,reset_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>; /* GPIO0_B1 */
158 BT,wake_gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>; /* GPIO2_D2 */
159 BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>; /* GPIO0_A4 */
164 compatible = "rockchip,uboot-charge";
165 rockchip,uboot-charge-on = <0>;
166 rockchip,android-charge-on = <1>;
171 compatible = "inv-hid,mpu6500";
176 clock-frequency = <150000000>;
177 clock-freq-min-max = <400000 150000000>;
185 vqmmc-supply = <&vcc_sd>;
186 pinctrl-names = "default";
187 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
192 clock-frequency = <50000000>;
193 clock-freq-min-max = <200000 50000000>;
199 keep-power-in-suspend;
200 mmc-pwrseq = <&sdio_pwrseq>;
203 pinctrl-names = "default";
204 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
218 keep-power-in-suspend;
219 mmc-hs400-enhanced-strobe;
225 i2c-scl-rising-time-ns = <219>;
226 i2c-scl-falling-time-ns = <15>;
227 /* clock-frequency = <400000>; */
230 compatible = "fairchild,fusb302";
232 pinctrl-names = "default";
233 pinctrl-0 = <&fusb1_int>;
234 vbus-5v-gpios = <&gpio4 25 GPIO_ACTIVE_HIGH>;
235 int-n-gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
239 vdd_cpu_b: syr827@40 {
240 compatible = "silergy,syr827";
242 vin-supply = <&vcc_sys>;
243 regulator-compatible = "fan53555-reg";
244 pinctrl-0 = <&vsel1_gpio>;
245 vsel-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
246 regulator-name = "vdd_cpu_b";
247 regulator-min-microvolt = <712500>;
248 regulator-max-microvolt = <1500000>;
249 regulator-ramp-delay = <1000>;
250 fcs,suspend-voltage-selector = <1>;
252 regulator-initial-state = <3>;
253 regulator-state-mem {
254 regulator-off-in-suspend;
259 compatible = "silergy,syr828";
261 vin-supply = <&vcc_sys>;
262 regulator-compatible = "fan53555-reg";
263 pinctrl-0 = <&vsel2_gpio>;
264 vsel-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
265 regulator-name = "vdd_gpu";
266 regulator-min-microvolt = <712500>;
267 regulator-max-microvolt = <1500000>;
268 regulator-ramp-delay = <1000>;
269 fcs,suspend-voltage-selector = <1>;
271 regulator-initial-state = <3>;
272 regulator-initial-mode = <1>;/*1:pwm 2: auto mode*/
273 regulator-state-mem {
274 regulator-off-in-suspend;
279 compatible = "rockchip,rk818";
282 clock-output-names = "xin32k", "wifibt_32kin";
283 interrupt-parent = <&gpio1>;
284 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
285 pinctrl-names = "default";
286 pinctrl-0 = <&pmic_int_l>;
287 rockchip,system-power-controller;
292 vcc1-supply = <&vcc_sys>;
293 vcc2-supply = <&vcc_sys>;
294 vcc3-supply = <&vcc_sys>;
295 vcc4-supply = <&vcc_sys>;
296 vcc6-supply = <&vcc_sys>;
297 vcc7-supply = <&vcc3v3_sys>;
298 vcc8-supply = <&vcc_sys>;
299 vcc9-supply = <&vcc3v3_sys>;
302 vdd_cpu_l: DCDC_REG1 {
303 regulator-name = "vdd_cpu_l";
306 regulator-min-microvolt = <750000>;
307 regulator-max-microvolt = <1350000>;
308 regulator-ramp-delay = <6001>;
309 regulator-state-mem {
310 regulator-off-in-suspend;
314 vdd_center: DCDC_REG2 {
315 regulator-name = "vdd_center";
318 regulator-min-microvolt = <800000>;
319 regulator-max-microvolt = <1350000>;
320 regulator-ramp-delay = <6001>;
321 regulator-state-mem {
322 regulator-off-in-suspend;
327 regulator-name = "vcc_ddr";
330 regulator-state-mem {
331 regulator-on-in-suspend;
336 regulator-name = "vcc_1v8";
339 regulator-min-microvolt = <1800000>;
340 regulator-max-microvolt = <1800000>;
341 regulator-state-mem {
342 regulator-on-in-suspend;
343 regulator-suspend-microvolt = <1800000>;
347 vcc1v8_rk1608: LDO_REG1 {
348 //regulator-always-on;
350 regulator-min-microvolt = <1800000>;
351 regulator-max-microvolt = <1800000>;
352 regulator-name = "vcc1v8_rk1608";
353 regulator-state-mem {
354 regulator-off-in-suspend;
358 vdd1v8_rk1608: LDO_REG2 {
359 //regulator-always-on;
361 regulator-min-microvolt = <1800000>;
362 regulator-max-microvolt = <1800000>;
363 regulator-name = "vdd1v8_rk1608";
364 regulator-state-mem {
365 regulator-off-in-suspend;
369 vdd1v0_rk1608: LDO_REG3 {
370 //regulator-always-on;
372 regulator-min-microvolt = <1000000>;
373 regulator-max-microvolt = <1000000>;
374 regulator-name = "vdd1v0_rk1608";
375 regulator-state-mem {
376 regulator-off-in-suspend;
380 vcc_power_on: LDO_REG4 {
383 regulator-min-microvolt = <3300000>;
384 regulator-max-microvolt = <3300000>;
385 regulator-name = "vcc_power_on";
386 regulator-state-mem {
387 regulator-on-in-suspend;
388 regulator-suspend-microvolt = <3300000>;
393 //regulator-always-on;
395 regulator-min-microvolt = <2800000>;
396 regulator-max-microvolt = <2800000>;
397 regulator-name = "vdd_2v8";
398 regulator-state-mem {
399 regulator-on-in-suspend;
400 regulator-suspend-microvolt = <2800000>;
405 //regulator-always-on;
407 regulator-min-microvolt = <1500000>;
408 regulator-max-microvolt = <1500000>;
409 regulator-name = "vcc_1v5";
410 regulator-state-mem {
411 regulator-on-in-suspend;
412 regulator-suspend-microvolt = <1500000>;
416 vcc1v8_dvp: LDO_REG7 {
417 //regulator-always-on;
419 regulator-min-microvolt = <1800000>;
420 regulator-max-microvolt = <1800000>;
421 regulator-name = "vcc1v8_dvp";
422 regulator-state-mem {
423 regulator-on-in-suspend;
424 regulator-suspend-microvolt = <1800000>;
428 vcc3v3_s3: LDO_REG8 {
431 regulator-min-microvolt = <3300000>;
432 regulator-max-microvolt = <3300000>;
433 regulator-name = "vcc3v3_s3";
434 regulator-state-mem {
435 regulator-on-in-suspend;
436 regulator-suspend-microvolt = <3300000>;
443 regulator-min-microvolt = <1800000>;
444 regulator-max-microvolt = <3300000>;
445 regulator-name = "vcc_sd";
446 regulator-state-mem {
447 regulator-on-in-suspend;
448 regulator-suspend-microvolt = <3300000>;
452 vcc3v3_s0: SWITCH_REG {
455 regulator-name = "vcc3v3_s0";
456 regulator-state-mem {
457 regulator-on-in-suspend;
463 compatible = "rk818-battery";
465 3400 3599 3671 3701 3728 3746 3762
466 3772 3781 3792 3816 3836 3866 3910
467 3942 3971 4002 4050 4088 4132 4183>;
468 design_capacity = <4000>;
469 design_qmax = <4100>;
471 max_input_current = <2000>;
472 max_chrg_current = <1800>;
473 max_chrg_voltage = <4200>;
474 sleep_enter_current = <300>;
475 sleep_exit_current = <300>;
476 power_off_thresd = <3400>;
477 zero_algorithm_vol = <3850>;
478 fb_temperature = <115>;
480 max_soc_offset = <60>;
491 i2c-scl-rising-time-ns = <345>;
492 i2c-scl-falling-time-ns = <11>;
495 compatible = "fairchild,fusb302";
497 pinctrl-names = "default";
498 pinctrl-0 = <&fusb0_int>;
499 int-n-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
507 bt656-supply = <&vcc1v8_s3>;
508 audio-supply = <&vcc1v8_s3>;
509 sdmmc-supply = <&vcc_sd>;
510 gpio1830-supply = <&vcc1v8_s3>;
514 temperature = <85000>; /* millicelsius */
518 temperature = <100000>; /* millicelsius */
522 temperature = <105000>; /* millicelsius */
526 rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
527 rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
528 rockchip,hw-tshut-temp = <110000>;
537 compatible = "rockchip,key";
539 io-channels = <&saradc 1>;
542 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
553 u2phy0_otg: otg-port {
562 u2phy1_otg: otg-port {
568 pinctrl-names = "default";
569 pinctrl-0 = <&uart0_xfer &uart0_cts>;
610 #include <dt-bindings/display/screen-timing/lcd-box.dtsi>
614 native-mode = <&timing0>; /* 720p */
618 screen-width = <130>;
623 rockchip,uboot-logo-on = <1>;
624 rockchip,disp-mode = <NO_DUAL>;
625 //rockchip,disp-policy = <DISPLAY_POLICY_BOX>;
638 rockchip,hdmi_video_source = <DISPLAY_SOURCE_LCDC1>;
643 extcon = <&fusb0>, <&fusb1>;
644 dp_vop_sel = <DISPLAY_SOURCE_LCDC0>;
652 cpu-supply = <&vdd_cpu_l>;
656 cpu-supply = <&vdd_cpu_l>;
660 cpu-supply = <&vdd_cpu_l>;
664 cpu-supply = <&vdd_cpu_l>;
668 cpu-supply = <&vdd_cpu_b>;
672 cpu-supply = <&vdd_cpu_b>;
677 mali-supply = <&vdd_gpu>;
682 pmu1830-supply = <&vcc_1v8>;
687 wifi_enable_h: wifi-enable-h {
688 rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
693 uart0_gpios: uart0-gpios {
694 rockchip,pins = <2 19 RK_FUNC_GPIO &pcfg_pull_none>;
699 pmic_int_l: pmic-int-l {
701 <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
704 vsel1_gpio: vsel1-gpio {
706 <1 17 RK_FUNC_GPIO &pcfg_pull_down>;
709 vsel2_gpio: vsel2-gpio {
711 <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
716 spi1_gpio: spi1-gpio {
718 <1 7 RK_FUNC_GPIO &pcfg_output_low>,
719 <1 8 RK_FUNC_GPIO &pcfg_output_low>,
720 <1 9 RK_FUNC_GPIO &pcfg_output_low>,
721 <1 10 RK_FUNC_GPIO &pcfg_output_low>;
726 fusb0_int: fusb0-int {
727 rockchip,pins = <1 2 RK_FUNC_GPIO &pcfg_pull_up>;
730 fusb1_int: fusb1-int {
731 rockchip,pins = <1 24 RK_FUNC_GPIO &pcfg_pull_up>;