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"
46 #include "rk3399-opp.dtsi"
49 compatible = "rockchip,rk3399-box","rockchip,rk3399";
51 vcc1v8_s0: vcc1v8-s0 {
52 compatible = "regulator-fixed";
53 regulator-name = "vcc1v8_s0";
54 regulator-min-microvolt = <1800000>;
55 regulator-max-microvolt = <1800000>;
60 compatible = "regulator-fixed";
61 regulator-name = "vcc_sys";
62 regulator-min-microvolt = <5000000>;
63 regulator-max-microvolt = <5000000>;
67 vcc_phy: vcc-phy-regulator {
68 compatible = "regulator-fixed";
69 regulator-name = "vcc_phy";
74 vcc3v3_sys: vcc3v3-sys {
75 compatible = "regulator-fixed";
76 regulator-name = "vcc3v3_sys";
77 regulator-min-microvolt = <3300000>;
78 regulator-max-microvolt = <3300000>;
80 vin-supply = <&vcc_sys>;
83 vcc5v0_host: vcc5v0-host-regulator {
84 compatible = "regulator-fixed";
86 gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
87 pinctrl-names = "default";
88 pinctrl-0 = <&host_vbus_drv>;
89 regulator-name = "vcc5v0_host";
93 compatible = "pwm-regulator";
94 pwms = <&pwm2 0 25000 0>;
95 regulator-name = "vdd_log";
96 regulator-min-microvolt = <800000>;
97 regulator-max-microvolt = <1400000>;
101 /* for rockchip boot on */
102 rockchip,pwm_id= <2>;
103 rockchip,pwm_voltage = <900000>;
105 vin-supply = <&vcc_sys>;
108 clkin_gmac: external-gmac-clock {
109 compatible = "fixed-clock";
110 clock-frequency = <125000000>;
111 clock-output-names = "clkin_gmac";
117 compatible = "simple-audio-card";
118 simple-audio-card,name = "ROCKCHIP,SPDIF";
119 simple-audio-card,cpu {
120 sound-dai = <&spdif>;
122 simple-audio-card,codec {
123 sound-dai = <&spdif_out>;
127 spdif_out: spdif-out {
129 compatible = "linux,spdif-dit";
130 #sound-dai-cells = <0>;
133 hdmi_sound: hdmi-sound {
135 compatible = "simple-audio-card";
136 simple-audio-card,format = "i2s";
137 simple-audio-card,mclk-fs = <256>;
138 simple-audio-card,name = "rockchip,hdmi";
139 simple-audio-card,cpu {
142 simple-audio-card,codec {
143 sound-dai = <&dw_hdmi_audio>;
147 dw_hdmi_audio: dw-hdmi-audio {
149 compatible = "rockchip,dw-hdmi-audio";
150 #sound-dai-cells = <0>;
153 sdio_pwrseq: sdio-pwrseq {
154 compatible = "mmc-pwrseq-simple";
156 clock-names = "ext_clock";
157 pinctrl-names = "default";
158 pinctrl-0 = <&wifi_enable_h>;
161 * On the module itself this is one of these (depending
162 * on the actual card populated):
163 * - SDIO_RESET_L_WL_REG_ON
164 * - PDN (power down when low)
166 reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
170 compatible = "wlan-platdata";
171 rockchip,grf = <&grf>;
172 wifi_chip_type = "ap6354";
174 WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>;
179 compatible = "bluetooth-platdata";
181 clock-names = "ext_clock";
182 /* wifi-bt-power-toggle; */
183 uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
184 pinctrl-names = "default", "rts_gpio";
185 pinctrl-0 = <&uart0_rts>;
186 pinctrl-1 = <&uart0_gpios>;
187 /* BT,power_gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>; */
188 BT,reset_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
189 BT,wake_gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>;
190 BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>;
200 clock-frequency = <100000000>;
201 clock-freq-min-max = <100000 100000000>;
209 vqmmc-supply = <&vcc_sd>;
210 pinctrl-names = "default";
211 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
212 card-detect-delay = <800>;
217 clock-frequency = <100000000>;
218 clock-freq-min-max = <200000 100000000>;
224 keep-power-in-suspend;
225 mmc-pwrseq = <&sdio_pwrseq>;
228 pinctrl-names = "default";
229 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
235 freq-sel = <200000000>;
246 mmc-hs400-enhanced-strobe;
252 rockchip,i2s-broken-burst-len;
253 rockchip,playback-channels = <8>;
254 rockchip,capture-channels = <8>;
255 #sound-dai-cells = <0>;
259 #sound-dai-cells = <0>;
263 pinctrl-0 = <&spdif_bus_1>;
265 #sound-dai-cells = <0>;
270 i2c-scl-rising-time-ns = <168>;
271 i2c-scl-falling-time-ns = <4>;
272 clock-frequency = <400000>;
274 vdd_cpu_b: syr827@40 {
275 compatible = "silergy,syr827";
277 regulator-compatible = "fan53555-reg";
278 regulator-name = "vdd_cpu_b";
279 regulator-min-microvolt = <712500>;
280 regulator-max-microvolt = <1500000>;
281 regulator-ramp-delay = <1000>;
282 fcs,suspend-voltage-selector = <0>;
285 vin-supply = <&vcc_sys>;
286 regulator-state-mem {
287 regulator-off-in-suspend;
292 compatible = "silergy,syr828";
294 regulator-compatible = "fan53555-reg";
295 regulator-name = "vdd_gpu";
296 regulator-min-microvolt = <712500>;
297 regulator-max-microvolt = <1500000>;
298 regulator-ramp-delay = <1000>;
299 fcs,suspend-voltage-selector = <1>;
302 vin-supply = <&vcc_sys>;
303 regulator-initial-mode = <1>; /* 1:force PWM 2:auto */
304 regulator-state-mem {
305 regulator-off-in-suspend;
310 compatible = "rockchip,rk808";
312 interrupt-parent = <&gpio1>;
313 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
314 pinctrl-names = "default";
315 pinctrl-0 = <&pmic_int_l>;
316 rockchip,system-power-controller;
319 clock-output-names = "xin32k", "rk808-clkout2";
321 vcc1-supply = <&vcc_sys>;
322 vcc2-supply = <&vcc_sys>;
323 vcc3-supply = <&vcc_sys>;
324 vcc4-supply = <&vcc_sys>;
325 vcc6-supply = <&vcc_sys>;
326 vcc7-supply = <&vcc_sys>;
327 vcc8-supply = <&vcc3v3_sys>;
328 vcc9-supply = <&vcc_sys>;
329 vcc10-supply = <&vcc_sys>;
330 vcc11-supply = <&vcc_sys>;
331 vcc12-supply = <&vcc3v3_sys>;
332 vddio-supply = <&vcc_1v8>;
335 vdd_center: DCDC_REG1 {
336 regulator-name = "vdd_center";
337 regulator-min-microvolt = <750000>;
338 regulator-max-microvolt = <1350000>;
339 regulator-ramp-delay = <6001>;
342 regulator-state-mem {
343 regulator-off-in-suspend;
347 vdd_cpu_l: DCDC_REG2 {
348 regulator-name = "vdd_cpu_l";
349 regulator-min-microvolt = <750000>;
350 regulator-max-microvolt = <1350000>;
351 regulator-ramp-delay = <6001>;
354 regulator-state-mem {
355 regulator-off-in-suspend;
360 regulator-name = "vcc_ddr";
363 regulator-state-mem {
364 regulator-on-in-suspend;
369 regulator-name = "vcc_1v8";
370 regulator-min-microvolt = <1800000>;
371 regulator-max-microvolt = <1800000>;
374 regulator-state-mem {
375 regulator-on-in-suspend;
376 regulator-suspend-microvolt = <1800000>;
380 vcc1v8_dvp: LDO_REG1 {
381 regulator-name = "vcc1v8_dvp";
382 regulator-min-microvolt = <1800000>;
383 regulator-max-microvolt = <1800000>;
386 regulator-state-mem {
387 regulator-on-in-suspend;
388 regulator-suspend-microvolt = <1800000>;
392 vcca1v8_hdmi: LDO_REG2 {
393 regulator-name = "vcca1v8_hdmi";
394 regulator-min-microvolt = <1800000>;
395 regulator-max-microvolt = <1800000>;
398 regulator-state-mem {
399 regulator-on-in-suspend;
400 regulator-suspend-microvolt = <1800000>;
405 regulator-name = "vcca_1v8";
406 regulator-min-microvolt = <1800000>;
407 regulator-max-microvolt = <1800000>;
410 regulator-state-mem {
411 regulator-on-in-suspend;
412 regulator-suspend-microvolt = <1800000>;
417 regulator-name = "vcc_sd";
418 regulator-min-microvolt = <1800000>;
419 regulator-max-microvolt = <3300000>;
422 regulator-state-mem {
423 regulator-on-in-suspend;
424 regulator-suspend-microvolt = <3300000>;
428 vcc3v0_sd: LDO_REG5 {
429 regulator-name = "vcc3v0_sd";
430 regulator-min-microvolt = <3000000>;
431 regulator-max-microvolt = <3000000>;
434 regulator-state-mem {
435 regulator-on-in-suspend;
436 regulator-suspend-microvolt = <3000000>;
441 regulator-name = "vcc_1v5";
442 regulator-min-microvolt = <1500000>;
443 regulator-max-microvolt = <1500000>;
446 regulator-state-mem {
447 regulator-on-in-suspend;
448 regulator-suspend-microvolt = <1500000>;
452 vcca0v9_hdmi: LDO_REG7 {
453 regulator-name = "vcca0v9_hdmi";
454 regulator-min-microvolt = <900000>;
455 regulator-max-microvolt = <900000>;
458 regulator-state-mem {
459 regulator-on-in-suspend;
460 regulator-suspend-microvolt = <900000>;
465 regulator-name = "vcc_3v0";
466 regulator-min-microvolt = <3000000>;
467 regulator-max-microvolt = <3000000>;
470 regulator-state-mem {
471 regulator-on-in-suspend;
472 regulator-suspend-microvolt = <3000000>;
476 vcc3v3_s3: SWITCH_REG1 {
477 regulator-name = "vcc3v3_s3";
480 regulator-state-mem {
481 regulator-on-in-suspend;
485 vcc3v3_s0: SWITCH_REG2 {
486 regulator-name = "vcc3v3_s0";
489 regulator-state-mem {
490 regulator-on-in-suspend;
498 cpu-supply = <&vdd_cpu_l>;
502 cpu-supply = <&vdd_cpu_l>;
506 cpu-supply = <&vdd_cpu_l>;
510 cpu-supply = <&vdd_cpu_l>;
514 cpu-supply = <&vdd_cpu_b>;
518 cpu-supply = <&vdd_cpu_b>;
523 mali-supply = <&vdd_gpu>;
531 temperature = <85000>;
535 temperature = <100000>;
539 temperature = <105000>;
552 /* tshut mode 0:CRU 1:GPIO */
553 rockchip,hw-tshut-mode = <1>;
554 /* tshut polarity 0:LOW 1:HIGH */
555 rockchip,hw-tshut-polarity = <1>;
556 rockchip,hw-tshut-temp = <110000>;
564 u2phy0_otg: otg-port {
568 u2phy0_host: host-port {
569 phy-supply = <&vcc5v0_host>;
577 u2phy1_otg: otg-port {
581 u2phy1_host: host-port {
582 phy-supply = <&vcc5v0_host>;
588 pinctrl-names = "default";
589 pinctrl-0 = <&uart0_xfer &uart0_cts>;
639 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH 0>;
640 compatible = "rockchip,remotectl-pwm";
645 rockchip,usercode = <0x4040>;
655 <0xe3 KEY_VOLUMEDOWN>,
672 rockchip,usercode = <0xff00>;
682 <0xeb KEY_VOLUMEDOWN>,
687 <0xa9 KEY_VOLUMEDOWN>,
688 <0xa8 KEY_VOLUMEDOWN>,
689 <0xe0 KEY_VOLUMEDOWN>,
690 <0xa5 KEY_VOLUMEDOWN>,
695 <0xed KEY_VOLUMEDOWN>,
697 <0xb3 KEY_VOLUMEDOWN>,
698 <0xf1 KEY_VOLUMEDOWN>,
699 <0xf2 KEY_VOLUMEDOWN>,
701 <0xb4 KEY_VOLUMEDOWN>,
706 rockchip,usercode = <0x1dcc>;
716 <0xfd KEY_VOLUMEDOWN>,
734 <0xb5 KEY_BACKSPACE>;
739 phy-supply = <&vcc_phy>;
741 clock_in_out = "input";
742 snps,reset-gpio = <&gpio3 15 GPIO_ACTIVE_LOW>;
743 snps,reset-active-low;
744 snps,reset-delays-us = <0 10000 50000>;
745 assigned-clocks = <&cru SCLK_RMII_SRC>;
746 assigned-clock-parents = <&clkin_gmac>;
747 pinctrl-names = "default", "sleep";
748 pinctrl-0 = <&rgmii_pins>;
749 pinctrl-1 = <&rgmii_sleep_pins>;
760 #include <dt-bindings/display/screen-timing/lcd-box.dtsi>
764 native-mode = <&timing1>; /* 1080p */
776 rockchip,disp-policy = <DISPLAY_POLICY_BOX>;
781 rockchip,hdmi_video_source = <DISPLAY_SOURCE_LCDC0>;
783 <165000000 0 0 17 18 18 18>,
784 <340000000 0 2 17 14 14 14>,
785 <594000000 0 2 17 9 9 9>;
796 dp_vop_sel = <DISPLAY_SOURCE_LCDC1>;
806 bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */
807 audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */
808 sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */
809 gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */
814 wifi_enable_h: wifi-enable-h {
816 <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
821 uart0_gpios: uart0-gpios {
823 <2 19 RK_FUNC_GPIO &pcfg_pull_none>;
828 host_vbus_drv: host-vbus-drv {
830 <4 25 RK_FUNC_GPIO &pcfg_pull_none>;
835 pmic_int_l: pmic-int-l {
837 <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
842 rgmii_sleep_pins: rgmii-sleep-pins {
844 <3 15 RK_FUNC_GPIO &pcfg_output_low>;
859 pmu1830-supply = <&vcc_1v8>;