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 ddc-i2c-bus = <&i2c3>;
162 pinctrl-names = "default";
163 pinctrl-0 = <&hdmi_cec>;
168 clock-frequency = <400000>;
169 i2c-scl-rising-time-ns = <168>;
170 i2c-scl-falling-time-ns = <4>;
174 compatible = "rockchip,rk808";
176 interrupt-parent = <&gpio1>;
177 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
179 clock-output-names = "xin32k", "rk808-clkout2";
180 pinctrl-names = "default";
181 pinctrl-0 = <&pmic_int_l>;
182 rockchip,system-power-controller;
185 vcc1-supply = <&vcc5v0_sys>;
186 vcc2-supply = <&vcc5v0_sys>;
187 vcc3-supply = <&vcc5v0_sys>;
188 vcc4-supply = <&vcc5v0_sys>;
189 vcc6-supply = <&vcc5v0_sys>;
190 vcc7-supply = <&vcc5v0_sys>;
191 vcc8-supply = <&vcc3v3_sys>;
192 vcc9-supply = <&vcc5v0_sys>;
193 vcc10-supply = <&vcc5v0_sys>;
194 vcc11-supply = <&vcc5v0_sys>;
195 vcc12-supply = <&vcc3v3_sys>;
196 vddio-supply = <&vcc_1v8>;
199 vdd_center: DCDC_REG1 {
200 regulator-name = "vdd_center";
203 regulator-min-microvolt = <750000>;
204 regulator-max-microvolt = <1350000>;
205 regulator-ramp-delay = <6001>;
206 regulator-state-mem {
207 regulator-off-in-suspend;
211 vdd_cpu_l: DCDC_REG2 {
212 regulator-name = "vdd_cpu_l";
215 regulator-min-microvolt = <750000>;
216 regulator-max-microvolt = <1350000>;
217 regulator-ramp-delay = <6001>;
218 regulator-state-mem {
219 regulator-off-in-suspend;
224 regulator-name = "vcc_ddr";
227 regulator-state-mem {
228 regulator-on-in-suspend;
233 regulator-name = "vcc_1v8";
236 regulator-min-microvolt = <1800000>;
237 regulator-max-microvolt = <1800000>;
238 regulator-state-mem {
239 regulator-on-in-suspend;
240 regulator-suspend-microvolt = <1800000>;
244 vcc1v8_codec: LDO_REG1 {
245 regulator-name = "vcc1v8_codec";
248 regulator-min-microvolt = <1800000>;
249 regulator-max-microvolt = <1800000>;
250 regulator-state-mem {
251 regulator-off-in-suspend;
255 vcc1v8_hdmi: LDO_REG2 {
256 regulator-name = "vcc1v8_hdmi";
259 regulator-min-microvolt = <1800000>;
260 regulator-max-microvolt = <1800000>;
261 regulator-state-mem {
262 regulator-off-in-suspend;
267 regulator-name = "vcca_1v8";
270 regulator-min-microvolt = <1800000>;
271 regulator-max-microvolt = <1800000>;
272 regulator-state-mem {
273 regulator-on-in-suspend;
274 regulator-suspend-microvolt = <1800000>;
279 regulator-name = "vcc_sdio";
282 regulator-min-microvolt = <3000000>;
283 regulator-max-microvolt = <3000000>;
284 regulator-state-mem {
285 regulator-on-in-suspend;
286 regulator-suspend-microvolt = <3000000>;
290 vcca3v0_codec: LDO_REG5 {
291 regulator-name = "vcca3v0_codec";
294 regulator-min-microvolt = <3000000>;
295 regulator-max-microvolt = <3000000>;
296 regulator-state-mem {
297 regulator-off-in-suspend;
302 regulator-name = "vcc_1v5";
305 regulator-min-microvolt = <1500000>;
306 regulator-max-microvolt = <1500000>;
307 regulator-state-mem {
308 regulator-on-in-suspend;
309 regulator-suspend-microvolt = <1500000>;
313 vcc0v9_hdmi: LDO_REG7 {
314 regulator-name = "vcc0v9_hdmi";
317 regulator-min-microvolt = <900000>;
318 regulator-max-microvolt = <900000>;
319 regulator-state-mem {
320 regulator-off-in-suspend;
325 regulator-name = "vcc_3v0";
328 regulator-min-microvolt = <3000000>;
329 regulator-max-microvolt = <3000000>;
330 regulator-state-mem {
331 regulator-on-in-suspend;
332 regulator-suspend-microvolt = <3000000>;
336 vcc_cam: SWITCH_REG1 {
337 regulator-name = "vcc_cam";
340 regulator-min-microvolt = <3300000>;
341 regulator-max-microvolt = <3300000>;
342 regulator-state-mem {
343 regulator-off-in-suspend;
347 vcc_mipi: SWITCH_REG2 {
348 regulator-name = "vcc_mipi";
351 regulator-min-microvolt = <3300000>;
352 regulator-max-microvolt = <3300000>;
353 regulator-state-mem {
354 regulator-off-in-suspend;
360 vdd_cpu_b: regulator@40 {
361 compatible = "silergy,syr827";
363 fcs,suspend-voltage-selector = <1>;
364 pinctrl-names = "default";
365 pinctrl-0 = <&vsel1_gpio>;
366 regulator-name = "vdd_cpu_b";
367 regulator-min-microvolt = <712500>;
368 regulator-max-microvolt = <1500000>;
369 regulator-ramp-delay = <1000>;
372 vin-supply = <&vcc5v0_sys>;
374 regulator-state-mem {
375 regulator-off-in-suspend;
379 vdd_gpu: regulator@41 {
380 compatible = "silergy,syr828";
382 fcs,suspend-voltage-selector = <1>;
383 pinctrl-names = "default";
384 pinctrl-0 = <&vsel2_gpio>;
385 regulator-name = "vdd_gpu";
386 regulator-min-microvolt = <712500>;
387 regulator-max-microvolt = <1500000>;
388 regulator-ramp-delay = <1000>;
391 vin-supply = <&vcc5v0_sys>;
393 regulator-state-mem {
394 regulator-off-in-suspend;
400 i2c-scl-rising-time-ns = <300>;
401 i2c-scl-falling-time-ns = <15>;
406 i2c-scl-rising-time-ns = <450>;
407 i2c-scl-falling-time-ns = <15>;
412 i2c-scl-rising-time-ns = <600>;
413 i2c-scl-falling-time-ns = <20>;
418 rockchip,playback-channels = <8>;
419 rockchip,capture-channels = <8>;
424 rockchip,playback-channels = <2>;
425 rockchip,capture-channels = <2>;
436 bt656-supply = <&vcc_3v0>;
437 audio-supply = <&vcc_3v0>;
438 sdmmc-supply = <&vcc_sdio>;
439 gpio1830-supply = <&vcc_3v0>;
445 pmu1830-supply = <&vcc_3v0>;
450 pcie_pwr_en: pcie-pwr-en {
451 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
456 pmic_int_l: pmic-int-l {
457 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
460 vsel1_gpio: vsel1-gpio {
461 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
464 vsel2_gpio: vsel2-gpio {
465 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
470 vcc5v0_typec_en: vcc5v0-typec-en {
471 rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
476 vcc5v0_host_en: vcc5v0-host-en {
477 rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
489 vref-supply = <&vcc_1v8>;
496 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
498 max-frequency = <150000000>;
499 pinctrl-names = "default";
500 pinctrl-0 = <&sdmmc_clk &sdmmc_cd &sdmmc_cmd &sdmmc_bus4>;
507 mmc-hs400-enhanced-strobe;
523 /* tshut mode 0:CRU 1:GPIO */
524 rockchip,hw-tshut-mode = <1>;
525 /* tshut polarity 0:LOW 1:HIGH */
526 rockchip,hw-tshut-polarity = <1>;
532 u2phy0_otg: otg-port {
536 u2phy0_host: host-port {
537 phy-supply = <&vcc5v0_host>;
545 u2phy1_otg: otg-port {
549 u2phy1_host: host-port {
550 phy-supply = <&vcc5v0_host>;