0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
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 <dt-bindings/usb/pd.h>
0011 #include "rk3399.dtsi"
0012 #include "rk3399-opp.dtsi"
0013
0014 / {
0015 model = "Firefly-RK3399 Board";
0016 compatible = "firefly,firefly-rk3399", "rockchip,rk3399";
0017
0018 aliases {
0019 mmc0 = &sdio0;
0020 mmc1 = &sdmmc;
0021 mmc2 = &sdhci;
0022 };
0023
0024 chosen {
0025 stdout-path = "serial2:1500000n8";
0026 };
0027
0028 backlight: backlight {
0029 compatible = "pwm-backlight";
0030 enable-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
0031 pwms = <&pwm0 0 25000 0>;
0032 brightness-levels = <
0033 0 1 2 3 4 5 6 7
0034 8 9 10 11 12 13 14 15
0035 16 17 18 19 20 21 22 23
0036 24 25 26 27 28 29 30 31
0037 32 33 34 35 36 37 38 39
0038 40 41 42 43 44 45 46 47
0039 48 49 50 51 52 53 54 55
0040 56 57 58 59 60 61 62 63
0041 64 65 66 67 68 69 70 71
0042 72 73 74 75 76 77 78 79
0043 80 81 82 83 84 85 86 87
0044 88 89 90 91 92 93 94 95
0045 96 97 98 99 100 101 102 103
0046 104 105 106 107 108 109 110 111
0047 112 113 114 115 116 117 118 119
0048 120 121 122 123 124 125 126 127
0049 128 129 130 131 132 133 134 135
0050 136 137 138 139 140 141 142 143
0051 144 145 146 147 148 149 150 151
0052 152 153 154 155 156 157 158 159
0053 160 161 162 163 164 165 166 167
0054 168 169 170 171 172 173 174 175
0055 176 177 178 179 180 181 182 183
0056 184 185 186 187 188 189 190 191
0057 192 193 194 195 196 197 198 199
0058 200 201 202 203 204 205 206 207
0059 208 209 210 211 212 213 214 215
0060 216 217 218 219 220 221 222 223
0061 224 225 226 227 228 229 230 231
0062 232 233 234 235 236 237 238 239
0063 240 241 242 243 244 245 246 247
0064 248 249 250 251 252 253 254 255>;
0065 default-brightness-level = <200>;
0066 };
0067
0068 clkin_gmac: external-gmac-clock {
0069 compatible = "fixed-clock";
0070 clock-frequency = <125000000>;
0071 clock-output-names = "clkin_gmac";
0072 #clock-cells = <0>;
0073 };
0074
0075 dc_12v: dc-12v {
0076 compatible = "regulator-fixed";
0077 regulator-name = "dc_12v";
0078 regulator-always-on;
0079 regulator-boot-on;
0080 regulator-min-microvolt = <12000000>;
0081 regulator-max-microvolt = <12000000>;
0082 };
0083
0084 gpio-keys {
0085 compatible = "gpio-keys";
0086 autorepeat;
0087 pinctrl-names = "default";
0088 pinctrl-0 = <&pwrbtn>;
0089
0090 key-power {
0091 debounce-interval = <100>;
0092 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
0093 label = "GPIO Key Power";
0094 linux,code = <KEY_POWER>;
0095 wakeup-source;
0096 };
0097 };
0098
0099 ir-receiver {
0100 compatible = "gpio-ir-receiver";
0101 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
0102 pinctrl-0 = <&ir_int>;
0103 pinctrl-names = "default";
0104 };
0105
0106 leds {
0107 compatible = "gpio-leds";
0108 pinctrl-names = "default";
0109 pinctrl-0 = <&work_led_pin>, <&diy_led_pin>;
0110
0111 work_led: led-0 {
0112 label = "work";
0113 default-state = "on";
0114 gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
0115 };
0116
0117 diy_led: led-1 {
0118 label = "diy";
0119 default-state = "off";
0120 gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
0121 };
0122 };
0123
0124 rt5640-sound {
0125 compatible = "simple-audio-card";
0126 simple-audio-card,name = "rockchip,rt5640-codec";
0127 simple-audio-card,format = "i2s";
0128 simple-audio-card,mclk-fs = <256>;
0129 simple-audio-card,widgets =
0130 "Microphone", "Mic Jack",
0131 "Headphone", "Headphone Jack";
0132 simple-audio-card,routing =
0133 "Mic Jack", "MICBIAS1",
0134 "IN1P", "Mic Jack",
0135 "Headphone Jack", "HPOL",
0136 "Headphone Jack", "HPOR";
0137
0138 simple-audio-card,cpu {
0139 sound-dai = <&i2s1>;
0140 };
0141
0142 simple-audio-card,codec {
0143 sound-dai = <&rt5640>;
0144 };
0145 };
0146
0147 sdio_pwrseq: sdio-pwrseq {
0148 compatible = "mmc-pwrseq-simple";
0149 clocks = <&rk808 1>;
0150 clock-names = "ext_clock";
0151 pinctrl-names = "default";
0152 pinctrl-0 = <&wifi_enable_h>;
0153
0154 /*
0155 * On the module itself this is one of these (depending
0156 * on the actual card populated):
0157 * - SDIO_RESET_L_WL_REG_ON
0158 * - PDN (power down when low)
0159 */
0160 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
0161 };
0162
0163 sound-dit {
0164 compatible = "audio-graph-card";
0165 label = "SPDIF";
0166 dais = <&spdif_p0>;
0167 };
0168
0169 spdif-dit {
0170 compatible = "linux,spdif-dit";
0171 #sound-dai-cells = <0>;
0172
0173 port {
0174 dit_p0_0: endpoint {
0175 remote-endpoint = <&spdif_p0_0>;
0176 };
0177 };
0178 };
0179
0180 /* switched by pmic_sleep */
0181 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
0182 compatible = "regulator-fixed";
0183 regulator-name = "vcc1v8_s3";
0184 regulator-always-on;
0185 regulator-boot-on;
0186 regulator-min-microvolt = <1800000>;
0187 regulator-max-microvolt = <1800000>;
0188 vin-supply = <&vcc_1v8>;
0189 };
0190
0191 vcc3v3_pcie: vcc3v3-pcie-regulator {
0192 compatible = "regulator-fixed";
0193 enable-active-high;
0194 gpio = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>;
0195 pinctrl-names = "default";
0196 pinctrl-0 = <&pcie_pwr_en>;
0197 regulator-name = "vcc3v3_pcie";
0198 regulator-always-on;
0199 regulator-boot-on;
0200 vin-supply = <&dc_12v>;
0201 };
0202
0203 vcc3v3_sys: vcc3v3-sys {
0204 compatible = "regulator-fixed";
0205 regulator-name = "vcc3v3_sys";
0206 regulator-always-on;
0207 regulator-boot-on;
0208 regulator-min-microvolt = <3300000>;
0209 regulator-max-microvolt = <3300000>;
0210 vin-supply = <&vcc_sys>;
0211 };
0212
0213 /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
0214 vcc5v0_host: vcc5v0-host-regulator {
0215 compatible = "regulator-fixed";
0216 enable-active-high;
0217 gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
0218 pinctrl-names = "default";
0219 pinctrl-0 = <&vcc5v0_host_en>;
0220 regulator-name = "vcc5v0_host";
0221 regulator-always-on;
0222 vin-supply = <&vcc_sys>;
0223 };
0224
0225 vcc5v0_typec: vcc5v0-typec-regulator {
0226 compatible = "regulator-fixed";
0227 enable-active-high;
0228 gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
0229 pinctrl-names = "default";
0230 pinctrl-0 = <&vcc5v0_typec_en>;
0231 regulator-name = "vcc5v0_typec";
0232 regulator-always-on;
0233 vin-supply = <&vcc_sys>;
0234 };
0235
0236 vcc_sys: vcc-sys {
0237 compatible = "regulator-fixed";
0238 regulator-name = "vcc_sys";
0239 regulator-always-on;
0240 regulator-boot-on;
0241 regulator-min-microvolt = <5000000>;
0242 regulator-max-microvolt = <5000000>;
0243 vin-supply = <&dc_12v>;
0244 };
0245
0246 vdd_log: vdd-log {
0247 compatible = "pwm-regulator";
0248 pwms = <&pwm2 0 25000 1>;
0249 pwm-supply = <&vcc_sys>;
0250 regulator-name = "vdd_log";
0251 regulator-always-on;
0252 regulator-boot-on;
0253 regulator-min-microvolt = <430000>;
0254 regulator-max-microvolt = <1400000>;
0255 };
0256 };
0257
0258 &cpu_l0 {
0259 cpu-supply = <&vdd_cpu_l>;
0260 };
0261
0262 &cpu_l1 {
0263 cpu-supply = <&vdd_cpu_l>;
0264 };
0265
0266 &cpu_l2 {
0267 cpu-supply = <&vdd_cpu_l>;
0268 };
0269
0270 &cpu_l3 {
0271 cpu-supply = <&vdd_cpu_l>;
0272 };
0273
0274 &cpu_b0 {
0275 cpu-supply = <&vdd_cpu_b>;
0276 };
0277
0278 &cpu_b1 {
0279 cpu-supply = <&vdd_cpu_b>;
0280 };
0281
0282 &emmc_phy {
0283 status = "okay";
0284 };
0285
0286 &gmac {
0287 assigned-clocks = <&cru SCLK_RMII_SRC>;
0288 assigned-clock-parents = <&clkin_gmac>;
0289 clock_in_out = "input";
0290 phy-supply = <&vcc_lan>;
0291 phy-mode = "rgmii";
0292 pinctrl-names = "default";
0293 pinctrl-0 = <&rgmii_pins>;
0294 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
0295 snps,reset-active-low;
0296 snps,reset-delays-us = <0 10000 50000>;
0297 tx_delay = <0x28>;
0298 rx_delay = <0x11>;
0299 status = "okay";
0300 };
0301
0302 &gpu {
0303 mali-supply = <&vdd_gpu>;
0304 status = "okay";
0305 };
0306
0307 &hdmi {
0308 ddc-i2c-bus = <&i2c3>;
0309 pinctrl-names = "default";
0310 pinctrl-0 = <&hdmi_cec>;
0311 status = "okay";
0312 };
0313
0314 &i2c0 {
0315 clock-frequency = <400000>;
0316 i2c-scl-rising-time-ns = <168>;
0317 i2c-scl-falling-time-ns = <4>;
0318 status = "okay";
0319
0320 rk808: pmic@1b {
0321 compatible = "rockchip,rk808";
0322 reg = <0x1b>;
0323 interrupt-parent = <&gpio1>;
0324 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
0325 #clock-cells = <1>;
0326 clock-output-names = "xin32k", "rk808-clkout2";
0327 pinctrl-names = "default";
0328 pinctrl-0 = <&pmic_int_l>;
0329 rockchip,system-power-controller;
0330 wakeup-source;
0331
0332 vcc1-supply = <&vcc_sys>;
0333 vcc2-supply = <&vcc_sys>;
0334 vcc3-supply = <&vcc_sys>;
0335 vcc4-supply = <&vcc_sys>;
0336 vcc6-supply = <&vcc_sys>;
0337 vcc7-supply = <&vcc_sys>;
0338 vcc8-supply = <&vcc3v3_sys>;
0339 vcc9-supply = <&vcc_sys>;
0340 vcc10-supply = <&vcc_sys>;
0341 vcc11-supply = <&vcc_sys>;
0342 vcc12-supply = <&vcc3v3_sys>;
0343 vddio-supply = <&vcc1v8_pmu>;
0344
0345 regulators {
0346 vdd_center: DCDC_REG1 {
0347 regulator-name = "vdd_center";
0348 regulator-always-on;
0349 regulator-boot-on;
0350 regulator-min-microvolt = <750000>;
0351 regulator-max-microvolt = <1350000>;
0352 regulator-ramp-delay = <6001>;
0353 regulator-state-mem {
0354 regulator-off-in-suspend;
0355 };
0356 };
0357
0358 vdd_cpu_l: DCDC_REG2 {
0359 regulator-name = "vdd_cpu_l";
0360 regulator-always-on;
0361 regulator-boot-on;
0362 regulator-min-microvolt = <750000>;
0363 regulator-max-microvolt = <1350000>;
0364 regulator-ramp-delay = <6001>;
0365 regulator-state-mem {
0366 regulator-off-in-suspend;
0367 };
0368 };
0369
0370 vcc_ddr: DCDC_REG3 {
0371 regulator-name = "vcc_ddr";
0372 regulator-always-on;
0373 regulator-boot-on;
0374 regulator-state-mem {
0375 regulator-on-in-suspend;
0376 };
0377 };
0378
0379 vcc_1v8: DCDC_REG4 {
0380 regulator-name = "vcc_1v8";
0381 regulator-always-on;
0382 regulator-boot-on;
0383 regulator-min-microvolt = <1800000>;
0384 regulator-max-microvolt = <1800000>;
0385 regulator-state-mem {
0386 regulator-on-in-suspend;
0387 regulator-suspend-microvolt = <1800000>;
0388 };
0389 };
0390
0391 vcc1v8_dvp: LDO_REG1 {
0392 regulator-name = "vcc1v8_dvp";
0393 regulator-always-on;
0394 regulator-boot-on;
0395 regulator-min-microvolt = <1800000>;
0396 regulator-max-microvolt = <1800000>;
0397 regulator-state-mem {
0398 regulator-off-in-suspend;
0399 };
0400 };
0401
0402 vcc2v8_dvp: LDO_REG2 {
0403 regulator-name = "vcc2v8_dvp";
0404 regulator-always-on;
0405 regulator-boot-on;
0406 regulator-min-microvolt = <2800000>;
0407 regulator-max-microvolt = <2800000>;
0408 regulator-state-mem {
0409 regulator-off-in-suspend;
0410 };
0411 };
0412
0413 vcc1v8_pmu: LDO_REG3 {
0414 regulator-name = "vcc1v8_pmu";
0415 regulator-always-on;
0416 regulator-boot-on;
0417 regulator-min-microvolt = <1800000>;
0418 regulator-max-microvolt = <1800000>;
0419 regulator-state-mem {
0420 regulator-on-in-suspend;
0421 regulator-suspend-microvolt = <1800000>;
0422 };
0423 };
0424
0425 vcc_sdio: LDO_REG4 {
0426 regulator-name = "vcc_sdio";
0427 regulator-always-on;
0428 regulator-boot-on;
0429 regulator-min-microvolt = <1800000>;
0430 regulator-max-microvolt = <3000000>;
0431 regulator-state-mem {
0432 regulator-on-in-suspend;
0433 regulator-suspend-microvolt = <3000000>;
0434 };
0435 };
0436
0437 vcca3v0_codec: LDO_REG5 {
0438 regulator-name = "vcca3v0_codec";
0439 regulator-always-on;
0440 regulator-boot-on;
0441 regulator-min-microvolt = <3000000>;
0442 regulator-max-microvolt = <3000000>;
0443 regulator-state-mem {
0444 regulator-off-in-suspend;
0445 };
0446 };
0447
0448 vcc_1v5: LDO_REG6 {
0449 regulator-name = "vcc_1v5";
0450 regulator-always-on;
0451 regulator-boot-on;
0452 regulator-min-microvolt = <1500000>;
0453 regulator-max-microvolt = <1500000>;
0454 regulator-state-mem {
0455 regulator-on-in-suspend;
0456 regulator-suspend-microvolt = <1500000>;
0457 };
0458 };
0459
0460 vcca1v8_codec: LDO_REG7 {
0461 regulator-name = "vcca1v8_codec";
0462 regulator-always-on;
0463 regulator-boot-on;
0464 regulator-min-microvolt = <1800000>;
0465 regulator-max-microvolt = <1800000>;
0466 regulator-state-mem {
0467 regulator-off-in-suspend;
0468 };
0469 };
0470
0471 vcc_3v0: LDO_REG8 {
0472 regulator-name = "vcc_3v0";
0473 regulator-always-on;
0474 regulator-boot-on;
0475 regulator-min-microvolt = <3000000>;
0476 regulator-max-microvolt = <3000000>;
0477 regulator-state-mem {
0478 regulator-on-in-suspend;
0479 regulator-suspend-microvolt = <3000000>;
0480 };
0481 };
0482
0483 vcc3v3_s3: vcc_lan: SWITCH_REG1 {
0484 regulator-name = "vcc3v3_s3";
0485 regulator-always-on;
0486 regulator-boot-on;
0487 regulator-state-mem {
0488 regulator-off-in-suspend;
0489 };
0490 };
0491
0492 vcc3v3_s0: SWITCH_REG2 {
0493 regulator-name = "vcc3v3_s0";
0494 regulator-always-on;
0495 regulator-boot-on;
0496 regulator-state-mem {
0497 regulator-off-in-suspend;
0498 };
0499 };
0500 };
0501 };
0502
0503 vdd_cpu_b: regulator@40 {
0504 compatible = "silergy,syr827";
0505 reg = <0x40>;
0506 fcs,suspend-voltage-selector = <0>;
0507 regulator-name = "vdd_cpu_b";
0508 regulator-min-microvolt = <712500>;
0509 regulator-max-microvolt = <1500000>;
0510 regulator-ramp-delay = <1000>;
0511 regulator-always-on;
0512 regulator-boot-on;
0513 vin-supply = <&vcc_sys>;
0514
0515 regulator-state-mem {
0516 regulator-off-in-suspend;
0517 };
0518 };
0519
0520 vdd_gpu: regulator@41 {
0521 compatible = "silergy,syr828";
0522 reg = <0x41>;
0523 fcs,suspend-voltage-selector = <1>;
0524 regulator-name = "vdd_gpu";
0525 regulator-min-microvolt = <712500>;
0526 regulator-max-microvolt = <1500000>;
0527 regulator-ramp-delay = <1000>;
0528 regulator-always-on;
0529 regulator-boot-on;
0530 vin-supply = <&vcc_sys>;
0531
0532 regulator-state-mem {
0533 regulator-off-in-suspend;
0534 };
0535 };
0536 };
0537
0538 &i2c1 {
0539 i2c-scl-rising-time-ns = <300>;
0540 i2c-scl-falling-time-ns = <15>;
0541 status = "okay";
0542
0543 rt5640: rt5640@1c {
0544 compatible = "realtek,rt5640";
0545 reg = <0x1c>;
0546 clocks = <&cru SCLK_I2S_8CH_OUT>;
0547 clock-names = "mclk";
0548 realtek,in1-differential;
0549 #sound-dai-cells = <0>;
0550 pinctrl-names = "default";
0551 pinctrl-0 = <&rt5640_hpcon>;
0552 };
0553 };
0554
0555 &i2c3 {
0556 i2c-scl-rising-time-ns = <450>;
0557 i2c-scl-falling-time-ns = <15>;
0558 status = "okay";
0559 };
0560
0561 &i2c4 {
0562 i2c-scl-rising-time-ns = <600>;
0563 i2c-scl-falling-time-ns = <20>;
0564 status = "okay";
0565
0566 fusb0: typec-portc@22 {
0567 compatible = "fcs,fusb302";
0568 reg = <0x22>;
0569 interrupt-parent = <&gpio1>;
0570 interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
0571 pinctrl-names = "default";
0572 pinctrl-0 = <&fusb0_int>;
0573 vbus-supply = <&vcc5v0_typec>;
0574 status = "okay";
0575
0576 connector {
0577 compatible = "usb-c-connector";
0578 data-role = "host";
0579 label = "USB-C";
0580 op-sink-microwatt = <1000000>;
0581 power-role = "dual";
0582 sink-pdos =
0583 <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
0584 source-pdos =
0585 <PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>;
0586 try-power-role = "sink";
0587
0588 ports {
0589 #address-cells = <1>;
0590 #size-cells = <0>;
0591
0592 port@0 {
0593 reg = <0>;
0594
0595 usbc_hs: endpoint {
0596 remote-endpoint =
0597 <&u2phy0_typec_hs>;
0598 };
0599 };
0600
0601 port@1 {
0602 reg = <1>;
0603
0604 usbc_ss: endpoint {
0605 remote-endpoint =
0606 <&tcphy0_typec_ss>;
0607 };
0608 };
0609 };
0610 };
0611 };
0612
0613 accelerometer@68 {
0614 compatible = "invensense,mpu6500";
0615 reg = <0x68>;
0616 interrupt-parent = <&gpio1>;
0617 interrupts = <RK_PC6 IRQ_TYPE_EDGE_RISING>;
0618 };
0619 };
0620
0621 &i2s0 {
0622 rockchip,playback-channels = <8>;
0623 rockchip,capture-channels = <8>;
0624 status = "okay";
0625 };
0626
0627 &i2s1 {
0628 rockchip,playback-channels = <2>;
0629 rockchip,capture-channels = <2>;
0630 status = "okay";
0631 };
0632
0633 &i2s2 {
0634 status = "okay";
0635 };
0636
0637 &io_domains {
0638 status = "okay";
0639
0640 bt656-supply = <&vcc1v8_dvp>;
0641 audio-supply = <&vcca1v8_codec>;
0642 sdmmc-supply = <&vcc_sdio>;
0643 gpio1830-supply = <&vcc_3v0>;
0644 };
0645
0646 &pcie_phy {
0647 status = "okay";
0648 };
0649
0650 &pcie0 {
0651 ep-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
0652 num-lanes = <4>;
0653 pinctrl-names = "default";
0654 pinctrl-0 = <&pcie_clkreqn_cpm>;
0655 status = "okay";
0656 };
0657
0658 &pmu_io_domains {
0659 pmu1830-supply = <&vcc_3v0>;
0660 status = "okay";
0661 };
0662
0663 &pinctrl {
0664 buttons {
0665 pwrbtn: pwrbtn {
0666 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
0667 };
0668 };
0669
0670 fusb302x {
0671 fusb0_int: fusb0-int {
0672 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
0673 };
0674 };
0675
0676 ir {
0677 ir_int: ir-int {
0678 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
0679 };
0680 };
0681
0682 lcd-panel {
0683 lcd_panel_reset: lcd-panel-reset {
0684 rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
0685 };
0686 };
0687
0688 leds {
0689 work_led_pin: work-led-pin {
0690 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
0691 };
0692
0693 diy_led_pin: diy-led-pin {
0694 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
0695 };
0696 };
0697
0698 pcie {
0699 pcie_pwr_en: pcie-pwr-en {
0700 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
0701 };
0702
0703 pcie_3g_drv: pcie-3g-drv {
0704 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
0705 };
0706 };
0707
0708 pmic {
0709 pmic_int_l: pmic-int-l {
0710 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
0711 };
0712
0713 vsel1_pin: vsel1-pin {
0714 rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
0715 };
0716
0717 vsel2_pin: vsel2-pin {
0718 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
0719 };
0720 };
0721
0722 rt5640 {
0723 rt5640_hpcon: rt5640-hpcon {
0724 rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
0725 };
0726 };
0727
0728 sdio-pwrseq {
0729 wifi_enable_h: wifi-enable-h {
0730 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
0731 };
0732 };
0733
0734 usb-typec {
0735 vcc5v0_typec_en: vcc5v0_typec_en {
0736 rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
0737 };
0738 };
0739
0740 usb2 {
0741 vcc5v0_host_en: vcc5v0-host-en {
0742 rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
0743 };
0744 };
0745
0746 wifi {
0747 wifi_host_wake_l: wifi-host-wake-l {
0748 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
0749 };
0750 };
0751 };
0752
0753 &pwm0 {
0754 status = "okay";
0755 };
0756
0757 &pwm2 {
0758 status = "okay";
0759 };
0760
0761 &saradc {
0762 vref-supply = <&vcca1v8_s3>;
0763 status = "okay";
0764 };
0765
0766 &sdio0 {
0767 /* WiFi & BT combo module Ampak AP6356S */
0768 bus-width = <4>;
0769 cap-sdio-irq;
0770 cap-sd-highspeed;
0771 keep-power-in-suspend;
0772 mmc-pwrseq = <&sdio_pwrseq>;
0773 non-removable;
0774 pinctrl-names = "default";
0775 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
0776 sd-uhs-sdr104;
0777
0778 /* Power supply */
0779 vqmmc-supply = <&vcc1v8_s3>; /* IO line */
0780 vmmc-supply = <&vcc_sdio>; /* card's power */
0781
0782 #address-cells = <1>;
0783 #size-cells = <0>;
0784 status = "okay";
0785
0786 brcmf: wifi@1 {
0787 reg = <1>;
0788 compatible = "brcm,bcm4329-fmac";
0789 interrupt-parent = <&gpio0>;
0790 interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
0791 interrupt-names = "host-wake";
0792 brcm,drive-strength = <5>;
0793 pinctrl-names = "default";
0794 pinctrl-0 = <&wifi_host_wake_l>;
0795 };
0796 };
0797
0798 &sdmmc {
0799 bus-width = <4>;
0800 cap-mmc-highspeed;
0801 cap-sd-highspeed;
0802 cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
0803 disable-wp;
0804 max-frequency = <150000000>;
0805 pinctrl-names = "default";
0806 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
0807 status = "okay";
0808 };
0809
0810 &sdhci {
0811 bus-width = <8>;
0812 mmc-hs400-1_8v;
0813 mmc-hs400-enhanced-strobe;
0814 non-removable;
0815 status = "okay";
0816 };
0817
0818 &spdif {
0819 pinctrl-0 = <&spdif_bus_1>;
0820 status = "okay";
0821
0822 spdif_p0: port {
0823 spdif_p0_0: endpoint {
0824 remote-endpoint = <&dit_p0_0>;
0825 };
0826 };
0827 };
0828
0829 &tcphy0 {
0830 status = "okay";
0831 };
0832
0833 &tcphy0_usb3 {
0834 port {
0835 tcphy0_typec_ss: endpoint {
0836 remote-endpoint = <&usbc_ss>;
0837 };
0838 };
0839 };
0840
0841 &tcphy1 {
0842 status = "okay";
0843 };
0844
0845 &tsadc {
0846 /* tshut mode 0:CRU 1:GPIO */
0847 rockchip,hw-tshut-mode = <1>;
0848 /* tshut polarity 0:LOW 1:HIGH */
0849 rockchip,hw-tshut-polarity = <1>;
0850 status = "okay";
0851 };
0852
0853 &u2phy0 {
0854 status = "okay";
0855
0856 u2phy0_otg: otg-port {
0857 status = "okay";
0858 };
0859
0860 u2phy0_host: host-port {
0861 phy-supply = <&vcc5v0_host>;
0862 status = "okay";
0863 };
0864
0865 port {
0866 u2phy0_typec_hs: endpoint {
0867 remote-endpoint = <&usbc_hs>;
0868 };
0869 };
0870 };
0871
0872 &u2phy1 {
0873 status = "okay";
0874
0875 u2phy1_otg: otg-port {
0876 status = "okay";
0877 };
0878
0879 u2phy1_host: host-port {
0880 phy-supply = <&vcc5v0_host>;
0881 status = "okay";
0882 };
0883 };
0884
0885 &uart0 {
0886 pinctrl-names = "default";
0887 pinctrl-0 = <&uart0_xfer &uart0_cts>;
0888 status = "okay";
0889 };
0890
0891 &uart2 {
0892 status = "okay";
0893 };
0894
0895 &usb_host0_ehci {
0896 status = "okay";
0897 };
0898
0899 &usb_host0_ohci {
0900 status = "okay";
0901 };
0902
0903 &usb_host1_ehci {
0904 status = "okay";
0905 };
0906
0907 &usb_host1_ohci {
0908 status = "okay";
0909 };
0910
0911 &usbdrd3_0 {
0912 status = "okay";
0913 };
0914
0915 &usbdrd_dwc3_0 {
0916 status = "okay";
0917 dr_mode = "otg";
0918 };
0919
0920 &usbdrd3_1 {
0921 status = "okay";
0922 };
0923
0924 &usbdrd_dwc3_1 {
0925 status = "okay";
0926 dr_mode = "host";
0927 };
0928
0929 &vopb {
0930 status = "okay";
0931 };
0932
0933 &vopb_mmu {
0934 status = "okay";
0935 };
0936
0937 &vopl {
0938 status = "okay";
0939 };
0940
0941 &vopl_mmu {
0942 status = "okay";
0943 };