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