0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2019 Andy Yan <andy.yan@gmail.com>
0004 */
0005
0006 /dts-v1/;
0007 #include <dt-bindings/input/linux-event-codes.h>
0008 #include <dt-bindings/interrupt-controller/irq.h>
0009 #include <dt-bindings/pwm/pwm.h>
0010 #include "rk3399.dtsi"
0011 #include "rk3399-opp.dtsi"
0012
0013 / {
0014 model = "Leez RK3399 P710";
0015 compatible = "leez,p710", "rockchip,rk3399";
0016
0017 aliases {
0018 mmc0 = &sdio0;
0019 mmc1 = &sdmmc;
0020 mmc2 = &sdhci;
0021 };
0022
0023 chosen {
0024 stdout-path = "serial2:1500000n8";
0025 };
0026
0027 clkin_gmac: external-gmac-clock {
0028 compatible = "fixed-clock";
0029 clock-frequency = <125000000>;
0030 clock-output-names = "clkin_gmac";
0031 #clock-cells = <0>;
0032 };
0033
0034 sdio_pwrseq: sdio-pwrseq {
0035 compatible = "mmc-pwrseq-simple";
0036 clocks = <&rk808 1>;
0037 clock-names = "ext_clock";
0038 pinctrl-names = "default";
0039 pinctrl-0 = <&wifi_reg_on_h>;
0040 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
0041 };
0042
0043 dc5v_adp: dc5v-adp {
0044 compatible = "regulator-fixed";
0045 regulator-name = "dc5v_adapter";
0046 regulator-always-on;
0047 regulator-boot-on;
0048 regulator-min-microvolt = <5000000>;
0049 regulator-max-microvolt = <5000000>;
0050 };
0051
0052 vcc3v3_lan: vcc3v3-lan {
0053 compatible = "regulator-fixed";
0054 regulator-name = "vcc3v3_lan";
0055 regulator-always-on;
0056 regulator-boot-on;
0057 regulator-min-microvolt = <3300000>;
0058 regulator-max-microvolt = <3300000>;
0059 vin-supply = <&vcc3v3_sys>;
0060 };
0061
0062 vcc3v3_sys: vcc3v3-sys {
0063 compatible = "regulator-fixed";
0064 regulator-name = "vcc3v3_sys";
0065 regulator-always-on;
0066 regulator-boot-on;
0067 regulator-min-microvolt = <3300000>;
0068 regulator-max-microvolt = <3300000>;
0069 vin-supply = <&vcc5v0_sys>;
0070 };
0071
0072 vcc5v0_host0: vcc5v0_host1: vcc5v0-host {
0073 compatible = "regulator-fixed";
0074 regulator-name = "vcc5v0_host";
0075 regulator-boot-on;
0076 regulator-always-on;
0077 regulator-min-microvolt = <5500000>;
0078 regulator-max-microvolt = <5500000>;
0079 vin-supply = <&vcc5v0_sys>;
0080 };
0081
0082 vcc5v0_host3: vcc5v0-host3 {
0083 compatible = "regulator-fixed";
0084 regulator-name = "vcc5v0_host3";
0085 enable-active-high;
0086 gpio = <&gpio2 RK_PA2 GPIO_ACTIVE_HIGH>;
0087 pinctrl-names = "default";
0088 pinctrl-0 = <&vcc5v0_host3_en>;
0089 regulator-always-on;
0090 vin-supply = <&vcc5v0_sys>;
0091 };
0092
0093 vcc5v0_sys: vcc5v0-sys {
0094 compatible = "regulator-fixed";
0095 regulator-name = "vcc5v0_sys";
0096 regulator-always-on;
0097 regulator-boot-on;
0098 regulator-min-microvolt = <5000000>;
0099 regulator-max-microvolt = <5000000>;
0100 vin-supply = <&dc5v_adp>;
0101 };
0102
0103 vdd_log: vdd-log {
0104 compatible = "pwm-regulator";
0105 pwms = <&pwm2 0 25000 1>;
0106 pwm-supply = <&vcc5v0_sys>;
0107 regulator-name = "vdd_log";
0108 regulator-always-on;
0109 regulator-boot-on;
0110 regulator-min-microvolt = <800000>;
0111 regulator-max-microvolt = <1400000>;
0112 };
0113 };
0114
0115 &cpu_l0 {
0116 cpu-supply = <&vdd_cpu_l>;
0117 };
0118
0119 &cpu_l1 {
0120 cpu-supply = <&vdd_cpu_l>;
0121 };
0122
0123 &cpu_l2 {
0124 cpu-supply = <&vdd_cpu_l>;
0125 };
0126
0127 &cpu_l3 {
0128 cpu-supply = <&vdd_cpu_l>;
0129 };
0130
0131 &cpu_b0 {
0132 cpu-supply = <&vdd_cpu_b>;
0133 };
0134
0135 &cpu_b1 {
0136 cpu-supply = <&vdd_cpu_b>;
0137 };
0138
0139 &emmc_phy {
0140 status = "okay";
0141 };
0142
0143 &gmac {
0144 assigned-clocks = <&cru SCLK_RMII_SRC>;
0145 assigned-clock-parents = <&clkin_gmac>;
0146 clock_in_out = "input";
0147 phy-supply = <&vcc3v3_lan>;
0148 phy-mode = "rgmii";
0149 pinctrl-names = "default";
0150 pinctrl-0 = <&rgmii_pins>;
0151 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
0152 snps,reset-active-low;
0153 snps,reset-delays-us = <0 10000 50000>;
0154 tx_delay = <0x28>;
0155 rx_delay = <0x11>;
0156 status = "okay";
0157 };
0158
0159 &gpu {
0160 mali-supply = <&vdd_gpu>;
0161 status = "okay";
0162 };
0163
0164 &hdmi {
0165 ddc-i2c-bus = <&i2c7>;
0166 pinctrl-names = "default";
0167 pinctrl-0 = <&hdmi_cec>;
0168 status = "okay";
0169 };
0170
0171 &hdmi_sound {
0172 status = "okay";
0173 };
0174
0175 &i2c0 {
0176 clock-frequency = <400000>;
0177 i2c-scl-rising-time-ns = <168>;
0178 i2c-scl-falling-time-ns = <4>;
0179 status = "okay";
0180
0181 rk808: pmic@1b {
0182 compatible = "rockchip,rk808";
0183 reg = <0x1b>;
0184 interrupt-parent = <&gpio1>;
0185 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
0186 #clock-cells = <1>;
0187 clock-output-names = "xin32k", "rk808-clkout2";
0188 pinctrl-names = "default";
0189 pinctrl-0 = <&pmic_int_l>;
0190 rockchip,system-power-controller;
0191 wakeup-source;
0192
0193 vcc1-supply = <&vcc5v0_sys>;
0194 vcc2-supply = <&vcc5v0_sys>;
0195 vcc3-supply = <&vcc5v0_sys>;
0196 vcc4-supply = <&vcc5v0_sys>;
0197 vcc6-supply = <&vcc5v0_sys>;
0198 vcc7-supply = <&vcc5v0_sys>;
0199 vcc8-supply = <&vcc3v3_sys>;
0200 vcc9-supply = <&vcc5v0_sys>;
0201 vcc10-supply = <&vcc5v0_sys>;
0202 vcc11-supply = <&vcc5v0_sys>;
0203 vcc12-supply = <&vcc3v3_sys>;
0204 vddio-supply = <&vcc_1v8>;
0205
0206 regulators {
0207 vdd_center: DCDC_REG1 {
0208 regulator-name = "vdd_center";
0209 regulator-always-on;
0210 regulator-boot-on;
0211 regulator-min-microvolt = <750000>;
0212 regulator-max-microvolt = <1350000>;
0213 regulator-ramp-delay = <6001>;
0214 regulator-state-mem {
0215 regulator-off-in-suspend;
0216 };
0217 };
0218
0219 vdd_cpu_l: DCDC_REG2 {
0220 regulator-name = "vdd_cpu_l";
0221 regulator-always-on;
0222 regulator-boot-on;
0223 regulator-min-microvolt = <750000>;
0224 regulator-max-microvolt = <1350000>;
0225 regulator-ramp-delay = <6001>;
0226 regulator-state-mem {
0227 regulator-off-in-suspend;
0228 };
0229 };
0230
0231 vcc_ddr: DCDC_REG3 {
0232 regulator-name = "vcc_ddr";
0233 regulator-always-on;
0234 regulator-boot-on;
0235 regulator-state-mem {
0236 regulator-on-in-suspend;
0237 };
0238 };
0239
0240 vcc_1v8: DCDC_REG4 {
0241 regulator-name = "vcc_1v8";
0242 regulator-always-on;
0243 regulator-boot-on;
0244 regulator-min-microvolt = <1800000>;
0245 regulator-max-microvolt = <1800000>;
0246 regulator-state-mem {
0247 regulator-on-in-suspend;
0248 regulator-suspend-microvolt = <1800000>;
0249 };
0250 };
0251
0252 vcc1v8_dvp: LDO_REG1 {
0253 regulator-name = "vcc1v8_dvp";
0254 regulator-always-on;
0255 regulator-boot-on;
0256 regulator-min-microvolt = <1800000>;
0257 regulator-max-microvolt = <1800000>;
0258 regulator-state-mem {
0259 regulator-off-in-suspend;
0260 };
0261 };
0262
0263 vcc1v8_hdmi: LDO_REG2 {
0264 regulator-name = "vcc1v8_hdmi";
0265 regulator-always-on;
0266 regulator-boot-on;
0267 regulator-min-microvolt = <1800000>;
0268 regulator-max-microvolt = <1800000>;
0269 regulator-state-mem {
0270 regulator-off-in-suspend;
0271 };
0272 };
0273
0274 vcca_1v8: LDO_REG3 {
0275 regulator-name = "vcca_1v8";
0276 regulator-always-on;
0277 regulator-boot-on;
0278 regulator-min-microvolt = <1800000>;
0279 regulator-max-microvolt = <1800000>;
0280 regulator-state-mem {
0281 regulator-on-in-suspend;
0282 regulator-suspend-microvolt = <1800000>;
0283 };
0284 };
0285
0286 vccio_sd: LDO_REG4 {
0287 regulator-name = "vccio_sd";
0288 regulator-always-on;
0289 regulator-boot-on;
0290 regulator-min-microvolt = <3000000>;
0291 regulator-max-microvolt = <3000000>;
0292 regulator-state-mem {
0293 regulator-on-in-suspend;
0294 regulator-suspend-microvolt = <3000000>;
0295 };
0296 };
0297
0298 vcca3v0_codec: LDO_REG5 {
0299 regulator-name = "vcca3v0_codec";
0300 regulator-always-on;
0301 regulator-boot-on;
0302 regulator-min-microvolt = <3000000>;
0303 regulator-max-microvolt = <3000000>;
0304 regulator-state-mem {
0305 regulator-off-in-suspend;
0306 };
0307 };
0308
0309 vcc_1v5: LDO_REG6 {
0310 regulator-name = "vcc_1v5";
0311 regulator-always-on;
0312 regulator-boot-on;
0313 regulator-min-microvolt = <1500000>;
0314 regulator-max-microvolt = <1500000>;
0315 regulator-state-mem {
0316 regulator-on-in-suspend;
0317 regulator-suspend-microvolt = <1500000>;
0318 };
0319 };
0320
0321 vcc0v9_hdmi: LDO_REG7 {
0322 regulator-name = "vcc0v9_hdmi";
0323 regulator-always-on;
0324 regulator-boot-on;
0325 regulator-min-microvolt = <900000>;
0326 regulator-max-microvolt = <900000>;
0327 regulator-state-mem {
0328 regulator-off-in-suspend;
0329 };
0330 };
0331
0332 vcc_3v0: LDO_REG8 {
0333 regulator-name = "vcc_3v0";
0334 regulator-always-on;
0335 regulator-boot-on;
0336 regulator-min-microvolt = <3000000>;
0337 regulator-max-microvolt = <3000000>;
0338 regulator-state-mem {
0339 regulator-on-in-suspend;
0340 regulator-suspend-microvolt = <3000000>;
0341 };
0342 };
0343 };
0344 };
0345
0346 vdd_cpu_b: regulator@40 {
0347 compatible = "silergy,syr827";
0348 reg = <0x40>;
0349 fcs,suspend-voltage-selector = <1>;
0350 pinctrl-names = "default";
0351 pinctrl-0 = <&vsel1_pin>;
0352 regulator-name = "vdd_cpu_b";
0353 regulator-min-microvolt = <712500>;
0354 regulator-max-microvolt = <1500000>;
0355 regulator-ramp-delay = <1000>;
0356 regulator-always-on;
0357 regulator-boot-on;
0358 vin-supply = <&vcc5v0_sys>;
0359
0360 regulator-state-mem {
0361 regulator-off-in-suspend;
0362 };
0363 };
0364
0365 vdd_gpu: regulator@41 {
0366 compatible = "silergy,syr828";
0367 reg = <0x41>;
0368 fcs,suspend-voltage-selector = <1>;
0369 pinctrl-names = "default";
0370 pinctrl-0 = <&vsel2_pin>;
0371 regulator-name = "vdd_gpu";
0372 regulator-min-microvolt = <712500>;
0373 regulator-max-microvolt = <1500000>;
0374 regulator-ramp-delay = <1000>;
0375 regulator-always-on;
0376 regulator-boot-on;
0377 vin-supply = <&vcc5v0_sys>;
0378
0379 regulator-state-mem {
0380 regulator-off-in-suspend;
0381 };
0382 };
0383 };
0384
0385 &i2c1 {
0386 i2c-scl-rising-time-ns = <300>;
0387 i2c-scl-falling-time-ns = <15>;
0388 status = "okay";
0389 };
0390
0391 &i2c3 {
0392 i2c-scl-rising-time-ns = <450>;
0393 i2c-scl-falling-time-ns = <15>;
0394 status = "okay";
0395 };
0396
0397 &i2c4 {
0398 i2c-scl-rising-time-ns = <600>;
0399 i2c-scl-falling-time-ns = <20>;
0400 status = "okay";
0401 };
0402
0403 &i2c7 {
0404 status = "okay";
0405 };
0406
0407 &i2s0 {
0408 rockchip,playback-channels = <8>;
0409 rockchip,capture-channels = <8>;
0410 status = "okay";
0411 };
0412
0413 &i2s1 {
0414 rockchip,playback-channels = <2>;
0415 rockchip,capture-channels = <2>;
0416 status = "okay";
0417 };
0418
0419 &i2s2 {
0420 status = "okay";
0421 };
0422
0423 &io_domains {
0424 status = "okay";
0425
0426 bt656-supply = <&vcc1v8_dvp>;
0427 audio-supply = <&vcc_1v8>;
0428 sdmmc-supply = <&vccio_sd>;
0429 gpio1830-supply = <&vcc_3v0>;
0430 };
0431
0432 &pmu_io_domains {
0433 status = "okay";
0434 pmu1830-supply = <&vcc_3v0>;
0435 };
0436
0437 &pinctrl {
0438 bt {
0439 bt_reg_on_h: bt-reg-on-h {
0440 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
0441 };
0442
0443 bt_host_wake_l: bt-host-wake-l {
0444 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
0445 };
0446
0447 bt_wake_l: bt-wake-l {
0448 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
0449 };
0450 };
0451
0452 pmic {
0453 pmic_int_l: pmic-int-l {
0454 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
0455 };
0456
0457 vsel1_pin: vsel1-pin {
0458 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
0459 };
0460
0461 vsel2_pin: vsel2-pin {
0462 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
0463 };
0464 };
0465
0466 usb2 {
0467 vcc5v0_host3_en: vcc5v0-host3-en {
0468 rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
0469 };
0470 };
0471
0472 wifi {
0473 wifi_reg_on_h: wifi-reg-on-h {
0474 rockchip,pins =
0475 <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
0476 };
0477
0478 wifi_host_wake_l: wifi-host-wake-l {
0479 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
0480 };
0481 };
0482 };
0483
0484 &pwm2 {
0485 status = "okay";
0486 };
0487
0488 &saradc {
0489 status = "okay";
0490
0491 vref-supply = <&vcc_1v8>;
0492 };
0493
0494 &sdio0 {
0495 #address-cells = <1>;
0496 #size-cells = <0>;
0497 bus-width = <4>;
0498 clock-frequency = <50000000>;
0499 cap-sdio-irq;
0500 cap-sd-highspeed;
0501 keep-power-in-suspend;
0502 mmc-pwrseq = <&sdio_pwrseq>;
0503 non-removable;
0504 pinctrl-names = "default";
0505 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
0506 sd-uhs-sdr104;
0507 status = "okay";
0508
0509 brcmf: wifi@1 {
0510 compatible = "brcm,bcm4329-fmac";
0511 reg = <1>;
0512 interrupt-parent = <&gpio0>;
0513 interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
0514 interrupt-names = "host-wake";
0515 pinctrl-names = "default";
0516 pinctrl-0 = <&wifi_host_wake_l>;
0517 };
0518 };
0519
0520 &sdhci {
0521 bus-width = <8>;
0522 mmc-hs400-1_8v;
0523 mmc-hs400-enhanced-strobe;
0524 non-removable;
0525 status = "okay";
0526 };
0527
0528 &sdmmc {
0529 bus-width = <4>;
0530 cap-mmc-highspeed;
0531 cap-sd-highspeed;
0532 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
0533 disable-wp;
0534 max-frequency = <150000000>;
0535 pinctrl-names = "default";
0536 pinctrl-0 = <&sdmmc_clk &sdmmc_cd &sdmmc_cmd &sdmmc_bus4>;
0537 status = "okay";
0538 };
0539
0540 &tcphy0 {
0541 status = "okay";
0542 };
0543
0544 &tcphy1 {
0545 status = "okay";
0546 };
0547
0548 &tsadc {
0549 status = "okay";
0550
0551 /* tshut mode 0:CRU 1:GPIO */
0552 rockchip,hw-tshut-mode = <1>;
0553 /* tshut polarity 0:LOW 1:HIGH */
0554 rockchip,hw-tshut-polarity = <1>;
0555 };
0556
0557 &u2phy0 {
0558 status = "okay";
0559
0560 u2phy0_otg: otg-port {
0561 status = "okay";
0562 };
0563
0564 u2phy0_host: host-port {
0565 phy-supply = <&vcc5v0_host0>;
0566 status = "okay";
0567 };
0568 };
0569
0570 &u2phy1 {
0571 status = "okay";
0572
0573 u2phy1_otg: otg-port {
0574 status = "okay";
0575 };
0576
0577 u2phy1_host: host-port {
0578 phy-supply = <&vcc5v0_host1>;
0579 status = "okay";
0580 };
0581 };
0582
0583 &uart0 {
0584 pinctrl-names = "default";
0585 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
0586 status = "okay";
0587
0588 bluetooth {
0589 compatible = "brcm,bcm43438-bt";
0590 clocks = <&rk808 1>;
0591 clock-names = "ext_clock";
0592 device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
0593 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
0594 shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
0595 pinctrl-names = "default";
0596 pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_reg_on_h>;
0597 };
0598 };
0599
0600 &uart2 {
0601 status = "okay";
0602 };
0603
0604 &usb_host0_ehci {
0605 status = "okay";
0606 };
0607
0608 &usb_host0_ohci {
0609 status = "okay";
0610 };
0611
0612 &usb_host1_ehci {
0613 status = "okay";
0614 };
0615
0616 &usb_host1_ohci {
0617 status = "okay";
0618 };
0619
0620 &usbdrd3_0 {
0621 status = "okay";
0622 };
0623
0624 &usbdrd_dwc3_0 {
0625 status = "okay";
0626 dr_mode = "otg";
0627 };
0628
0629 &usbdrd3_1 {
0630 status = "okay";
0631 };
0632
0633 &usbdrd_dwc3_1 {
0634 status = "okay";
0635 dr_mode = "host";
0636 };
0637
0638 &vopb {
0639 status = "okay";
0640 };
0641
0642 &vopb_mmu {
0643 status = "okay";
0644 };
0645
0646 &vopl {
0647 status = "okay";
0648 };
0649
0650 &vopl_mmu {
0651 status = "okay";
0652 };