1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd 4 */ 5 6/dts-v1/; 7#include <dt-bindings/gpio/gpio.h> 8#include <dt-bindings/input/input.h> 9#include <dt-bindings/pinctrl/rockchip.h> 10#include "px30.dtsi" 11 12/ { 13 model = "Rockchip PX30 EVB"; 14 compatible = "rockchip,px30-evb", "rockchip,px30"; 15 16 chosen { 17 stdout-path = "serial5:115200n8"; 18 }; 19 20 adc-keys { 21 compatible = "adc-keys"; 22 io-channels = <&saradc 2>; 23 io-channel-names = "buttons"; 24 keyup-threshold-microvolt = <1800000>; 25 poll-interval = <100>; 26 27 esc-key { 28 label = "esc"; 29 linux,code = <KEY_ESC>; 30 press-threshold-microvolt = <1310000>; 31 }; 32 33 home-key { 34 label = "home"; 35 linux,code = <KEY_HOME>; 36 press-threshold-microvolt = <624000>; 37 }; 38 39 menu-key { 40 label = "menu"; 41 linux,code = <KEY_MENU>; 42 press-threshold-microvolt = <987000>; 43 }; 44 45 vol-down-key { 46 label = "volume down"; 47 linux,code = <KEY_VOLUMEDOWN>; 48 press-threshold-microvolt = <300000>; 49 }; 50 51 vol-up-key { 52 label = "volume up"; 53 linux,code = <KEY_VOLUMEUP>; 54 press-threshold-microvolt = <17000>; 55 }; 56 }; 57 58 backlight: backlight { 59 compatible = "pwm-backlight"; 60 pwms = <&pwm1 0 25000 0>; 61 power-supply = <&vcc3v3_lcd>; 62 }; 63 64 emmc_pwrseq: emmc-pwrseq { 65 compatible = "mmc-pwrseq-emmc"; 66 pinctrl-0 = <&emmc_reset>; 67 pinctrl-names = "default"; 68 reset-gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>; 69 }; 70 71 sdio_pwrseq: sdio-pwrseq { 72 compatible = "mmc-pwrseq-simple"; 73 pinctrl-names = "default"; 74 pinctrl-0 = <&wifi_enable_h>; 75 76 /* 77 * On the module itself this is one of these (depending 78 * on the actual card populated): 79 * - SDIO_RESET_L_WL_REG_ON 80 * - PDN (power down when low) 81 */ 82 reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; /* GPIO3_A4 */ 83 }; 84 85 vcc5v0_sys: vccsys { 86 compatible = "regulator-fixed"; 87 regulator-name = "vcc5v0_sys"; 88 regulator-always-on; 89 regulator-boot-on; 90 regulator-min-microvolt = <5000000>; 91 regulator-max-microvolt = <5000000>; 92 }; 93}; 94 95&cpu0 { 96 cpu-supply = <&vdd_arm>; 97}; 98 99&cpu1 { 100 cpu-supply = <&vdd_arm>; 101}; 102 103&cpu2 { 104 cpu-supply = <&vdd_arm>; 105}; 106 107&cpu3 { 108 cpu-supply = <&vdd_arm>; 109}; 110 111&display_subsystem { 112 status = "okay"; 113}; 114 115&emmc { 116 bus-width = <8>; 117 cap-mmc-highspeed; 118 mmc-hs200-1_8v; 119 non-removable; 120 mmc-pwrseq = <&emmc_pwrseq>; 121 vmmc-supply = <&vcc_3v0>; 122 vqmmc-supply = <&vccio_flash>; 123 status = "okay"; 124}; 125 126&gmac { 127 clock_in_out = "output"; 128 phy-supply = <&vcc_rmii>; 129 snps,reset-gpio = <&gpio2 13 GPIO_ACTIVE_LOW>; 130 snps,reset-active-low; 131 snps,reset-delays-us = <0 50000 50000>; 132 status = "okay"; 133}; 134 135&i2c0 { 136 status = "okay"; 137 138 rk809: pmic@20 { 139 compatible = "rockchip,rk809"; 140 reg = <0x20>; 141 interrupt-parent = <&gpio0>; 142 interrupts = <7 IRQ_TYPE_LEVEL_LOW>; 143 pinctrl-names = "default"; 144 pinctrl-0 = <&pmic_int>; 145 rockchip,system-power-controller; 146 wakeup-source; 147 #clock-cells = <0>; 148 clock-output-names = "xin32k"; 149 150 vcc1-supply = <&vcc5v0_sys>; 151 vcc2-supply = <&vcc5v0_sys>; 152 vcc3-supply = <&vcc5v0_sys>; 153 vcc4-supply = <&vcc5v0_sys>; 154 vcc5-supply = <&vcc3v3_sys>; 155 vcc6-supply = <&vcc3v3_sys>; 156 vcc7-supply = <&vcc3v3_sys>; 157 vcc8-supply = <&vcc3v3_sys>; 158 vcc9-supply = <&vcc5v0_sys>; 159 160 regulators { 161 vdd_log: DCDC_REG1 { 162 regulator-name = "vdd_log"; 163 regulator-min-microvolt = <950000>; 164 regulator-max-microvolt = <1350000>; 165 regulator-ramp-delay = <6001>; 166 regulator-always-on; 167 regulator-boot-on; 168 169 regulator-state-mem { 170 regulator-on-in-suspend; 171 regulator-suspend-microvolt = <950000>; 172 }; 173 }; 174 175 vdd_arm: DCDC_REG2 { 176 regulator-name = "vdd_arm"; 177 regulator-min-microvolt = <950000>; 178 regulator-max-microvolt = <1350000>; 179 regulator-ramp-delay = <6001>; 180 regulator-always-on; 181 regulator-boot-on; 182 183 regulator-state-mem { 184 regulator-off-in-suspend; 185 regulator-suspend-microvolt = <950000>; 186 }; 187 }; 188 189 vcc_ddr: DCDC_REG3 { 190 regulator-name = "vcc_ddr"; 191 regulator-always-on; 192 regulator-boot-on; 193 194 regulator-state-mem { 195 regulator-on-in-suspend; 196 }; 197 }; 198 199 vcc_3v0: vcc_rmii: DCDC_REG4 { 200 regulator-name = "vcc_3v0"; 201 regulator-min-microvolt = <3000000>; 202 regulator-max-microvolt = <3000000>; 203 regulator-always-on; 204 regulator-boot-on; 205 206 regulator-state-mem { 207 regulator-on-in-suspend; 208 regulator-suspend-microvolt = <3000000>; 209 }; 210 }; 211 212 vcc3v3_sys: DCDC_REG5 { 213 regulator-name = "vcc3v3_sys"; 214 regulator-min-microvolt = <3300000>; 215 regulator-max-microvolt = <3300000>; 216 regulator-always-on; 217 regulator-boot-on; 218 219 regulator-state-mem { 220 regulator-on-in-suspend; 221 regulator-suspend-microvolt = <3300000>; 222 }; 223 }; 224 225 vcc_1v0: LDO_REG1 { 226 regulator-name = "vcc_1v0"; 227 regulator-min-microvolt = <1000000>; 228 regulator-max-microvolt = <1000000>; 229 regulator-always-on; 230 regulator-boot-on; 231 232 regulator-state-mem { 233 regulator-on-in-suspend; 234 regulator-suspend-microvolt = <1000000>; 235 }; 236 }; 237 238 vcc_1v8: vccio_flash: vccio_sdio: LDO_REG2 { 239 regulator-name = "vcc_1v8"; 240 regulator-min-microvolt = <1800000>; 241 regulator-max-microvolt = <1800000>; 242 regulator-always-on; 243 regulator-boot-on; 244 245 regulator-state-mem { 246 regulator-on-in-suspend; 247 regulator-suspend-microvolt = <1800000>; 248 }; 249 }; 250 251 vdd_1v0: LDO_REG3 { 252 regulator-name = "vdd_1v0"; 253 regulator-min-microvolt = <1000000>; 254 regulator-max-microvolt = <1000000>; 255 regulator-always-on; 256 regulator-boot-on; 257 258 regulator-state-mem { 259 regulator-on-in-suspend; 260 regulator-suspend-microvolt = <1000000>; 261 }; 262 }; 263 264 vcc3v0_pmu: LDO_REG4 { 265 regulator-name = "vcc3v0_pmu"; 266 regulator-min-microvolt = <3000000>; 267 regulator-max-microvolt = <3000000>; 268 regulator-always-on; 269 regulator-boot-on; 270 271 regulator-state-mem { 272 regulator-on-in-suspend; 273 regulator-suspend-microvolt = <3000000>; 274 }; 275 }; 276 277 vccio_sd: LDO_REG5 { 278 regulator-name = "vccio_sd"; 279 regulator-min-microvolt = <1800000>; 280 regulator-max-microvolt = <3300000>; 281 regulator-always-on; 282 regulator-boot-on; 283 284 regulator-state-mem { 285 regulator-on-in-suspend; 286 regulator-suspend-microvolt = <3300000>; 287 }; 288 }; 289 290 vcc_sd: LDO_REG6 { 291 regulator-name = "vcc_sd"; 292 regulator-min-microvolt = <3300000>; 293 regulator-max-microvolt = <3300000>; 294 regulator-boot-on; 295 296 regulator-state-mem { 297 regulator-on-in-suspend; 298 regulator-suspend-microvolt = <3300000>; 299 }; 300 }; 301 302 vcc2v8_dvp: LDO_REG7 { 303 regulator-name = "vcc2v8_dvp"; 304 regulator-min-microvolt = <2800000>; 305 regulator-max-microvolt = <2800000>; 306 regulator-boot-on; 307 308 regulator-state-mem { 309 regulator-off-in-suspend; 310 regulator-suspend-microvolt = <2800000>; 311 }; 312 }; 313 314 vcc1v8_dvp: LDO_REG8 { 315 regulator-name = "vcc1v8_dvp"; 316 regulator-min-microvolt = <1800000>; 317 regulator-max-microvolt = <1800000>; 318 regulator-boot-on; 319 320 regulator-state-mem { 321 regulator-on-in-suspend; 322 regulator-suspend-microvolt = <1800000>; 323 }; 324 }; 325 326 vcc1v5_dvp: LDO_REG9 { 327 regulator-name = "vcc1v5_dvp"; 328 regulator-min-microvolt = <1500000>; 329 regulator-max-microvolt = <1500000>; 330 regulator-boot-on; 331 332 regulator-state-mem { 333 regulator-off-in-suspend; 334 regulator-suspend-microvolt = <1500000>; 335 }; 336 }; 337 338 vcc3v3_lcd: SWITCH_REG1 { 339 regulator-name = "vcc3v3_lcd"; 340 regulator-boot-on; 341 }; 342 343 vcc5v0_host: SWITCH_REG2 { 344 regulator-name = "vcc5v0_host"; 345 regulator-always-on; 346 regulator-boot-on; 347 }; 348 }; 349 }; 350}; 351 352&i2c1 { 353 status = "okay"; 354 355 sensor@d { 356 compatible = "asahi-kasei,ak8963"; 357 reg = <0x0d>; 358 gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; 359 vdd-supply = <&vcc3v0_pmu>; 360 mount-matrix = "1", /* x0 */ 361 "0", /* y0 */ 362 "0", /* z0 */ 363 "0", /* x1 */ 364 "1", /* y1 */ 365 "0", /* z1 */ 366 "0", /* x2 */ 367 "0", /* y2 */ 368 "1"; /* z2 */ 369 }; 370 371 touchscreen@14 { 372 compatible = "goodix,gt1151"; 373 reg = <0x14>; 374 interrupt-parent = <&gpio0>; 375 interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>; 376 irq-gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; 377 reset-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; 378 VDDIO-supply = <&vcc3v3_lcd>; 379 }; 380 381 sensor@4c { 382 compatible = "fsl,mma7660"; 383 reg = <0x4c>; 384 interrupt-parent = <&gpio0>; 385 interrupts = <RK_PB7 IRQ_TYPE_LEVEL_LOW>; 386 }; 387}; 388 389&i2s1_2ch { 390 status = "okay"; 391}; 392 393&io_domains { 394 status = "okay"; 395 396 vccio1-supply = <&vccio_sdio>; 397 vccio2-supply = <&vccio_sd>; 398 vccio3-supply = <&vcc_3v0>; 399 vccio4-supply = <&vcc3v0_pmu>; 400 vccio5-supply = <&vcc_3v0>; 401 vccio6-supply = <&vccio_flash>; 402}; 403 404&pinctrl { 405 headphone { 406 hp_det: hp-det { 407 rockchip,pins = 408 <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>; 409 }; 410 }; 411 412 emmc { 413 emmc_reset: emmc-reset { 414 rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; 415 }; 416 }; 417 418 pmic { 419 pmic_int: pmic_int { 420 rockchip,pins = 421 <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; 422 }; 423 424 soc_slppin_gpio: soc_slppin_gpio { 425 rockchip,pins = 426 <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>; 427 }; 428 429 soc_slppin_slp: soc_slppin_slp { 430 rockchip,pins = 431 <0 RK_PA4 1 &pcfg_pull_none>; 432 }; 433 434 soc_slppin_rst: soc_slppin_rst { 435 rockchip,pins = 436 <0 RK_PA4 2 &pcfg_pull_none>; 437 }; 438 }; 439 440 sdio-pwrseq { 441 wifi_enable_h: wifi-enable-h { 442 rockchip,pins = 443 <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 444 }; 445 }; 446}; 447 448&pmu_io_domains { 449 status = "okay"; 450 451 pmuio1-supply = <&vcc3v0_pmu>; 452 pmuio2-supply = <&vcc3v0_pmu>; 453}; 454 455&pwm1 { 456 status = "okay"; 457}; 458 459&saradc { 460 vref-supply = <&vcc_1v8>; 461 status = "okay"; 462}; 463 464&sdmmc { 465 bus-width = <4>; 466 cap-mmc-highspeed; 467 cap-sd-highspeed; 468 card-detect-delay = <800>; 469 sd-uhs-sdr12; 470 sd-uhs-sdr25; 471 sd-uhs-sdr50; 472 sd-uhs-sdr104; 473 vmmc-supply = <&vcc_sd>; 474 vqmmc-supply = <&vccio_sd>; 475 status = "okay"; 476}; 477 478&sdio { 479 bus-width = <4>; 480 cap-sd-highspeed; 481 keep-power-in-suspend; 482 non-removable; 483 mmc-pwrseq = <&sdio_pwrseq>; 484 sd-uhs-sdr104; 485 status = "okay"; 486}; 487 488&u2phy { 489 status = "okay"; 490 491 u2phy_host: host-port { 492 status = "okay"; 493 }; 494 495 u2phy_otg: otg-port { 496 status = "okay"; 497 }; 498}; 499 500&uart1 { 501 pinctrl-names = "default"; 502 pinctrl-0 = <&uart1_xfer &uart1_cts>; 503 status = "okay"; 504}; 505 506&uart5 { 507 status = "okay"; 508}; 509 510&usb20_otg { 511 status = "okay"; 512}; 513 514&usb_host0_ehci { 515 status = "okay"; 516}; 517 518&usb_host0_ohci { 519 status = "okay"; 520}; 521 522&vopb { 523 status = "okay"; 524}; 525 526&vopb_mmu { 527 status = "okay"; 528}; 529 530&vopl { 531 status = "okay"; 532}; 533 534&vopl_mmu { 535 status = "okay"; 536}; 537