1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2// Copyright (c) 2020 Fuzhou Rockchip Electronics Co., Ltd 3 4#include <dt-bindings/pwm/pwm.h> 5#include <dt-bindings/input/input.h> 6#include "rk3288.dtsi" 7#include "rk3288-android.dtsi" 8 9/ { 10 model = "Rockchip RK3288 EVB RK628 Board"; 11 compatible = "rockchip,rk3288-evb-rk628", "rockchip,rk3288"; 12 13 chosen: chosen { 14 bootargs = "rootwait earlycon=uart8250,mmio32,0xff690000 vmalloc=496M console=ttyFIQ0 androidboot.baseband=N/A androidboot.veritymode=enforcing androidboot.hardware=rk30board androidboot.console=ttyFIQ0 init=/init kpti=0"; 15 }; 16 17 adc-keys { 18 compatible = "adc-keys"; 19 io-channels = <&saradc 1>; 20 io-channel-names = "buttons"; 21 keyup-threshold-microvolt = <1800000>; 22 poll-interval = <100>; 23 24 vol-up-key { 25 label = "volume up"; 26 linux,code = <KEY_VOLUMEUP>; 27 press-threshold-microvolt = <1000>; 28 }; 29 30 vol-down-key { 31 label = "volume down"; 32 linux,code = <KEY_VOLUMEDOWN>; 33 press-threshold-microvolt = <170000>; 34 }; 35 36 menu { 37 label = "menu"; 38 linux,code = <KEY_MENU>; 39 press-threshold-microvolt = <640000>; 40 }; 41 42 esc { 43 label = "esc"; 44 linux,code = <KEY_ESC>; 45 press-threshold-microvolt = <1000000>; 46 }; 47 48 home { 49 label = "home"; 50 linux,code = <KEY_HOME>; 51 press-threshold-microvolt = <1300000>; 52 }; 53 }; 54 55 backlight: backlight { 56 compatible = "pwm-backlight"; 57 pwms = <&pwm0 0 1000000 0>; 58 brightness-levels = < 59 0 1 2 3 4 5 6 7 60 8 9 10 11 12 13 14 15 61 16 17 18 19 20 21 22 23 62 24 25 26 27 28 29 30 31 63 32 33 34 35 36 37 38 39 64 40 41 42 43 44 45 46 47 65 48 49 50 51 52 53 54 55 66 56 57 58 59 60 61 62 63 67 64 65 66 67 68 69 70 71 68 72 73 74 75 76 77 78 79 69 80 81 82 83 84 85 86 87 70 88 89 90 91 92 93 94 95 71 96 97 98 99 100 101 102 103 72 104 105 106 107 108 109 110 111 73 112 113 114 115 116 117 118 119 74 120 121 122 123 124 125 126 127 75 128 129 130 131 132 133 134 135 76 136 137 138 139 140 141 142 143 77 144 145 146 147 148 149 150 151 78 152 153 154 155 156 157 158 159 79 160 161 162 163 164 165 166 167 80 168 169 170 171 172 173 174 175 81 176 177 178 179 180 181 182 183 82 184 185 186 187 188 189 190 191 83 192 193 194 195 196 197 198 199 84 200 201 202 203 204 205 206 207 85 208 209 210 211 212 213 214 215 86 216 217 218 219 220 221 222 223 87 224 225 226 227 228 229 230 231 88 232 233 234 235 236 237 238 239 89 240 241 242 243 244 245 246 247 90 248 249 250 251 252 253 254 255>; 91 default-brightness-level = <128>; 92 }; 93 94 i2s_mclkin: i2s-mclkin { 95 compatible = "fixed-factor-clock"; 96 #clock-cells = <0>; 97 clocks = <&cru SCLK_I2S0_OUT>; 98 clock-mult = <1>; 99 clock-div = <1>; 100 clock-output-names = "i2s_mclkin"; 101 }; 102 103 sound: sound { 104 compatible = "simple-audio-card"; 105 simple-audio-card,format = "i2s"; 106 simple-audio-card,name = "realtek,rt5651-codec"; 107 simple-audio-card,mclk-fs = <256>; 108 simple-audio-card,widgets = 109 "Microphone", "Microphone Jack", 110 "Headphone", "Headphone Jack"; 111 simple-audio-card,routing = 112 "MIC1", "Microphone Jack", 113 "MIC2", "Microphone Jack", 114 "Microphone Jack", "micbias1", 115 "Headphone Jack", "HPOL", 116 "Headphone Jack", "HPOR"; 117 status = "disabled"; 118 119 simple-audio-card,dai-link@0 { 120 format = "i2s"; 121 cpu { 122 sound-dai = <&i2s>; 123 }; 124 125 codec { 126 sound-dai = <&rt5651>; 127 }; 128 }; 129 130 simple-audio-card,dai-link@1 { 131 format = "i2s"; 132 cpu { 133 sound-dai = <&i2s>; 134 }; 135 136 codec { 137 sound-dai = <&rk628_hdmi>; 138 }; 139 }; 140 }; 141 142 vcc_host: vcc-host-regulator { 143 compatible = "regulator-fixed"; 144 enable-active-high; 145 gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>; 146 pinctrl-names = "default"; 147 pinctrl-0 = <&host_vbus_drv>; 148 regulator-name = "vcc_host"; 149 regulator-always-on; 150 regulator-boot-on; 151 }; 152 153 vcc_sys: vsys-regulator { 154 compatible = "regulator-fixed"; 155 regulator-name = "vcc_sys"; 156 regulator-min-microvolt = <5000000>; 157 regulator-max-microvolt = <5000000>; 158 regulator-always-on; 159 regulator-boot-on; 160 }; 161 162 vdd_log: vdd-logic { 163 compatible = "pwm-regulator"; 164 rockchip,pwm_id = <1>; 165 rockchip,pwm_voltage = <1100000>; 166 pwms = <&pwm1 0 25000 1>; 167 regulator-name = "vcc_log"; 168 regulator-min-microvolt = <860000>; 169 regulator-max-microvolt = <1360000>; 170 regulator-always-on; 171 regulator-boot-on; 172 }; 173 174 xin32k: xin32k { 175 compatible = "fixed-clock"; 176 clock-frequency = <32768>; 177 clock-output-names = "xin32k"; 178 #clock-cells = <0>; 179 }; 180}; 181 182&backlight { 183 /delete-property/ enable-gpios; 184}; 185 186&cpu0 { 187 cpu-supply = <&vdd_cpu>; 188}; 189 190&dfi { 191 status = "okay"; 192}; 193 194&dmc { 195 center-supply = <&vdd_log>; 196 status = "okay"; 197}; 198 199&gpu { 200 mali-supply = <&vdd_gpu>; 201 status = "okay"; 202}; 203 204&i2c0 { 205 clock-frequency = <400000>; 206 status = "okay"; 207 208 rk808: pmic@1b { 209 compatible = "rockchip,rk808"; 210 reg = <0x1b>; 211 interrupt-parent = <&gpio0>; 212 interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 213 pinctrl-names = "default"; 214 pinctrl-0 = <&pmic_int &global_pwroff>; 215 rockchip,system-power-controller; 216 wakeup-source; 217 #clock-cells = <1>; 218 clock-output-names = "rk808-clkout1", "rk808-clkout2"; 219 vcc1-supply = <&vcc_sys>; 220 vcc2-supply = <&vcc_sys>; 221 vcc3-supply = <&vcc_sys>; 222 vcc4-supply = <&vcc_sys>; 223 vcc6-supply = <&vcc_sys>; 224 vcc8-supply = <&vcc_io>; 225 vcc9-supply = <&vcc_io>; 226 vcc12-supply = <&vcc_io>; 227 vddio-supply = <&vcc_io>; 228 229 regulators { 230 vdd_cpu: DCDC_REG1 { 231 regulator-always-on; 232 regulator-boot-on; 233 regulator-min-microvolt = <750000>; 234 regulator-max-microvolt = <1400000>; 235 regulator-name = "vdd_arm"; 236 237 regulator-state-mem { 238 regulator-off-in-suspend; 239 }; 240 }; 241 242 vdd_gpu: DCDC_REG2 { 243 regulator-always-on; 244 regulator-boot-on; 245 regulator-min-microvolt = <850000>; 246 regulator-max-microvolt = <1250000>; 247 regulator-name = "vdd_gpu"; 248 regulator-ramp-delay = <6000>; 249 250 regulator-state-mem { 251 regulator-off-in-suspend; 252 }; 253 }; 254 255 vcc_ddr: DCDC_REG3 { 256 regulator-always-on; 257 regulator-boot-on; 258 regulator-name = "vcc_ddr"; 259 260 regulator-state-mem { 261 regulator-on-in-suspend; 262 }; 263 }; 264 265 vcc_io: DCDC_REG4 { 266 regulator-always-on; 267 regulator-boot-on; 268 regulator-min-microvolt = <3300000>; 269 regulator-max-microvolt = <3300000>; 270 regulator-name = "vcc_io"; 271 272 regulator-state-mem { 273 regulator-on-in-suspend; 274 regulator-suspend-microvolt = <3300000>; 275 }; 276 }; 277 278 vcc_tp: LDO_REG1 { 279 regulator-always-on; 280 regulator-boot-on; 281 regulator-min-microvolt = <3300000>; 282 regulator-max-microvolt = <3300000>; 283 regulator-name = "vcc_tp"; 284 285 regulator-state-mem { 286 regulator-off-in-suspend; 287 }; 288 }; 289 290 vcca_codec: LDO_REG2 { 291 regulator-always-on; 292 regulator-boot-on; 293 regulator-min-microvolt = <3300000>; 294 regulator-max-microvolt = <3300000>; 295 regulator-name = "vcca_codec"; 296 297 regulator-state-mem { 298 regulator-on-in-suspend; 299 regulator-suspend-microvolt = <3300000>; 300 }; 301 }; 302 303 vdd_10: LDO_REG3 { 304 regulator-always-on; 305 regulator-boot-on; 306 regulator-min-microvolt = <1000000>; 307 regulator-max-microvolt = <1000000>; 308 regulator-name = "vdd_10"; 309 310 regulator-state-mem { 311 regulator-on-in-suspend; 312 regulator-suspend-microvolt = <1000000>; 313 }; 314 }; 315 316 vccio_wl: LDO_REG4 { 317 regulator-always-on; 318 regulator-boot-on; 319 regulator-min-microvolt = <1800000>; 320 regulator-max-microvolt = <1800000>; 321 regulator-name = "vccio_wl"; 322 323 regulator-state-mem { 324 regulator-on-in-suspend; 325 }; 326 }; 327 328 vccio_sd: LDO_REG5 { 329 regulator-always-on; 330 regulator-boot-on; 331 regulator-min-microvolt = <1800000>; 332 regulator-max-microvolt = <3300000>; 333 regulator-name = "vccio_sd"; 334 335 regulator-state-mem { 336 regulator-off-in-suspend; 337 }; 338 }; 339 340 vdd10_lcd: LDO_REG6 { 341 regulator-always-on; 342 regulator-boot-on; 343 regulator-min-microvolt = <1000000>; 344 regulator-max-microvolt = <1000000>; 345 regulator-name = "vdd10_lcd"; 346 347 regulator-state-mem { 348 regulator-off-in-suspend; 349 }; 350 }; 351 352 vcc_18: LDO_REG7 { 353 regulator-always-on; 354 regulator-boot-on; 355 regulator-min-microvolt = <1800000>; 356 regulator-max-microvolt = <1800000>; 357 regulator-name = "vcc_18"; 358 359 regulator-state-mem { 360 regulator-on-in-suspend; 361 regulator-suspend-microvolt = <1800000>; 362 }; 363 }; 364 365 vcc18_lcd: LDO_REG8 { 366 regulator-always-on; 367 regulator-boot-on; 368 regulator-min-microvolt = <1800000>; 369 regulator-max-microvolt = <1800000>; 370 regulator-name = "vcc18_lcd"; 371 372 regulator-state-mem { 373 regulator-off-in-suspend; 374 }; 375 }; 376 377 vcc_sd: SWITCH_REG1 { 378 regulator-always-on; 379 regulator-boot-on; 380 regulator-name = "vcc_sd"; 381 382 regulator-state-mem { 383 regulator-off-in-suspend; 384 }; 385 }; 386 387 vcc_lcd: SWITCH_REG2 { 388 regulator-always-on; 389 regulator-boot-on; 390 regulator-name = "vcc_lcd"; 391 392 regulator-state-mem { 393 regulator-off-in-suspend; 394 }; 395 }; 396 }; 397 }; 398}; 399 400&i2c1 { 401 clock-frequency = <400000>; 402 status = "okay"; 403 404 rk628: rk628@50 { 405 reg = <0x50>; 406 interrupt-parent = <&gpio7>; 407 interrupts = <15 IRQ_TYPE_LEVEL_HIGH>; 408 enable-gpios = <&gpio5 RK_PC2 GPIO_ACTIVE_HIGH>; 409 reset-gpios = <&gpio7 RK_PB6 GPIO_ACTIVE_LOW>; 410 status = "okay"; 411 }; 412}; 413 414&i2c2 { 415 status = "okay"; 416 417 rt5651: rt5651@1a { 418 compatible = "rockchip,rt5651"; 419 reg = <0x1a>; 420 clocks = <&cru SCLK_I2S0_OUT>; 421 clock-names = "mclk"; 422 pinctrl-names = "default"; 423 pinctrl-0 = <&i2s0_mclk>; 424 spk-con-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>; 425 hp-det-gpio = <&gpio4 28 GPIO_ACTIVE_LOW>; 426 #sound-dai-cells = <0>; 427 }; 428}; 429 430&i2s { 431 #sound-dai-cells = <0>; 432 status = "okay"; 433}; 434 435#include "rk628.dtsi" 436 437&io_domains { 438 audio-supply = <&vcc_io>; 439 bb-supply = <&vcc_io>; 440 dvp-supply = <&vcc_io>; 441 flash0-supply = <&vcc_18>; 442 gpio30-supply = <&vcc_io>; 443 gpio1830 = <&vcc_io>; 444 lcdc-supply = <&vcc_lcd>; 445 sdcard-supply = <&vccio_sd>; 446 wifi-supply = <&vccio_wl>; 447 status = "okay"; 448}; 449 450&rockchip_suspend { 451 rockchip,pwm-regulator-config = < 452 (0 453 | PWM1_REGULATOR_EN 454 ) 455 >; 456 status = "okay"; 457}; 458 459&pwm0 { 460 status = "okay"; 461}; 462 463&pwm1 { 464 pinctrl-names = "active"; 465 pinctrl-0 = <&pwm1_pin_pull_down>; 466 status = "okay"; 467}; 468 469&emmc { 470 bus-width = <8>; 471 cap-mmc-highspeed; 472 disable-wp; 473 non-removable; 474 num-slots = <1>; 475 pinctrl-names = "default"; 476 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>; 477 max-frequency = <100000000>; 478 mmc-hs200-1_8v; 479 mmc-ddr-1_8v; 480 status = "okay"; 481}; 482 483&saradc { 484 vref-supply = <&vcc_18>; 485 status = "okay"; 486}; 487 488&sdmmc { 489 no-sdio; 490 no-mmc; 491 bus-width = <4>; 492 cap-mmc-highspeed; 493 sd-uhs-sdr12; 494 sd-uhs-sdr25; 495 sd-uhs-sdr50; 496 sd-uhs-sdr104; 497 cap-sd-highspeed; 498 card-detect-delay = <200>; 499 disable-wp; /* wp not hooked up */ 500 num-slots = <1>; 501 pinctrl-names = "default"; 502 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; 503 vmmc-supply = <&vcc_sd>; 504 vqmmc-supply = <&vccio_sd>; 505 no-sdio; 506 no-mmc; 507 status = "okay"; 508}; 509 510&wdt { 511 status = "okay"; 512}; 513 514&pwm0 { 515 status = "okay"; 516}; 517 518&backlight { 519 status = "okay"; 520}; 521 522&rga { 523 status = "okay"; 524}; 525 526&tsadc { 527 rockchip,hw-tshut-polarity = <0>; 528 status = "okay"; 529}; 530 531&usbphy { 532 status = "okay"; 533}; 534 535&usb_host0_ehci { 536 rockchip-relinquish-port; 537 status = "okay"; 538}; 539 540&usb_host0_ohci { 541 status = "okay"; 542}; 543 544&usb_host1 { 545 status = "okay"; 546}; 547 548&usb_otg { 549 status = "okay"; 550}; 551 552&vopb { 553 status = "okay"; 554}; 555 556&vopb_mmu { 557 status = "okay"; 558}; 559 560&vopl { 561 status = "okay"; 562}; 563 564&vopl_mmu { 565 status = "okay"; 566}; 567 568&pinctrl { 569 pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma { 570 drive-strength = <8>; 571 }; 572 573 pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma { 574 bias-pull-up; 575 drive-strength = <8>; 576 }; 577 578 pmic { 579 pmic_int: pmic-int { 580 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>; 581 }; 582 }; 583 584 sdmmc { 585 /* 586 * Default drive strength isn't enough to achieve even 587 * high-speed mode on EVB board so bump up to 8ma. 588 */ 589 sdmmc_bus4: sdmmc-bus4 { 590 rockchip,pins = <6 RK_PC0 1 &pcfg_pull_up_drv_8ma>, 591 <6 RK_PC1 1 &pcfg_pull_up_drv_8ma>, 592 <6 RK_PC2 1 &pcfg_pull_up_drv_8ma>, 593 <6 RK_PC3 1 &pcfg_pull_up_drv_8ma>; 594 }; 595 596 sdmmc_clk: sdmmc-clk { 597 rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_drv_8ma>; 598 }; 599 600 sdmmc_cmd: sdmmc-cmd { 601 rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_8ma>; 602 }; 603 604 sdmmc_pwr: sdmmc-pwr { 605 rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; 606 }; 607 }; 608 609 usb { 610 host_vbus_drv: host-vbus-drv { 611 rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>; 612 }; 613 }; 614}; 615