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 1>;
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 {
148 sdio_pwrseq: sdio-pwrseq {
149 compatible = "mmc-pwrseq-simple";
151 clock-names = "ext_clock";
152 pinctrl-names = "default";
153 pinctrl-0 = <&wifi_enable_h>;
156 * On the module itself this is one of these (depending
157 * on the actual card populated):
158 * - SDIO_RESET_L_WL_REG_ON
159 * - PDN (power down when low)
161 reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
165 compatible = "wlan-platdata";
166 rockchip,grf = <&grf>;
167 wifi_chip_type = "ap6354";
169 WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>;
174 compatible = "bluetooth-platdata";
176 clock-names = "ext_clock";
177 /* wifi-bt-power-toggle; */
178 uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
179 pinctrl-names = "default", "rts_gpio";
180 pinctrl-0 = <&uart0_rts>;
181 pinctrl-1 = <&uart0_gpios>;
182 /* BT,power_gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>; */
183 BT,reset_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
184 BT,wake_gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>;
185 BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>;
195 clock-frequency = <100000000>;
196 clock-freq-min-max = <100000 100000000>;
204 vqmmc-supply = <&vcc_sd>;
205 pinctrl-names = "default";
206 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
207 card-detect-delay = <800>;
212 clock-frequency = <100000000>;
213 clock-freq-min-max = <200000 100000000>;
219 keep-power-in-suspend;
220 mmc-pwrseq = <&sdio_pwrseq>;
223 pinctrl-names = "default";
224 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
238 mmc-hs400-enhanced-strobe;
244 rockchip,i2s-broken-burst-len;
245 rockchip,playback-channels = <8>;
246 rockchip,capture-channels = <8>;
247 #sound-dai-cells = <0>;
251 #sound-dai-cells = <0>;
255 pinctrl-0 = <&spdif_bus_1>;
257 #sound-dai-cells = <0>;
262 i2c-scl-rising-time-ns = <168>;
263 i2c-scl-falling-time-ns = <4>;
264 clock-frequency = <400000>;
266 vdd_cpu_b: syr827@40 {
267 compatible = "silergy,syr827";
269 regulator-compatible = "fan53555-reg";
270 pinctrl-0 = <&vsel1_gpio>;
271 vsel-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
272 regulator-name = "vdd_cpu_b";
273 regulator-min-microvolt = <712500>;
274 regulator-max-microvolt = <1500000>;
275 regulator-ramp-delay = <1000>;
276 fcs,suspend-voltage-selector = <1>;
279 vin-supply = <&vcc_sys>;
280 regulator-state-mem {
281 regulator-off-in-suspend;
286 compatible = "silergy,syr828";
288 regulator-compatible = "fan53555-reg";
289 pinctrl-0 = <&vsel2_gpio>;
290 vsel-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
291 regulator-name = "vdd_gpu";
292 regulator-min-microvolt = <712500>;
293 regulator-max-microvolt = <1500000>;
294 regulator-ramp-delay = <1000>;
295 fcs,suspend-voltage-selector = <1>;
298 vin-supply = <&vcc_sys>;
299 regulator-initial-mode = <1>; /* 1:force PWM 2:auto */
300 regulator-state-mem {
301 regulator-off-in-suspend;
306 compatible = "rockchip,rk808";
308 interrupt-parent = <&gpio1>;
309 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
310 pinctrl-names = "default";
311 pinctrl-0 = <&pmic_int_l>;
312 rockchip,system-power-controller;
315 clock-output-names = "xin32k", "rk808-clkout2";
317 vcc1-supply = <&vcc_sys>;
318 vcc2-supply = <&vcc_sys>;
319 vcc3-supply = <&vcc_sys>;
320 vcc4-supply = <&vcc_sys>;
321 vcc6-supply = <&vcc_sys>;
322 vcc7-supply = <&vcc_sys>;
323 vcc8-supply = <&vcc3v3_sys>;
324 vcc9-supply = <&vcc_sys>;
325 vcc10-supply = <&vcc_sys>;
326 vcc11-supply = <&vcc_sys>;
327 vcc12-supply = <&vcc3v3_sys>;
328 vddio-supply = <&vcc_1v8>;
331 vdd_center: DCDC_REG1 {
332 regulator-name = "vdd_center";
333 regulator-min-microvolt = <750000>;
334 regulator-max-microvolt = <1350000>;
335 regulator-ramp-delay = <6001>;
338 regulator-state-mem {
339 regulator-off-in-suspend;
343 vdd_cpu_l: DCDC_REG2 {
344 regulator-name = "vdd_cpu_l";
345 regulator-min-microvolt = <750000>;
346 regulator-max-microvolt = <1350000>;
347 regulator-ramp-delay = <6001>;
350 regulator-state-mem {
351 regulator-off-in-suspend;
356 regulator-name = "vcc_ddr";
359 regulator-state-mem {
360 regulator-on-in-suspend;
365 regulator-name = "vcc_1v8";
366 regulator-min-microvolt = <1800000>;
367 regulator-max-microvolt = <1800000>;
370 regulator-state-mem {
371 regulator-on-in-suspend;
372 regulator-suspend-microvolt = <1800000>;
376 vcc1v8_dvp: LDO_REG1 {
377 regulator-name = "vcc1v8_dvp";
378 regulator-min-microvolt = <1800000>;
379 regulator-max-microvolt = <1800000>;
382 regulator-state-mem {
383 regulator-on-in-suspend;
384 regulator-suspend-microvolt = <1800000>;
388 vcca1v8_hdmi: LDO_REG2 {
389 regulator-name = "vcca1v8_hdmi";
390 regulator-min-microvolt = <1800000>;
391 regulator-max-microvolt = <1800000>;
394 regulator-state-mem {
395 regulator-on-in-suspend;
396 regulator-suspend-microvolt = <1800000>;
401 regulator-name = "vcca_1v8";
402 regulator-min-microvolt = <1800000>;
403 regulator-max-microvolt = <1800000>;
406 regulator-state-mem {
407 regulator-on-in-suspend;
408 regulator-suspend-microvolt = <1800000>;
413 regulator-name = "vcc_sd";
414 regulator-min-microvolt = <1800000>;
415 regulator-max-microvolt = <3300000>;
418 regulator-state-mem {
419 regulator-on-in-suspend;
420 regulator-suspend-microvolt = <3300000>;
424 vcc3v0_sd: LDO_REG5 {
425 regulator-name = "vcc3v0_sd";
426 regulator-min-microvolt = <3000000>;
427 regulator-max-microvolt = <3000000>;
430 regulator-state-mem {
431 regulator-on-in-suspend;
432 regulator-suspend-microvolt = <3000000>;
437 regulator-name = "vcc_1v5";
438 regulator-min-microvolt = <1500000>;
439 regulator-max-microvolt = <1500000>;
442 regulator-state-mem {
443 regulator-on-in-suspend;
444 regulator-suspend-microvolt = <1500000>;
448 vcca0v9_hdmi: LDO_REG7 {
449 regulator-name = "vcca0v9_hdmi";
450 regulator-min-microvolt = <900000>;
451 regulator-max-microvolt = <900000>;
454 regulator-state-mem {
455 regulator-on-in-suspend;
456 regulator-suspend-microvolt = <900000>;
461 regulator-name = "vcc_3v0";
462 regulator-min-microvolt = <3000000>;
463 regulator-max-microvolt = <3000000>;
466 regulator-state-mem {
467 regulator-on-in-suspend;
468 regulator-suspend-microvolt = <3000000>;
472 vcc3v3_s3: SWITCH_REG1 {
473 regulator-name = "vcc3v3_s3";
476 regulator-state-mem {
477 regulator-on-in-suspend;
481 vcc3v3_s0: SWITCH_REG2 {
482 regulator-name = "vcc3v3_s0";
485 regulator-state-mem {
486 regulator-on-in-suspend;
494 cpu-supply = <&vdd_cpu_l>;
498 cpu-supply = <&vdd_cpu_l>;
502 cpu-supply = <&vdd_cpu_l>;
506 cpu-supply = <&vdd_cpu_l>;
510 cpu-supply = <&vdd_cpu_b>;
514 cpu-supply = <&vdd_cpu_b>;
519 mali-supply = <&vdd_gpu>;
523 temperature = <85000>;
527 temperature = <100000>;
531 temperature = <105000>;
544 /* tshut mode 0:CRU 1:GPIO */
545 rockchip,hw-tshut-mode = <1>;
546 /* tshut polarity 0:LOW 1:HIGH */
547 rockchip,hw-tshut-polarity = <1>;
548 rockchip,hw-tshut-temp = <110000>;
556 u2phy0_otg: otg-port {
560 u2phy0_host: host-port {
561 phy-supply = <&vcc5v0_host>;
569 u2phy1_otg: otg-port {
573 u2phy1_host: host-port {
574 phy-supply = <&vcc5v0_host>;
580 pinctrl-names = "default";
581 pinctrl-0 = <&uart0_xfer &uart0_cts>;
631 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH 0>;
632 compatible = "rockchip,remotectl-pwm";
637 rockchip,usercode = <0x4040>;
647 <0xe3 KEY_VOLUMEDOWN>,
664 rockchip,usercode = <0xff00>;
674 <0xeb KEY_VOLUMEDOWN>,
679 <0xa9 KEY_VOLUMEDOWN>,
680 <0xa8 KEY_VOLUMEDOWN>,
681 <0xe0 KEY_VOLUMEDOWN>,
682 <0xa5 KEY_VOLUMEDOWN>,
688 <0xed KEY_VOLUMEDOWN>,
690 <0xb3 KEY_VOLUMEDOWN>,
691 <0xf1 KEY_VOLUMEDOWN>,
692 <0xf2 KEY_VOLUMEDOWN>,
694 <0xb4 KEY_VOLUMEDOWN>,
699 rockchip,usercode = <0x1dcc>;
709 <0xfd KEY_VOLUMEDOWN>,
727 <0xb5 KEY_BACKSPACE>;
732 phy-supply = <&vcc_phy>;
734 clock_in_out = "input";
735 snps,reset-gpio = <&gpio3 15 GPIO_ACTIVE_LOW>;
736 snps,reset-active-low;
737 snps,reset-delays-us = <0 10000 50000>;
738 assigned-clocks = <&cru SCLK_RMII_SRC>;
739 assigned-clock-parents = <&clkin_gmac>;
740 pinctrl-names = "default", "sleep";
741 pinctrl-0 = <&rgmii_pins>;
742 pinctrl-1 = <&rgmii_sleep_pins>;
759 bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */
760 audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */
761 sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */
762 gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */
767 wifi_enable_h: wifi-enable-h {
769 <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
774 uart0_gpios: uart0-gpios {
776 <2 19 RK_FUNC_GPIO &pcfg_pull_none>;
781 host_vbus_drv: host-vbus-drv {
783 <4 25 RK_FUNC_GPIO &pcfg_pull_none>;
788 pmic_int_l: pmic-int-l {
790 <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
793 vsel1_gpio: vsel1-gpio {
795 <1 17 RK_FUNC_GPIO &pcfg_pull_down>;
798 vsel2_gpio: vsel2-gpio {
800 <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
805 rgmii_sleep_pins: rgmii-sleep-pins {
807 <3 15 RK_FUNC_GPIO &pcfg_output_low>;
822 pmu1830-supply = <&vcc_1v8>;
827 rockchip,sleep-debug-en = <0>;
828 rockchip,sleep-mode-config = <
838 rockchip,wakeup-config = <
844 rockchip,pwm-regulator-config = <
849 rockchip,power-ctrl =
850 <&gpio1 17 GPIO_ACTIVE_HIGH>,
851 <&gpio1 14 GPIO_ACTIVE_HIGH>;