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.
45 #include <dt-bindings/pwm/pwm.h>
46 #include <dt-bindings/input/input.h>
47 #include "rk3399.dtsi"
48 #include "rk3399-android.dtsi"
51 model = "Rockchip RK3399 Box Board v1 (Android)";
52 compatible = "rockchip,rk3399";
54 vcc1v8_s0: vcc1v8-s0 {
55 compatible = "regulator-fixed";
56 regulator-name = "vcc1v8_s0";
57 regulator-min-microvolt = <1800000>;
58 regulator-max-microvolt = <1800000>;
63 compatible = "regulator-fixed";
64 regulator-name = "vcc_sys";
65 regulator-min-microvolt = <5000000>;
66 regulator-max-microvolt = <5000000>;
70 vcc_phy: vcc-phy-regulator {
71 compatible = "regulator-fixed";
72 regulator-name = "vcc_phy";
77 vcc3v3_sys: vcc3v3-sys {
78 compatible = "regulator-fixed";
79 regulator-name = "vcc3v3_sys";
80 regulator-min-microvolt = <3300000>;
81 regulator-max-microvolt = <3300000>;
83 vin-supply = <&vcc_sys>;
86 vcc5v0_host: vcc5v0-host-regulator {
87 compatible = "regulator-fixed";
89 gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
90 pinctrl-names = "default";
91 pinctrl-0 = <&host_vbus_drv>;
92 regulator-name = "vcc5v0_host";
96 vdd_center: vdd-center {
97 compatible = "pwm-regulator";
98 pwms = <&pwm2 0 25000 0>;
99 regulator-name = "vdd_center";
100 regulator-min-microvolt = <800000>;
101 regulator-max-microvolt = <1400000>;
105 /* for rockchip boot on */
106 rockchip,pwm_id= <2>;
107 rockchip,pwm_voltage = <900000>;
109 vin-supply = <&vcc_sys>;
112 clkin_gmac: external-gmac-clock {
113 compatible = "fixed-clock";
114 clock-frequency = <125000000>;
115 clock-output-names = "clkin_gmac";
121 compatible = "simple-audio-card";
122 simple-audio-card,name = "ROCKCHIP,SPDIF";
123 simple-audio-card,cpu {
124 sound-dai = <&spdif>;
126 simple-audio-card,codec {
127 sound-dai = <&spdif_out>;
131 spdif_out: spdif-out {
133 compatible = "linux,spdif-dit";
134 #sound-dai-cells = <0>;
137 hdmi_sound: hdmi-sound {
139 compatible = "simple-audio-card";
140 simple-audio-card,format = "i2s";
141 simple-audio-card,mclk-fs = <256>;
142 simple-audio-card,name = "rockchip,hdmi";
143 simple-audio-card,cpu {
146 simple-audio-card,codec {
147 sound-dai = <&dw_hdmi_audio>;
151 dw_hdmi_audio: dw-hdmi-audio {
153 compatible = "rockchip,dw-hdmi-audio";
154 #sound-dai-cells = <0>;
157 sdio_pwrseq: sdio-pwrseq {
158 compatible = "mmc-pwrseq-simple";
160 clock-names = "ext_clock";
161 pinctrl-names = "default";
162 pinctrl-0 = <&wifi_enable_h>;
165 * On the module itself this is one of these (depending
166 * on the actual card populated):
167 * - SDIO_RESET_L_WL_REG_ON
168 * - PDN (power down when low)
170 reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
174 compatible = "wlan-platdata";
175 rockchip,grf = <&grf>;
176 wifi_chip_type = "ap6354";
178 WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>;
183 compatible = "bluetooth-platdata";
184 /* wifi-bt-power-toggle; */
185 uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
186 pinctrl-names = "default", "rts_gpio";
187 pinctrl-0 = <&uart0_rts>;
188 pinctrl-1 = <&uart0_gpios>;
189 /* BT,power_gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>; */
190 BT,reset_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
191 BT,wake_gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>;
192 BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>;
200 bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */
201 audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */
202 sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */
203 gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */
207 clock-frequency = <150000000>;
208 clock-freq-min-max = <400000 150000000>;
216 vqmmc-supply = <&vcc_sd>;
217 pinctrl-names = "default";
218 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
223 clock-frequency = <140000000>;
224 clock-freq-min-max = <200000 140000000>;
230 keep-power-in-suspend;
231 mmc-pwrseq = <&sdio_pwrseq>;
234 pinctrl-names = "default";
235 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
241 freq-sel = <200000000>;
252 mmc-hs400-enhanced-strobe;
258 rockchip,i2s-broken-burst-len;
259 rockchip,playback-channels = <8>;
260 rockchip,capture-channels = <8>;
261 #sound-dai-cells = <0>;
265 #sound-dai-cells = <0>;
269 pinctrl-0 = <&spdif_bus_1>;
271 #sound-dai-cells = <0>;
276 i2c-scl-rising-time-ns = <168>;
277 i2c-scl-falling-time-ns = <4>;
278 clock-frequency = <400000>;
280 vdd_cpu_b: syr827@40 {
281 compatible = "silergy,syr827";
283 regulator-compatible = "fan53555-reg";
284 regulator-name = "vdd_cpu_b";
285 regulator-min-microvolt = <712500>;
286 regulator-max-microvolt = <1500000>;
287 regulator-ramp-delay = <1000>;
288 fcs,suspend-voltage-selector = <1>;
291 regulator-initial-state = <3>;
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 = <735000>;
304 regulator-max-microvolt = <1400000>;
305 regulator-ramp-delay = <1000>;
306 fcs,suspend-voltage-selector = <1>;
309 vin-supply = <&vcc_sys>;
310 regulator-state-mem {
311 regulator-off-in-suspend;
316 compatible = "rockchip,rk808";
318 interrupt-parent = <&gpio1>;
319 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
320 pinctrl-names = "default";
321 pinctrl-0 = <&pmic_int_l>;
322 rockchip,system-power-controller;
325 clock-output-names = "xin32k", "rk808-clkout2";
327 vcc1-supply = <&vcc_sys>;
328 vcc2-supply = <&vcc_sys>;
329 vcc3-supply = <&vcc_sys>;
330 vcc4-supply = <&vcc_sys>;
331 vcc6-supply = <&vcc_sys>;
332 vcc7-supply = <&vcc_sys>;
333 vcc8-supply = <&vcc3v3_sys>;
334 vcc9-supply = <&vcc_sys>;
335 vcc10-supply = <&vcc_sys>;
336 vcc11-supply = <&vcc_sys>;
337 vcc12-supply = <&vcc3v3_sys>;
338 vddio-supply = <&vcc_1v8>;
342 regulator-name = "vdd_log";
343 regulator-min-microvolt = <750000>;
344 regulator-max-microvolt = <1350000>;
345 regulator-ramp-delay = <6001>;
348 regulator-state-mem {
349 regulator-on-in-suspend;
350 regulator-suspend-microvolt = <900000>;
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 vcc3v0_tp: LDO_REG2 {
400 regulator-name = "vcc3v0_tp";
401 regulator-min-microvolt = <3000000>;
402 regulator-max-microvolt = <3000000>;
405 regulator-state-mem {
406 regulator-off-in-suspend;
410 vcc1v8_pll: LDO_REG3 {
411 regulator-name = "vcc1v8_pll";
412 regulator-min-microvolt = <1800000>;
413 regulator-max-microvolt = <1800000>;
416 regulator-state-mem {
417 regulator-on-in-suspend;
418 regulator-suspend-microvolt = <1800000>;
423 regulator-name = "vcc_sd";
424 regulator-min-microvolt = <1800000>;
425 regulator-max-microvolt = <3300000>;
428 regulator-state-mem {
429 regulator-on-in-suspend;
430 regulator-suspend-microvolt = <3300000>;
434 vcc3v0_sd: LDO_REG5 {
435 regulator-name = "vcc3v0_sd";
436 regulator-min-microvolt = <3000000>;
437 regulator-max-microvolt = <3000000>;
440 regulator-state-mem {
441 regulator-on-in-suspend;
442 regulator-suspend-microvolt = <3000000>;
447 regulator-name = "vcc_1v5";
448 regulator-min-microvolt = <1500000>;
449 regulator-max-microvolt = <1500000>;
452 regulator-state-mem {
453 regulator-on-in-suspend;
454 regulator-suspend-microvolt = <1500000>;
459 regulator-name = "vcc_0v9a";
460 regulator-min-microvolt = <900000>;
461 regulator-max-microvolt = <900000>;
464 regulator-state-mem {
465 regulator-on-in-suspend;
466 regulator-suspend-microvolt = <900000>;
471 regulator-name = "vcc_3v0";
472 regulator-min-microvolt = <3000000>;
473 regulator-max-microvolt = <3000000>;
476 regulator-state-mem {
477 regulator-on-in-suspend;
478 regulator-suspend-microvolt = <3000000>;
482 vcc3v3_s3: SWITCH_REG1 {
483 regulator-name = "vcc3v3_s3";
486 regulator-state-mem {
487 regulator-on-in-suspend;
491 vcc3v3_s0: SWITCH_REG2 {
492 regulator-name = "vcc3v3_s0";
495 regulator-state-mem {
496 regulator-on-in-suspend;
504 cpu-supply = <&vdd_cpu_l>;
508 cpu-supply = <&vdd_cpu_l>;
512 cpu-supply = <&vdd_cpu_l>;
516 cpu-supply = <&vdd_cpu_l>;
520 cpu-supply = <&vdd_cpu_b>;
524 cpu-supply = <&vdd_cpu_b>;
529 mali-supply = <&vdd_gpu>;
537 /* tshut mode 0:CRU 1:GPIO */
538 rockchip,hw-tshut-mode = <1>;
539 /* tshut polarity 0:LOW 1:HIGH */
540 rockchip,hw-tshut-polarity = <1>;
547 u2phy0_otg: otg-port {
551 u2phy0_host: host-port {
552 phy-supply = <&vcc5v0_host>;
560 u2phy1_otg: otg-port {
564 u2phy1_host: host-port {
565 phy-supply = <&vcc5v0_host>;
571 pinctrl-names = "default";
572 pinctrl-0 = <&uart0_xfer &uart0_cts>;
621 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH 0>;
622 compatible = "rockchip,remotectl-pwm";
627 rockchip,usercode = <0x4040>;
637 <0xe3 KEY_VOLUMEDOWN>,
654 rockchip,usercode = <0xff00>;
664 <0xeb KEY_VOLUMEDOWN>,
669 <0xa9 KEY_VOLUMEDOWN>,
670 <0xa8 KEY_VOLUMEDOWN>,
671 <0xe0 KEY_VOLUMEDOWN>,
672 <0xa5 KEY_VOLUMEDOWN>,
677 <0xed KEY_VOLUMEDOWN>,
679 <0xb3 KEY_VOLUMEDOWN>,
680 <0xf1 KEY_VOLUMEDOWN>,
681 <0xf2 KEY_VOLUMEDOWN>,
683 <0xb4 KEY_VOLUMEDOWN>,
688 rockchip,usercode = <0x1dcc>;
698 <0xfd KEY_VOLUMEDOWN>,
716 <0xb5 KEY_BACKSPACE>;
721 phy-supply = <&vcc_phy>;
723 clock_in_out = "input";
724 snps,reset-gpio = <&gpio3 15 GPIO_ACTIVE_LOW>;
725 snps,reset-active-low;
726 snps,reset-delays-us = <0 10000 50000>;
727 assigned-clocks = <&cru SCLK_RMII_SRC>;
728 assigned-clock-parents = <&clkin_gmac>;
729 pinctrl-names = "default";
730 pinctrl-0 = <&rgmii_pins>;
742 wifi_enable_h: wifi-enable-h {
743 rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
748 uart0_gpios: uart0-gpios {
749 rockchip,pins = <2 19 RK_FUNC_GPIO &pcfg_pull_none>;
754 pmic_int_l: pmic-int-l {
756 <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
761 host_vbus_drv: host-vbus-drv {
763 <4 25 RK_FUNC_GPIO &pcfg_pull_none>;
769 #include <dt-bindings/display/screen-timing/lcd-box.dtsi>
777 rockchip,disp-mode = <NO_DUAL>;
778 rockchip,disp-policy = <DISPLAY_POLICY_BOX>;
783 rockchip,hdmi_video_source = <DISPLAY_SOURCE_LCDC0>;
792 pmu1830-supply = <&vcc_1v8>;