1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2019 Akash Gajjar <Akash_Gajjar@mentor.com>
4 * Copyright (c) 2019 Pragnesh Patel <Pragnesh_Patel@mentor.com>
8 #include <dt-bindings/input/linux-event-codes.h>
9 #include <dt-bindings/pwm/pwm.h>
10 #include "rk3399.dtsi"
11 #include "rk3399-opp.dtsi"
14 model = "Radxa ROCK Pi 4";
15 compatible = "radxa,rockpi4", "rockchip,rk3399";
18 stdout-path = "serial2:1500000n8";
21 clkin_gmac: external-gmac-clock {
22 compatible = "fixed-clock";
23 clock-frequency = <125000000>;
24 clock-output-names = "clkin_gmac";
29 compatible = "regulator-fixed";
30 regulator-name = "vcc12v_dcin";
33 regulator-min-microvolt = <12000000>;
34 regulator-max-microvolt = <12000000>;
38 compatible = "regulator-fixed";
39 regulator-name = "vcc5v0_sys";
42 regulator-min-microvolt = <5000000>;
43 regulator-max-microvolt = <5000000>;
44 vin-supply = <&vcc12v_dcin>;
47 vcc3v3_pcie: vcc3v3-pcie-regulator {
48 compatible = "regulator-fixed";
50 gpio = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
51 pinctrl-names = "default";
52 pinctrl-0 = <&pcie_pwr_en>;
53 regulator-name = "vcc3v3_pcie";
56 vin-supply = <&vcc5v0_sys>;
59 vcc3v3_sys: vcc3v3-sys {
60 compatible = "regulator-fixed";
61 regulator-name = "vcc3v3_sys";
64 regulator-min-microvolt = <3300000>;
65 regulator-max-microvolt = <3300000>;
66 vin-supply = <&vcc5v0_sys>;
69 vcc5v0_host: vcc5v0-host-regulator {
70 compatible = "regulator-fixed";
72 gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
73 pinctrl-names = "default";
74 pinctrl-0 = <&vcc5v0_host_en>;
75 regulator-name = "vcc5v0_host";
77 vin-supply = <&vcc5v0_sys>;
80 vcc5v0_typec: vcc5v0-typec-regulator {
81 compatible = "regulator-fixed";
83 gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
84 pinctrl-names = "default";
85 pinctrl-0 = <&vcc5v0_typec_en>;
86 regulator-name = "vcc5v0_typec";
88 vin-supply = <&vcc5v0_sys>;
91 vcc_lan: vcc3v3-phy-regulator {
92 compatible = "regulator-fixed";
93 regulator-name = "vcc_lan";
96 regulator-min-microvolt = <3300000>;
97 regulator-max-microvolt = <3300000>;
100 regulator-off-in-suspend;
105 compatible = "pwm-regulator";
106 pwms = <&pwm2 0 25000 1>;
107 regulator-name = "vdd_log";
110 regulator-min-microvolt = <800000>;
111 regulator-max-microvolt = <1400000>;
112 vin-supply = <&vcc5v0_sys>;
117 cpu-supply = <&vdd_cpu_l>;
121 cpu-supply = <&vdd_cpu_l>;
125 cpu-supply = <&vdd_cpu_l>;
129 cpu-supply = <&vdd_cpu_l>;
133 cpu-supply = <&vdd_cpu_b>;
137 cpu-supply = <&vdd_cpu_b>;
145 assigned-clocks = <&cru SCLK_RMII_SRC>;
146 assigned-clock-parents = <&clkin_gmac>;
147 clock_in_out = "input";
148 phy-supply = <&vcc_lan>;
150 pinctrl-names = "default";
151 pinctrl-0 = <&rgmii_pins>;
152 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
153 snps,reset-active-low;
154 snps,reset-delays-us = <0 10000 50000>;
161 mali-supply = <&vdd_gpu>;
166 ddc-i2c-bus = <&i2c3>;
167 pinctrl-names = "default";
168 pinctrl-0 = <&hdmi_cec>;
173 clock-frequency = <400000>;
174 i2c-scl-rising-time-ns = <168>;
175 i2c-scl-falling-time-ns = <4>;
179 compatible = "rockchip,rk808";
181 interrupt-parent = <&gpio1>;
182 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
184 clock-output-names = "xin32k", "rk808-clkout2";
185 pinctrl-names = "default";
186 pinctrl-0 = <&pmic_int_l>;
187 rockchip,system-power-controller;
190 vcc1-supply = <&vcc5v0_sys>;
191 vcc2-supply = <&vcc5v0_sys>;
192 vcc3-supply = <&vcc5v0_sys>;
193 vcc4-supply = <&vcc5v0_sys>;
194 vcc6-supply = <&vcc5v0_sys>;
195 vcc7-supply = <&vcc5v0_sys>;
196 vcc8-supply = <&vcc3v3_sys>;
197 vcc9-supply = <&vcc5v0_sys>;
198 vcc10-supply = <&vcc5v0_sys>;
199 vcc11-supply = <&vcc5v0_sys>;
200 vcc12-supply = <&vcc3v3_sys>;
201 vddio-supply = <&vcc_1v8>;
204 vdd_center: DCDC_REG1 {
205 regulator-name = "vdd_center";
208 regulator-min-microvolt = <750000>;
209 regulator-max-microvolt = <1350000>;
210 regulator-ramp-delay = <6001>;
211 regulator-state-mem {
212 regulator-off-in-suspend;
216 vdd_cpu_l: DCDC_REG2 {
217 regulator-name = "vdd_cpu_l";
220 regulator-min-microvolt = <750000>;
221 regulator-max-microvolt = <1350000>;
222 regulator-ramp-delay = <6001>;
223 regulator-state-mem {
224 regulator-off-in-suspend;
229 regulator-name = "vcc_ddr";
232 regulator-state-mem {
233 regulator-on-in-suspend;
238 regulator-name = "vcc_1v8";
241 regulator-min-microvolt = <1800000>;
242 regulator-max-microvolt = <1800000>;
243 regulator-state-mem {
244 regulator-on-in-suspend;
245 regulator-suspend-microvolt = <1800000>;
249 vcc1v8_codec: LDO_REG1 {
250 regulator-name = "vcc1v8_codec";
253 regulator-min-microvolt = <1800000>;
254 regulator-max-microvolt = <1800000>;
255 regulator-state-mem {
256 regulator-off-in-suspend;
260 vcc1v8_hdmi: LDO_REG2 {
261 regulator-name = "vcc1v8_hdmi";
264 regulator-min-microvolt = <1800000>;
265 regulator-max-microvolt = <1800000>;
266 regulator-state-mem {
267 regulator-off-in-suspend;
272 regulator-name = "vcca_1v8";
275 regulator-min-microvolt = <1800000>;
276 regulator-max-microvolt = <1800000>;
277 regulator-state-mem {
278 regulator-on-in-suspend;
279 regulator-suspend-microvolt = <1800000>;
284 regulator-name = "vcc_sdio";
287 regulator-min-microvolt = <3000000>;
288 regulator-max-microvolt = <3000000>;
289 regulator-state-mem {
290 regulator-on-in-suspend;
291 regulator-suspend-microvolt = <3000000>;
295 vcca3v0_codec: LDO_REG5 {
296 regulator-name = "vcca3v0_codec";
299 regulator-min-microvolt = <3000000>;
300 regulator-max-microvolt = <3000000>;
301 regulator-state-mem {
302 regulator-off-in-suspend;
307 regulator-name = "vcc_1v5";
310 regulator-min-microvolt = <1500000>;
311 regulator-max-microvolt = <1500000>;
312 regulator-state-mem {
313 regulator-on-in-suspend;
314 regulator-suspend-microvolt = <1500000>;
318 vcc0v9_hdmi: LDO_REG7 {
319 regulator-name = "vcc0v9_hdmi";
322 regulator-min-microvolt = <900000>;
323 regulator-max-microvolt = <900000>;
324 regulator-state-mem {
325 regulator-off-in-suspend;
330 regulator-name = "vcc_3v0";
333 regulator-min-microvolt = <3000000>;
334 regulator-max-microvolt = <3000000>;
335 regulator-state-mem {
336 regulator-on-in-suspend;
337 regulator-suspend-microvolt = <3000000>;
341 vcc_cam: SWITCH_REG1 {
342 regulator-name = "vcc_cam";
345 regulator-min-microvolt = <3300000>;
346 regulator-max-microvolt = <3300000>;
347 regulator-state-mem {
348 regulator-off-in-suspend;
352 vcc_mipi: SWITCH_REG2 {
353 regulator-name = "vcc_mipi";
356 regulator-min-microvolt = <3300000>;
357 regulator-max-microvolt = <3300000>;
358 regulator-state-mem {
359 regulator-off-in-suspend;
365 vdd_cpu_b: regulator@40 {
366 compatible = "silergy,syr827";
368 fcs,suspend-voltage-selector = <1>;
369 pinctrl-names = "default";
370 pinctrl-0 = <&vsel1_gpio>;
371 regulator-name = "vdd_cpu_b";
372 regulator-min-microvolt = <712500>;
373 regulator-max-microvolt = <1500000>;
374 regulator-ramp-delay = <1000>;
377 vin-supply = <&vcc5v0_sys>;
379 regulator-state-mem {
380 regulator-off-in-suspend;
384 vdd_gpu: regulator@41 {
385 compatible = "silergy,syr828";
387 fcs,suspend-voltage-selector = <1>;
388 pinctrl-names = "default";
389 pinctrl-0 = <&vsel2_gpio>;
390 regulator-name = "vdd_gpu";
391 regulator-min-microvolt = <712500>;
392 regulator-max-microvolt = <1500000>;
393 regulator-ramp-delay = <1000>;
396 vin-supply = <&vcc5v0_sys>;
398 regulator-state-mem {
399 regulator-off-in-suspend;
405 i2c-scl-rising-time-ns = <300>;
406 i2c-scl-falling-time-ns = <15>;
411 i2c-scl-rising-time-ns = <450>;
412 i2c-scl-falling-time-ns = <15>;
417 i2c-scl-rising-time-ns = <600>;
418 i2c-scl-falling-time-ns = <20>;
423 rockchip,playback-channels = <8>;
424 rockchip,capture-channels = <8>;
429 rockchip,playback-channels = <2>;
430 rockchip,capture-channels = <2>;
441 bt656-supply = <&vcc_3v0>;
442 audio-supply = <&vcc_3v0>;
443 sdmmc-supply = <&vcc_sdio>;
444 gpio1830-supply = <&vcc_3v0>;
450 pmu1830-supply = <&vcc_3v0>;
455 pcie_pwr_en: pcie-pwr-en {
456 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
461 pmic_int_l: pmic-int-l {
462 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
465 vsel1_gpio: vsel1-gpio {
466 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
469 vsel2_gpio: vsel2-gpio {
470 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
475 vcc5v0_typec_en: vcc5v0-typec-en {
476 rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
481 vcc5v0_host_en: vcc5v0-host-en {
482 rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
494 vref-supply = <&vcc_1v8>;
501 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
503 max-frequency = <150000000>;
504 pinctrl-names = "default";
505 pinctrl-0 = <&sdmmc_clk &sdmmc_cd &sdmmc_cmd &sdmmc_bus4>;
512 mmc-hs400-enhanced-strobe;
528 /* tshut mode 0:CRU 1:GPIO */
529 rockchip,hw-tshut-mode = <1>;
530 /* tshut polarity 0:LOW 1:HIGH */
531 rockchip,hw-tshut-polarity = <1>;
537 u2phy0_otg: otg-port {
541 u2phy0_host: host-port {
542 phy-supply = <&vcc5v0_host>;
550 u2phy1_otg: otg-port {
554 u2phy1_host: host-port {
555 phy-supply = <&vcc5v0_host>;