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";
94 compatible = "pwm-regulator";
95 pwms = <&pwm2 0 25000 0>;
96 regulator-name = "vdd_log";
97 regulator-min-microvolt = <800000>;
98 regulator-max-microvolt = <1400000>;
102 /* for rockchip boot on */
103 rockchip,pwm_id= <2>;
104 rockchip,pwm_voltage = <900000>;
106 vin-supply = <&vcc_sys>;
109 clkin_gmac: external-gmac-clock {
110 compatible = "fixed-clock";
111 clock-frequency = <125000000>;
112 clock-output-names = "clkin_gmac";
118 compatible = "simple-audio-card";
119 simple-audio-card,name = "ROCKCHIP,SPDIF";
120 simple-audio-card,cpu {
121 sound-dai = <&spdif>;
123 simple-audio-card,codec {
124 sound-dai = <&spdif_out>;
128 spdif_out: spdif-out {
130 compatible = "linux,spdif-dit";
131 #sound-dai-cells = <0>;
134 hdmi_sound: hdmi-sound {
136 compatible = "simple-audio-card";
137 simple-audio-card,format = "i2s";
138 simple-audio-card,mclk-fs = <256>;
139 simple-audio-card,name = "rockchip,hdmi";
140 simple-audio-card,cpu {
143 simple-audio-card,codec {
144 sound-dai = <&dw_hdmi_audio>;
148 dw_hdmi_audio: dw-hdmi-audio {
150 compatible = "rockchip,dw-hdmi-audio";
151 #sound-dai-cells = <0>;
154 sdio_pwrseq: sdio-pwrseq {
155 compatible = "mmc-pwrseq-simple";
157 clock-names = "ext_clock";
158 pinctrl-names = "default";
159 pinctrl-0 = <&wifi_enable_h>;
162 * On the module itself this is one of these (depending
163 * on the actual card populated):
164 * - SDIO_RESET_L_WL_REG_ON
165 * - PDN (power down when low)
167 reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
171 compatible = "wlan-platdata";
172 rockchip,grf = <&grf>;
173 wifi_chip_type = "ap6354";
175 WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>;
180 compatible = "bluetooth-platdata";
182 clock-names = "ext_clock";
183 /* wifi-bt-power-toggle; */
184 uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
185 pinctrl-names = "default", "rts_gpio";
186 pinctrl-0 = <&uart0_rts>;
187 pinctrl-1 = <&uart0_gpios>;
188 /* BT,power_gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>; */
189 BT,reset_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
190 BT,wake_gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>;
191 BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>;
201 clock-frequency = <100000000>;
202 clock-freq-min-max = <100000 100000000>;
210 vqmmc-supply = <&vcc_sd>;
211 pinctrl-names = "default";
212 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
213 card-detect-delay = <800>;
218 clock-frequency = <100000000>;
219 clock-freq-min-max = <200000 100000000>;
225 keep-power-in-suspend;
226 mmc-pwrseq = <&sdio_pwrseq>;
229 pinctrl-names = "default";
230 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
236 freq-sel = <200000000>;
247 mmc-hs400-enhanced-strobe;
253 rockchip,i2s-broken-burst-len;
254 rockchip,playback-channels = <8>;
255 rockchip,capture-channels = <8>;
256 #sound-dai-cells = <0>;
260 #sound-dai-cells = <0>;
264 pinctrl-0 = <&spdif_bus_1>;
266 #sound-dai-cells = <0>;
271 i2c-scl-rising-time-ns = <168>;
272 i2c-scl-falling-time-ns = <4>;
273 clock-frequency = <400000>;
275 vdd_cpu_b: syr827@40 {
276 compatible = "silergy,syr827";
278 regulator-compatible = "fan53555-reg";
279 regulator-name = "vdd_cpu_b";
280 regulator-min-microvolt = <712500>;
281 regulator-max-microvolt = <1500000>;
282 regulator-ramp-delay = <1000>;
283 fcs,suspend-voltage-selector = <0>;
286 vin-supply = <&vcc_sys>;
287 regulator-state-mem {
288 regulator-off-in-suspend;
293 compatible = "silergy,syr828";
295 regulator-compatible = "fan53555-reg";
296 regulator-name = "vdd_gpu";
297 regulator-min-microvolt = <712500>;
298 regulator-max-microvolt = <1500000>;
299 regulator-ramp-delay = <1000>;
300 fcs,suspend-voltage-selector = <1>;
303 vin-supply = <&vcc_sys>;
304 regulator-initial-mode = <1>; /* 1:force PWM 2:auto */
305 regulator-state-mem {
306 regulator-off-in-suspend;
311 compatible = "rockchip,rk808";
313 interrupt-parent = <&gpio1>;
314 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
315 pinctrl-names = "default";
316 pinctrl-0 = <&pmic_int_l>;
317 rockchip,system-power-controller;
320 clock-output-names = "xin32k", "rk808-clkout2";
322 vcc1-supply = <&vcc_sys>;
323 vcc2-supply = <&vcc_sys>;
324 vcc3-supply = <&vcc_sys>;
325 vcc4-supply = <&vcc_sys>;
326 vcc6-supply = <&vcc_sys>;
327 vcc7-supply = <&vcc_sys>;
328 vcc8-supply = <&vcc3v3_sys>;
329 vcc9-supply = <&vcc_sys>;
330 vcc10-supply = <&vcc_sys>;
331 vcc11-supply = <&vcc_sys>;
332 vcc12-supply = <&vcc3v3_sys>;
333 vddio-supply = <&vcc_1v8>;
336 vdd_center: DCDC_REG1 {
337 regulator-name = "vdd_center";
338 regulator-min-microvolt = <750000>;
339 regulator-max-microvolt = <1350000>;
340 regulator-ramp-delay = <6001>;
343 regulator-state-mem {
344 regulator-off-in-suspend;
348 vdd_cpu_l: DCDC_REG2 {
349 regulator-name = "vdd_cpu_l";
350 regulator-min-microvolt = <750000>;
351 regulator-max-microvolt = <1350000>;
352 regulator-ramp-delay = <6001>;
355 regulator-state-mem {
356 regulator-off-in-suspend;
361 regulator-name = "vcc_ddr";
364 regulator-state-mem {
365 regulator-on-in-suspend;
370 regulator-name = "vcc_1v8";
371 regulator-min-microvolt = <1800000>;
372 regulator-max-microvolt = <1800000>;
375 regulator-state-mem {
376 regulator-on-in-suspend;
377 regulator-suspend-microvolt = <1800000>;
381 vcc1v8_dvp: LDO_REG1 {
382 regulator-name = "vcc1v8_dvp";
383 regulator-min-microvolt = <1800000>;
384 regulator-max-microvolt = <1800000>;
387 regulator-state-mem {
388 regulator-on-in-suspend;
389 regulator-suspend-microvolt = <1800000>;
393 vcca1v8_hdmi: LDO_REG2 {
394 regulator-name = "vcca1v8_hdmi";
395 regulator-min-microvolt = <1800000>;
396 regulator-max-microvolt = <1800000>;
399 regulator-state-mem {
400 regulator-on-in-suspend;
401 regulator-suspend-microvolt = <1800000>;
406 regulator-name = "vcca_1v8";
407 regulator-min-microvolt = <1800000>;
408 regulator-max-microvolt = <1800000>;
411 regulator-state-mem {
412 regulator-on-in-suspend;
413 regulator-suspend-microvolt = <1800000>;
418 regulator-name = "vcc_sd";
419 regulator-min-microvolt = <1800000>;
420 regulator-max-microvolt = <3300000>;
423 regulator-state-mem {
424 regulator-on-in-suspend;
425 regulator-suspend-microvolt = <3300000>;
429 vcc3v0_sd: LDO_REG5 {
430 regulator-name = "vcc3v0_sd";
431 regulator-min-microvolt = <3000000>;
432 regulator-max-microvolt = <3000000>;
435 regulator-state-mem {
436 regulator-on-in-suspend;
437 regulator-suspend-microvolt = <3000000>;
442 regulator-name = "vcc_1v5";
443 regulator-min-microvolt = <1500000>;
444 regulator-max-microvolt = <1500000>;
447 regulator-state-mem {
448 regulator-on-in-suspend;
449 regulator-suspend-microvolt = <1500000>;
453 vcca0v9_hdmi: LDO_REG7 {
454 regulator-name = "vcca0v9_hdmi";
455 regulator-min-microvolt = <900000>;
456 regulator-max-microvolt = <900000>;
459 regulator-state-mem {
460 regulator-on-in-suspend;
461 regulator-suspend-microvolt = <900000>;
466 regulator-name = "vcc_3v0";
467 regulator-min-microvolt = <3000000>;
468 regulator-max-microvolt = <3000000>;
471 regulator-state-mem {
472 regulator-on-in-suspend;
473 regulator-suspend-microvolt = <3000000>;
477 vcc3v3_s3: SWITCH_REG1 {
478 regulator-name = "vcc3v3_s3";
481 regulator-state-mem {
482 regulator-on-in-suspend;
486 vcc3v3_s0: SWITCH_REG2 {
487 regulator-name = "vcc3v3_s0";
490 regulator-state-mem {
491 regulator-on-in-suspend;
499 cpu-supply = <&vdd_cpu_l>;
503 cpu-supply = <&vdd_cpu_l>;
507 cpu-supply = <&vdd_cpu_l>;
511 cpu-supply = <&vdd_cpu_l>;
515 cpu-supply = <&vdd_cpu_b>;
519 cpu-supply = <&vdd_cpu_b>;
524 mali-supply = <&vdd_gpu>;
532 temperature = <85000>;
536 temperature = <100000>;
540 temperature = <105000>;
553 /* tshut mode 0:CRU 1:GPIO */
554 rockchip,hw-tshut-mode = <1>;
555 /* tshut polarity 0:LOW 1:HIGH */
556 rockchip,hw-tshut-polarity = <1>;
557 rockchip,hw-tshut-temp = <110000>;
565 u2phy0_otg: otg-port {
569 u2phy0_host: host-port {
570 phy-supply = <&vcc5v0_host>;
578 u2phy1_otg: otg-port {
582 u2phy1_host: host-port {
583 phy-supply = <&vcc5v0_host>;
589 pinctrl-names = "default";
590 pinctrl-0 = <&uart0_xfer &uart0_cts>;
640 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH 0>;
641 compatible = "rockchip,remotectl-pwm";
646 rockchip,usercode = <0x4040>;
656 <0xe3 KEY_VOLUMEDOWN>,
673 rockchip,usercode = <0xff00>;
683 <0xeb KEY_VOLUMEDOWN>,
688 <0xa9 KEY_VOLUMEDOWN>,
689 <0xa8 KEY_VOLUMEDOWN>,
690 <0xe0 KEY_VOLUMEDOWN>,
691 <0xa5 KEY_VOLUMEDOWN>,
696 <0xed KEY_VOLUMEDOWN>,
698 <0xb3 KEY_VOLUMEDOWN>,
699 <0xf1 KEY_VOLUMEDOWN>,
700 <0xf2 KEY_VOLUMEDOWN>,
702 <0xb4 KEY_VOLUMEDOWN>,
707 rockchip,usercode = <0x1dcc>;
717 <0xfd KEY_VOLUMEDOWN>,
735 <0xb5 KEY_BACKSPACE>;
740 phy-supply = <&vcc_phy>;
742 clock_in_out = "input";
743 snps,reset-gpio = <&gpio3 15 GPIO_ACTIVE_LOW>;
744 snps,reset-active-low;
745 snps,reset-delays-us = <0 10000 50000>;
746 assigned-clocks = <&cru SCLK_RMII_SRC>;
747 assigned-clock-parents = <&clkin_gmac>;
748 pinctrl-names = "default", "sleep";
749 pinctrl-0 = <&rgmii_pins>;
750 pinctrl-1 = <&rgmii_sleep_pins>;
761 #include <dt-bindings/display/screen-timing/lcd-box.dtsi>
765 native-mode = <&timing1>; /* 1080p */
777 rockchip,disp-policy = <DISPLAY_POLICY_BOX>;
782 rockchip,hdmi_video_source = <DISPLAY_SOURCE_LCDC0>;
784 <165000000 0 0 17 18 18 18>,
785 <340000000 0 2 17 14 14 14>,
786 <594000000 0 2 17 9 9 9>;
797 dp_vop_sel = <DISPLAY_SOURCE_LCDC1>;
807 bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */
808 audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */
809 sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */
810 gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */
815 wifi_enable_h: wifi-enable-h {
817 <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
822 uart0_gpios: uart0-gpios {
824 <2 19 RK_FUNC_GPIO &pcfg_pull_none>;
829 host_vbus_drv: host-vbus-drv {
831 <4 25 RK_FUNC_GPIO &pcfg_pull_none>;
836 pmic_int_l: pmic-int-l {
838 <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
843 rgmii_sleep_pins: rgmii-sleep-pins {
845 <3 15 RK_FUNC_GPIO &pcfg_output_low>;
860 pmu1830-supply = <&vcc_1v8>;