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 pinctrl-names = "default";
167 pinctrl-0 = <&hdmi_cec>;
172 clock-frequency = <400000>;
173 i2c-scl-rising-time-ns = <168>;
174 i2c-scl-falling-time-ns = <4>;
178 compatible = "rockchip,rk808";
180 interrupt-parent = <&gpio1>;
181 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
183 clock-output-names = "xin32k", "rk808-clkout2";
184 pinctrl-names = "default";
185 pinctrl-0 = <&pmic_int_l>;
186 rockchip,system-power-controller;
189 vcc1-supply = <&vcc5v0_sys>;
190 vcc2-supply = <&vcc5v0_sys>;
191 vcc3-supply = <&vcc5v0_sys>;
192 vcc4-supply = <&vcc5v0_sys>;
193 vcc6-supply = <&vcc5v0_sys>;
194 vcc7-supply = <&vcc5v0_sys>;
195 vcc8-supply = <&vcc3v3_sys>;
196 vcc9-supply = <&vcc5v0_sys>;
197 vcc10-supply = <&vcc5v0_sys>;
198 vcc11-supply = <&vcc5v0_sys>;
199 vcc12-supply = <&vcc3v3_sys>;
200 vddio-supply = <&vcc_1v8>;
203 vdd_center: DCDC_REG1 {
204 regulator-name = "vdd_center";
207 regulator-min-microvolt = <750000>;
208 regulator-max-microvolt = <1350000>;
209 regulator-ramp-delay = <6001>;
210 regulator-state-mem {
211 regulator-off-in-suspend;
215 vdd_cpu_l: DCDC_REG2 {
216 regulator-name = "vdd_cpu_l";
219 regulator-min-microvolt = <750000>;
220 regulator-max-microvolt = <1350000>;
221 regulator-ramp-delay = <6001>;
222 regulator-state-mem {
223 regulator-off-in-suspend;
228 regulator-name = "vcc_ddr";
231 regulator-state-mem {
232 regulator-on-in-suspend;
237 regulator-name = "vcc_1v8";
240 regulator-min-microvolt = <1800000>;
241 regulator-max-microvolt = <1800000>;
242 regulator-state-mem {
243 regulator-on-in-suspend;
244 regulator-suspend-microvolt = <1800000>;
248 vcc1v8_codec: LDO_REG1 {
249 regulator-name = "vcc1v8_codec";
252 regulator-min-microvolt = <1800000>;
253 regulator-max-microvolt = <1800000>;
254 regulator-state-mem {
255 regulator-off-in-suspend;
259 vcc1v8_hdmi: LDO_REG2 {
260 regulator-name = "vcc1v8_hdmi";
263 regulator-min-microvolt = <1800000>;
264 regulator-max-microvolt = <1800000>;
265 regulator-state-mem {
266 regulator-off-in-suspend;
271 regulator-name = "vcca_1v8";
274 regulator-min-microvolt = <1800000>;
275 regulator-max-microvolt = <1800000>;
276 regulator-state-mem {
277 regulator-on-in-suspend;
278 regulator-suspend-microvolt = <1800000>;
283 regulator-name = "vcc_sdio";
286 regulator-min-microvolt = <3000000>;
287 regulator-max-microvolt = <3000000>;
288 regulator-state-mem {
289 regulator-on-in-suspend;
290 regulator-suspend-microvolt = <3000000>;
294 vcca3v0_codec: LDO_REG5 {
295 regulator-name = "vcca3v0_codec";
298 regulator-min-microvolt = <3000000>;
299 regulator-max-microvolt = <3000000>;
300 regulator-state-mem {
301 regulator-off-in-suspend;
306 regulator-name = "vcc_1v5";
309 regulator-min-microvolt = <1500000>;
310 regulator-max-microvolt = <1500000>;
311 regulator-state-mem {
312 regulator-on-in-suspend;
313 regulator-suspend-microvolt = <1500000>;
317 vcc0v9_hdmi: LDO_REG7 {
318 regulator-name = "vcc0v9_hdmi";
321 regulator-min-microvolt = <900000>;
322 regulator-max-microvolt = <900000>;
323 regulator-state-mem {
324 regulator-off-in-suspend;
329 regulator-name = "vcc_3v0";
332 regulator-min-microvolt = <3000000>;
333 regulator-max-microvolt = <3000000>;
334 regulator-state-mem {
335 regulator-on-in-suspend;
336 regulator-suspend-microvolt = <3000000>;
340 vcc_cam: SWITCH_REG1 {
341 regulator-name = "vcc_cam";
344 regulator-min-microvolt = <3300000>;
345 regulator-max-microvolt = <3300000>;
346 regulator-state-mem {
347 regulator-off-in-suspend;
351 vcc_mipi: SWITCH_REG2 {
352 regulator-name = "vcc_mipi";
355 regulator-min-microvolt = <3300000>;
356 regulator-max-microvolt = <3300000>;
357 regulator-state-mem {
358 regulator-off-in-suspend;
364 vdd_cpu_b: regulator@40 {
365 compatible = "silergy,syr827";
367 fcs,suspend-voltage-selector = <1>;
368 pinctrl-names = "default";
369 pinctrl-0 = <&vsel1_gpio>;
370 regulator-name = "vdd_cpu_b";
371 regulator-min-microvolt = <712500>;
372 regulator-max-microvolt = <1500000>;
373 regulator-ramp-delay = <1000>;
376 vin-supply = <&vcc5v0_sys>;
378 regulator-state-mem {
379 regulator-off-in-suspend;
383 vdd_gpu: regulator@41 {
384 compatible = "silergy,syr828";
386 fcs,suspend-voltage-selector = <1>;
387 pinctrl-names = "default";
388 pinctrl-0 = <&vsel2_gpio>;
389 regulator-name = "vdd_gpu";
390 regulator-min-microvolt = <712500>;
391 regulator-max-microvolt = <1500000>;
392 regulator-ramp-delay = <1000>;
395 vin-supply = <&vcc5v0_sys>;
397 regulator-state-mem {
398 regulator-off-in-suspend;
404 i2c-scl-rising-time-ns = <300>;
405 i2c-scl-falling-time-ns = <15>;
410 i2c-scl-rising-time-ns = <450>;
411 i2c-scl-falling-time-ns = <15>;
416 i2c-scl-rising-time-ns = <600>;
417 i2c-scl-falling-time-ns = <20>;
422 rockchip,playback-channels = <8>;
423 rockchip,capture-channels = <8>;
428 rockchip,playback-channels = <2>;
429 rockchip,capture-channels = <2>;
440 bt656-supply = <&vcc_3v0>;
441 audio-supply = <&vcc_3v0>;
442 sdmmc-supply = <&vcc_sdio>;
443 gpio1830-supply = <&vcc_3v0>;
449 pmu1830-supply = <&vcc_3v0>;
454 pcie_pwr_en: pcie-pwr-en {
455 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
460 pmic_int_l: pmic-int-l {
461 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
464 vsel1_gpio: vsel1-gpio {
465 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
468 vsel2_gpio: vsel2-gpio {
469 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
474 vcc5v0_typec_en: vcc5v0-typec-en {
475 rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
480 vcc5v0_host_en: vcc5v0-host-en {
481 rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
493 vref-supply = <&vcc_1v8>;
500 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
502 max-frequency = <150000000>;
503 pinctrl-names = "default";
504 pinctrl-0 = <&sdmmc_clk &sdmmc_cd &sdmmc_cmd &sdmmc_bus4>;
511 mmc-hs400-enhanced-strobe;
527 /* tshut mode 0:CRU 1:GPIO */
528 rockchip,hw-tshut-mode = <1>;
529 /* tshut polarity 0:LOW 1:HIGH */
530 rockchip,hw-tshut-polarity = <1>;
536 u2phy0_otg: otg-port {
540 u2phy0_host: host-port {
541 phy-supply = <&vcc5v0_host>;
549 u2phy1_otg: otg-port {
553 u2phy1_host: host-port {
554 phy-supply = <&vcc5v0_host>;