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 pinctrl-names = "default";
162 pinctrl-0 = <&hdmi_cec>;
167 clock-frequency = <400000>;
168 i2c-scl-rising-time-ns = <168>;
169 i2c-scl-falling-time-ns = <4>;
173 compatible = "rockchip,rk808";
175 interrupt-parent = <&gpio1>;
176 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
178 clock-output-names = "xin32k", "rk808-clkout2";
179 pinctrl-names = "default";
180 pinctrl-0 = <&pmic_int_l>;
181 rockchip,system-power-controller;
184 vcc1-supply = <&vcc5v0_sys>;
185 vcc2-supply = <&vcc5v0_sys>;
186 vcc3-supply = <&vcc5v0_sys>;
187 vcc4-supply = <&vcc5v0_sys>;
188 vcc6-supply = <&vcc5v0_sys>;
189 vcc7-supply = <&vcc5v0_sys>;
190 vcc8-supply = <&vcc3v3_sys>;
191 vcc9-supply = <&vcc5v0_sys>;
192 vcc10-supply = <&vcc5v0_sys>;
193 vcc11-supply = <&vcc5v0_sys>;
194 vcc12-supply = <&vcc3v3_sys>;
195 vddio-supply = <&vcc_1v8>;
198 vdd_center: DCDC_REG1 {
199 regulator-name = "vdd_center";
202 regulator-min-microvolt = <750000>;
203 regulator-max-microvolt = <1350000>;
204 regulator-ramp-delay = <6001>;
205 regulator-state-mem {
206 regulator-off-in-suspend;
210 vdd_cpu_l: DCDC_REG2 {
211 regulator-name = "vdd_cpu_l";
214 regulator-min-microvolt = <750000>;
215 regulator-max-microvolt = <1350000>;
216 regulator-ramp-delay = <6001>;
217 regulator-state-mem {
218 regulator-off-in-suspend;
223 regulator-name = "vcc_ddr";
226 regulator-state-mem {
227 regulator-on-in-suspend;
232 regulator-name = "vcc_1v8";
235 regulator-min-microvolt = <1800000>;
236 regulator-max-microvolt = <1800000>;
237 regulator-state-mem {
238 regulator-on-in-suspend;
239 regulator-suspend-microvolt = <1800000>;
243 vcc1v8_codec: LDO_REG1 {
244 regulator-name = "vcc1v8_codec";
247 regulator-min-microvolt = <1800000>;
248 regulator-max-microvolt = <1800000>;
249 regulator-state-mem {
250 regulator-off-in-suspend;
254 vcc1v8_hdmi: LDO_REG2 {
255 regulator-name = "vcc1v8_hdmi";
258 regulator-min-microvolt = <1800000>;
259 regulator-max-microvolt = <1800000>;
260 regulator-state-mem {
261 regulator-off-in-suspend;
266 regulator-name = "vcca_1v8";
269 regulator-min-microvolt = <1800000>;
270 regulator-max-microvolt = <1800000>;
271 regulator-state-mem {
272 regulator-on-in-suspend;
273 regulator-suspend-microvolt = <1800000>;
278 regulator-name = "vcc_sdio";
281 regulator-min-microvolt = <3000000>;
282 regulator-max-microvolt = <3000000>;
283 regulator-state-mem {
284 regulator-on-in-suspend;
285 regulator-suspend-microvolt = <3000000>;
289 vcca3v0_codec: LDO_REG5 {
290 regulator-name = "vcca3v0_codec";
293 regulator-min-microvolt = <3000000>;
294 regulator-max-microvolt = <3000000>;
295 regulator-state-mem {
296 regulator-off-in-suspend;
301 regulator-name = "vcc_1v5";
304 regulator-min-microvolt = <1500000>;
305 regulator-max-microvolt = <1500000>;
306 regulator-state-mem {
307 regulator-on-in-suspend;
308 regulator-suspend-microvolt = <1500000>;
312 vcc0v9_hdmi: LDO_REG7 {
313 regulator-name = "vcc0v9_hdmi";
316 regulator-min-microvolt = <900000>;
317 regulator-max-microvolt = <900000>;
318 regulator-state-mem {
319 regulator-off-in-suspend;
324 regulator-name = "vcc_3v0";
327 regulator-min-microvolt = <3000000>;
328 regulator-max-microvolt = <3000000>;
329 regulator-state-mem {
330 regulator-on-in-suspend;
331 regulator-suspend-microvolt = <3000000>;
335 vcc_cam: SWITCH_REG1 {
336 regulator-name = "vcc_cam";
339 regulator-min-microvolt = <3300000>;
340 regulator-max-microvolt = <3300000>;
341 regulator-state-mem {
342 regulator-off-in-suspend;
346 vcc_mipi: SWITCH_REG2 {
347 regulator-name = "vcc_mipi";
350 regulator-min-microvolt = <3300000>;
351 regulator-max-microvolt = <3300000>;
352 regulator-state-mem {
353 regulator-off-in-suspend;
359 vdd_cpu_b: regulator@40 {
360 compatible = "silergy,syr827";
362 fcs,suspend-voltage-selector = <1>;
363 pinctrl-names = "default";
364 pinctrl-0 = <&vsel1_gpio>;
365 regulator-name = "vdd_cpu_b";
366 regulator-min-microvolt = <712500>;
367 regulator-max-microvolt = <1500000>;
368 regulator-ramp-delay = <1000>;
371 vin-supply = <&vcc5v0_sys>;
373 regulator-state-mem {
374 regulator-off-in-suspend;
378 vdd_gpu: regulator@41 {
379 compatible = "silergy,syr828";
381 fcs,suspend-voltage-selector = <1>;
382 pinctrl-names = "default";
383 pinctrl-0 = <&vsel2_gpio>;
384 regulator-name = "vdd_gpu";
385 regulator-min-microvolt = <712500>;
386 regulator-max-microvolt = <1500000>;
387 regulator-ramp-delay = <1000>;
390 vin-supply = <&vcc5v0_sys>;
392 regulator-state-mem {
393 regulator-off-in-suspend;
399 i2c-scl-rising-time-ns = <300>;
400 i2c-scl-falling-time-ns = <15>;
405 i2c-scl-rising-time-ns = <450>;
406 i2c-scl-falling-time-ns = <15>;
411 i2c-scl-rising-time-ns = <600>;
412 i2c-scl-falling-time-ns = <20>;
417 rockchip,playback-channels = <8>;
418 rockchip,capture-channels = <8>;
423 rockchip,playback-channels = <2>;
424 rockchip,capture-channels = <2>;
435 bt656-supply = <&vcc_3v0>;
436 audio-supply = <&vcc_3v0>;
437 sdmmc-supply = <&vcc_sdio>;
438 gpio1830-supply = <&vcc_3v0>;
444 pmu1830-supply = <&vcc_3v0>;
449 pcie_pwr_en: pcie-pwr-en {
450 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
455 pmic_int_l: pmic-int-l {
456 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
459 vsel1_gpio: vsel1-gpio {
460 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
463 vsel2_gpio: vsel2-gpio {
464 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
469 vcc5v0_typec_en: vcc5v0-typec-en {
470 rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
475 vcc5v0_host_en: vcc5v0-host-en {
476 rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
488 vref-supply = <&vcc_1v8>;
495 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
497 max-frequency = <150000000>;
498 pinctrl-names = "default";
499 pinctrl-0 = <&sdmmc_clk &sdmmc_cd &sdmmc_cmd &sdmmc_bus4>;
506 mmc-hs400-enhanced-strobe;
522 /* tshut mode 0:CRU 1:GPIO */
523 rockchip,hw-tshut-mode = <1>;
524 /* tshut polarity 0:LOW 1:HIGH */
525 rockchip,hw-tshut-polarity = <1>;
531 u2phy0_otg: otg-port {
535 u2phy0_host: host-port {
536 phy-supply = <&vcc5v0_host>;
544 u2phy1_otg: otg-port {
548 u2phy1_host: host-port {
549 phy-supply = <&vcc5v0_host>;