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";
116 compatible = "rockchip,rk3399-pmu-io-voltage-domain";
117 rockchip,grf = <&pmugrf>;
119 pmu1830-supply = <&vcc_1v8>;
124 compatible = "simple-audio-card";
125 simple-audio-card,name = "ROCKCHIP,SPDIF";
126 simple-audio-card,cpu {
127 sound-dai = <&spdif>;
129 simple-audio-card,codec {
130 sound-dai = <&spdif_out>;
134 spdif_out: spdif-out {
136 compatible = "linux,spdif-dit";
137 #sound-dai-cells = <0>;
140 hdmi_sound: hdmi-sound {
142 compatible = "simple-audio-card";
143 simple-audio-card,format = "i2s";
144 simple-audio-card,mclk-fs = <256>;
145 simple-audio-card,name = "rockchip,hdmi";
146 simple-audio-card,cpu {
149 simple-audio-card,codec {
150 sound-dai = <&dw_hdmi_audio>;
154 dw_hdmi_audio: dw-hdmi-audio {
156 compatible = "rockchip,dw-hdmi-audio";
157 #sound-dai-cells = <0>;
160 sdio_pwrseq: sdio-pwrseq {
161 compatible = "mmc-pwrseq-simple";
163 clock-names = "ext_clock";
164 pinctrl-names = "default";
165 pinctrl-0 = <&wifi_enable_h>;
168 * On the module itself this is one of these (depending
169 * on the actual card populated):
170 * - SDIO_RESET_L_WL_REG_ON
171 * - PDN (power down when low)
173 reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
177 compatible = "wlan-platdata";
178 rockchip,grf = <&grf>;
179 wifi_chip_type = "ap6354";
181 WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>;
186 compatible = "bluetooth-platdata";
188 clock-names = "ext_clock";
189 /* wifi-bt-power-toggle; */
190 uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
191 pinctrl-names = "default", "rts_gpio";
192 pinctrl-0 = <&uart0_rts>;
193 pinctrl-1 = <&uart0_gpios>;
194 /* BT,power_gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>; */
195 BT,reset_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
196 BT,wake_gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>;
197 BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>;
207 clock-frequency = <100000000>;
208 clock-freq-min-max = <100000 100000000>;
216 vqmmc-supply = <&vcc_sd>;
217 pinctrl-names = "default";
218 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
219 card-detect-delay = <800>;
224 clock-frequency = <100000000>;
225 clock-freq-min-max = <200000 100000000>;
231 keep-power-in-suspend;
232 mmc-pwrseq = <&sdio_pwrseq>;
235 pinctrl-names = "default";
236 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
242 freq-sel = <200000000>;
253 mmc-hs400-enhanced-strobe;
259 rockchip,i2s-broken-burst-len;
260 rockchip,playback-channels = <8>;
261 rockchip,capture-channels = <8>;
262 #sound-dai-cells = <0>;
266 #sound-dai-cells = <0>;
270 pinctrl-0 = <&spdif_bus_1>;
272 #sound-dai-cells = <0>;
277 i2c-scl-rising-time-ns = <168>;
278 i2c-scl-falling-time-ns = <4>;
279 clock-frequency = <400000>;
281 vdd_cpu_b: syr827@40 {
282 compatible = "silergy,syr827";
284 regulator-compatible = "fan53555-reg";
285 regulator-name = "vdd_cpu_b";
286 regulator-min-microvolt = <712500>;
287 regulator-max-microvolt = <1500000>;
288 regulator-ramp-delay = <1000>;
289 fcs,suspend-voltage-selector = <0>;
292 vin-supply = <&vcc_sys>;
293 regulator-state-mem {
294 regulator-off-in-suspend;
299 compatible = "silergy,syr828";
301 regulator-compatible = "fan53555-reg";
302 regulator-name = "vdd_gpu";
303 regulator-min-microvolt = <712500>;
304 regulator-max-microvolt = <1500000>;
305 regulator-ramp-delay = <1000>;
306 fcs,suspend-voltage-selector = <1>;
309 vin-supply = <&vcc_sys>;
310 regulator-initial-mode = <1>; /* 1:force PWM 2:auto */
311 regulator-state-mem {
312 regulator-off-in-suspend;
317 compatible = "rockchip,rk808";
319 interrupt-parent = <&gpio1>;
320 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
321 pinctrl-names = "default";
322 pinctrl-0 = <&pmic_int_l>;
323 rockchip,system-power-controller;
326 clock-output-names = "xin32k", "rk808-clkout2";
328 vcc1-supply = <&vcc_sys>;
329 vcc2-supply = <&vcc_sys>;
330 vcc3-supply = <&vcc_sys>;
331 vcc4-supply = <&vcc_sys>;
332 vcc6-supply = <&vcc_sys>;
333 vcc7-supply = <&vcc_sys>;
334 vcc8-supply = <&vcc3v3_sys>;
335 vcc9-supply = <&vcc_sys>;
336 vcc10-supply = <&vcc_sys>;
337 vcc11-supply = <&vcc_sys>;
338 vcc12-supply = <&vcc3v3_sys>;
339 vddio-supply = <&vcc_1v8>;
342 vdd_center: DCDC_REG1 {
343 regulator-name = "vdd_center";
344 regulator-min-microvolt = <750000>;
345 regulator-max-microvolt = <1350000>;
346 regulator-ramp-delay = <6001>;
349 regulator-state-mem {
350 regulator-off-in-suspend;
354 vdd_cpu_l: DCDC_REG2 {
355 regulator-name = "vdd_cpu_l";
356 regulator-min-microvolt = <750000>;
357 regulator-max-microvolt = <1350000>;
358 regulator-ramp-delay = <6001>;
361 regulator-state-mem {
362 regulator-off-in-suspend;
367 regulator-name = "vcc_ddr";
370 regulator-state-mem {
371 regulator-on-in-suspend;
376 regulator-name = "vcc_1v8";
377 regulator-min-microvolt = <1800000>;
378 regulator-max-microvolt = <1800000>;
381 regulator-state-mem {
382 regulator-on-in-suspend;
383 regulator-suspend-microvolt = <1800000>;
387 vcc1v8_dvp: LDO_REG1 {
388 regulator-name = "vcc1v8_dvp";
389 regulator-min-microvolt = <1800000>;
390 regulator-max-microvolt = <1800000>;
393 regulator-state-mem {
394 regulator-on-in-suspend;
395 regulator-suspend-microvolt = <1800000>;
399 vcca1v8_hdmi: LDO_REG2 {
400 regulator-name = "vcca1v8_hdmi";
401 regulator-min-microvolt = <1800000>;
402 regulator-max-microvolt = <1800000>;
405 regulator-state-mem {
406 regulator-on-in-suspend;
407 regulator-suspend-microvolt = <1800000>;
412 regulator-name = "vcca_1v8";
413 regulator-min-microvolt = <1800000>;
414 regulator-max-microvolt = <1800000>;
417 regulator-state-mem {
418 regulator-on-in-suspend;
419 regulator-suspend-microvolt = <1800000>;
424 regulator-name = "vcc_sd";
425 regulator-min-microvolt = <1800000>;
426 regulator-max-microvolt = <3300000>;
429 regulator-state-mem {
430 regulator-on-in-suspend;
431 regulator-suspend-microvolt = <3300000>;
435 vcc3v0_sd: LDO_REG5 {
436 regulator-name = "vcc3v0_sd";
437 regulator-min-microvolt = <3000000>;
438 regulator-max-microvolt = <3000000>;
441 regulator-state-mem {
442 regulator-on-in-suspend;
443 regulator-suspend-microvolt = <3000000>;
448 regulator-name = "vcc_1v5";
449 regulator-min-microvolt = <1500000>;
450 regulator-max-microvolt = <1500000>;
453 regulator-state-mem {
454 regulator-on-in-suspend;
455 regulator-suspend-microvolt = <1500000>;
459 vcca0v9_hdmi: LDO_REG7 {
460 regulator-name = "vcca0v9_hdmi";
461 regulator-min-microvolt = <900000>;
462 regulator-max-microvolt = <900000>;
465 regulator-state-mem {
466 regulator-on-in-suspend;
467 regulator-suspend-microvolt = <900000>;
472 regulator-name = "vcc_3v0";
473 regulator-min-microvolt = <3000000>;
474 regulator-max-microvolt = <3000000>;
477 regulator-state-mem {
478 regulator-on-in-suspend;
479 regulator-suspend-microvolt = <3000000>;
483 vcc3v3_s3: SWITCH_REG1 {
484 regulator-name = "vcc3v3_s3";
487 regulator-state-mem {
488 regulator-on-in-suspend;
492 vcc3v3_s0: SWITCH_REG2 {
493 regulator-name = "vcc3v3_s0";
496 regulator-state-mem {
497 regulator-on-in-suspend;
505 cpu-supply = <&vdd_cpu_l>;
509 cpu-supply = <&vdd_cpu_l>;
513 cpu-supply = <&vdd_cpu_l>;
517 cpu-supply = <&vdd_cpu_l>;
521 cpu-supply = <&vdd_cpu_b>;
525 cpu-supply = <&vdd_cpu_b>;
530 mali-supply = <&vdd_gpu>;
538 temperature = <85000>;
542 temperature = <100000>;
546 temperature = <105000>;
559 /* tshut mode 0:CRU 1:GPIO */
560 rockchip,hw-tshut-mode = <1>;
561 /* tshut polarity 0:LOW 1:HIGH */
562 rockchip,hw-tshut-polarity = <1>;
563 rockchip,hw-tshut-temp = <110000>;
571 u2phy0_otg: otg-port {
575 u2phy0_host: host-port {
576 phy-supply = <&vcc5v0_host>;
584 u2phy1_otg: otg-port {
588 u2phy1_host: host-port {
589 phy-supply = <&vcc5v0_host>;
595 pinctrl-names = "default";
596 pinctrl-0 = <&uart0_xfer &uart0_cts>;
646 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH 0>;
647 compatible = "rockchip,remotectl-pwm";
652 rockchip,usercode = <0x4040>;
662 <0xe3 KEY_VOLUMEDOWN>,
679 rockchip,usercode = <0xff00>;
689 <0xeb KEY_VOLUMEDOWN>,
694 <0xa9 KEY_VOLUMEDOWN>,
695 <0xa8 KEY_VOLUMEDOWN>,
696 <0xe0 KEY_VOLUMEDOWN>,
697 <0xa5 KEY_VOLUMEDOWN>,
702 <0xed KEY_VOLUMEDOWN>,
704 <0xb3 KEY_VOLUMEDOWN>,
705 <0xf1 KEY_VOLUMEDOWN>,
706 <0xf2 KEY_VOLUMEDOWN>,
708 <0xb4 KEY_VOLUMEDOWN>,
713 rockchip,usercode = <0x1dcc>;
723 <0xfd KEY_VOLUMEDOWN>,
741 <0xb5 KEY_BACKSPACE>;
746 phy-supply = <&vcc_phy>;
748 clock_in_out = "input";
749 snps,reset-gpio = <&gpio3 15 GPIO_ACTIVE_LOW>;
750 snps,reset-active-low;
751 snps,reset-delays-us = <0 10000 50000>;
752 assigned-clocks = <&cru SCLK_RMII_SRC>;
753 assigned-clock-parents = <&clkin_gmac>;
754 pinctrl-names = "default", "sleep";
755 pinctrl-0 = <&rgmii_pins>;
756 pinctrl-1 = <&rgmii_sleep_pins>;
767 #include <dt-bindings/display/screen-timing/lcd-box.dtsi>
771 native-mode = <&timing1>; /* 1080p */
783 rockchip,disp-policy = <DISPLAY_POLICY_BOX>;
788 rockchip,hdmi_video_source = <DISPLAY_SOURCE_LCDC0>;
790 <165000000 0 0 17 18 18 18>,
791 <340000000 0 2 17 14 14 14>,
792 <594000000 0 2 17 9 9 9>;
803 dp_vop_sel = <DISPLAY_SOURCE_LCDC1>;
813 bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */
814 audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */
815 sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */
816 gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */
821 wifi_enable_h: wifi-enable-h {
823 <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
828 uart0_gpios: uart0-gpios {
830 <2 19 RK_FUNC_GPIO &pcfg_pull_none>;
835 host_vbus_drv: host-vbus-drv {
837 <4 25 RK_FUNC_GPIO &pcfg_pull_none>;
842 pmic_int_l: pmic-int-l {
844 <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
849 rgmii_sleep_pins: rgmii-sleep-pins {
851 <3 15 RK_FUNC_GPIO &pcfg_output_low>;