1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2014, 2015 FUKAUMI Naoki <naobsd@gmail.com> 4 */ 5 6/dts-v1/; 7#include <dt-bindings/input/input.h> 8#include "rk3066a.dtsi" 9 10/ { 11 model = "Rayeager PX2"; 12 compatible = "chipspark,rayeager-px2", "rockchip,rk3066a"; 13 14 memory@60000000 { 15 device_type = "memory"; 16 reg = <0x60000000 0x40000000>; 17 }; 18 19 ir: ir-receiver { 20 compatible = "gpio-ir-receiver"; 21 gpios = <&gpio6 RK_PA1 GPIO_ACTIVE_LOW>; 22 pinctrl-names = "default"; 23 pinctrl-0 = <&ir_int>; 24 }; 25 26 vdd_logic: vdd-logic { 27 compatible = "pwm-regulator"; 28 29 pwms = <&pwm3 0 25000>; 30 pwm-dutycycle-range = <100 0>; 31 32 regulator-name = "vdd_logic"; 33 regulator-always-on; 34 regulator-boot-on; 35 regulator-min-microvolt = <925000>; 36 regulator-max-microvolt = <1400000>; 37 status = "okay"; 38 }; 39 40 keys: gpio-keys { 41 compatible = "gpio-keys"; 42 43 power { 44 wakeup-source; 45 gpios = <&gpio6 RK_PA2 GPIO_ACTIVE_LOW>; 46 label = "GPIO Power"; 47 linux,code = <KEY_POWER>; 48 pinctrl-names = "default"; 49 pinctrl-0 = <&pwr_key>; 50 }; 51 }; 52 53 sdio_pwrseq: sdio-pwrseq { 54 compatible = "mmc-pwrseq-simple"; 55 clock-names = "ext_clock"; 56 pinctrl-names = "default"; 57 pinctrl-0 = <&wifi_reg_on>; 58 59 /* 60 * On the module itself this is one of these (depending 61 * on the actual card populated): 62 * - SDIO_RESET_L_WL_REG_ON 63 * - PDN (power down when low) 64 */ 65 reset-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>; /* GPIO3_D0 */ 66 }; 67 68 wireless-wlan { 69 compatible = "wlan-platdata"; 70 rockchip,grf = <&grf>; 71 wifi_chip_type = "ap6330"; 72 sdio_vref = <1800>; 73 74 pinctrl-names = "default"; 75 pinctrl-0 = <&wifi_host_wake>; 76 WIFI,host_wake_irq = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* GPIO3_D2 */ 77 status = "okay"; 78 }; 79 80 wireless-bluetooth { 81 compatible = "bluetooth-platdata"; 82 clock-names = "ext_clock"; 83 //wifi-bt-power-toggle; 84 uart_rts_gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; /* GPIO2_C3 */ 85 pinctrl-names = "default", "rts_gpio"; 86 pinctrl-0 = <&uart0_rts>; 87 pinctrl-1 = <&uart0_gpios>; 88 //BT,power_gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>; /* GPIOx_xx */ 89 BT,reset_gpio = <&gpio3 25 GPIO_ACTIVE_HIGH>; /* GPIO3_D1 */ 90 BT,wake_gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>; /* GPIO3_C6 */ 91 BT,wake_host_irq = <&gpio3 23 GPIO_ACTIVE_HIGH>; /* GPIO3_C7 */ 92 status = "okay"; 93 }; 94 95 96 vdd_log: vdd-log { 97 compatible = "pwm-regulator"; 98 pwms = <&pwm3 0 1000>; 99 regulator-name = "vdd_log"; 100 regulator-min-microvolt = <1200000>; 101 regulator-max-microvolt = <1200000>; 102 regulator-always-on; 103 voltage-table = <1000000 100>, 104 <1200000 42>; 105 status = "okay"; 106 }; 107 108 vsys: vsys-regulator { 109 compatible = "regulator-fixed"; 110 regulator-name = "vsys"; 111 regulator-min-microvolt = <5000000>; 112 regulator-max-microvolt = <5000000>; 113 regulator-always-on; 114 regulator-boot-on; 115 }; 116 117 /* input for 5V_STDBY is VSYS or DC5V, selectable by jumper J4 */ 118 vcc_stdby: 5v-stdby-regulator { 119 compatible = "regulator-fixed"; 120 regulator-name = "5v_stdby"; 121 regulator-min-microvolt = <5000000>; 122 regulator-max-microvolt = <5000000>; 123 regulator-always-on; 124 regulator-boot-on; 125 }; 126 127 vcc_emmc: emmc-regulator { 128 compatible = "regulator-fixed"; 129 regulator-name = "emmc_vccq"; 130 regulator-min-microvolt = <3000000>; 131 regulator-max-microvolt = <3000000>; 132 vin-supply = <&vsys>; 133 }; 134 135 vcc_sata: sata-regulator { 136 compatible = "regulator-fixed"; 137 enable-active-high; 138 gpio = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>; 139 pinctrl-names = "default"; 140 pinctrl-0 = <&sata_pwr>; 141 regulator-name = "usb_5v"; 142 regulator-min-microvolt = <5000000>; 143 regulator-max-microvolt = <5000000>; 144 regulator-always-on; 145 vin-supply = <&vcc_stdby>; 146 }; 147 148 vcc_sd: sdmmc-regulator { 149 compatible = "regulator-fixed"; 150 gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_LOW>; 151 pinctrl-names = "default"; 152 pinctrl-0 = <&sdmmc_pwr>; 153 regulator-name = "vcc_sd"; 154 regulator-min-microvolt = <3300000>; 155 regulator-max-microvolt = <3300000>; 156 startup-delay-us = <100000>; 157 vin-supply = <&vcc_io>; 158 }; 159 160 vcc_host: usb-host-regulator { 161 compatible = "regulator-fixed"; 162 enable-active-high; 163 gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; 164 pinctrl-names = "default"; 165 pinctrl-0 = <&host_drv>; 166 regulator-name = "host-pwr"; 167 regulator-min-microvolt = <5000000>; 168 regulator-max-microvolt = <5000000>; 169 regulator-always-on; 170 vin-supply = <&vcc_stdby>; 171 }; 172 173 vcc_otg: usb-otg-regulator { 174 compatible = "regulator-fixed"; 175 enable-active-high; 176 gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; 177 pinctrl-names = "default"; 178 pinctrl-0 = <&otg_drv>; 179 regulator-name = "vcc_otg"; 180 regulator-min-microvolt = <5000000>; 181 regulator-max-microvolt = <5000000>; 182 regulator-always-on; 183 vin-supply = <&vcc_stdby>; 184 }; 185 186 hdmi_sound: hdmi-sound { 187 compatible = "simple-audio-card"; 188 simple-audio-card,format = "i2s"; 189 simple-audio-card,mclk-fs = <256>; 190 simple-audio-card,name = "rockchip,hdmi"; 191 simple-audio-card,cpu { 192 sound-dai = <&i2s0>; 193 }; 194 simple-audio-card,codec { 195 sound-dai = <&hdmi>; 196 }; 197 }; 198}; 199 200&cpu0 { 201 cpu-supply = <&vdd_arm>; 202}; 203 204&cpu1 { 205 cpu-supply = <&vdd_arm>; 206}; 207 208&cpu0_opp_table { 209 opp-816000000 { 210 status = "okay"; 211 }; 212}; 213 214&gpu_opp_table { 215 opp-300000000 { 216 status = "okay"; 217 }; 218}; 219 220&emac { 221 pinctrl-names = "default"; 222 pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&rmii_rst>; 223 phy = <&phy0>; 224 phy-supply = <&vcc_rmii>; 225 phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; /* PHY_RST */ 226 phy-reset-duration = <10>; /* millisecond */ 227 status = "okay"; 228 229 phy0: ethernet-phy@0 { 230 reg = <0>; 231 reset-gpios = <&gpio1 RK_PD6 GPIO_ACTIVE_LOW>; 232 }; 233}; 234 235&emmc { 236 bus-width = <8>; 237 cap-mmc-highspeed; 238 no-sdio; 239 no-sd; 240 non-removable; 241 pinctrl-names = "default"; 242 pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_rst>; 243 vmmc-supply = <&vcc_emmc>; 244 vqmmc-supply = <&vcc_emmc>; 245 status = "okay"; 246}; 247 248&gpu { 249 status = "okay"; 250}; 251 252&hdmi { 253 #sound-dai-cells = <0>; 254 status = "okay"; 255}; 256 257&i2c0 { 258 clock-frequency = <400000>; 259 status = "okay"; 260 261 ak8963: ak8963@d { 262 compatible = "asahi-kasei,ak8975"; 263 reg = <0x0d>; 264 interrupt-parent = <&gpio4>; 265 interrupts = <RK_PC1 IRQ_TYPE_EDGE_RISING>; 266 pinctrl-names = "default"; 267 pinctrl-0 = <&comp_int>; 268 }; 269 270 mma8452: mma8452@1d { 271 compatible = "fsl,mma8452"; 272 reg = <0x1d>; 273 interrupt-parent = <&gpio4>; 274 interrupts = <RK_PC0 IRQ_TYPE_EDGE_RISING>; 275 pinctrl-names = "default"; 276 pinctrl-0 = <&gsensor_int>; 277 }; 278}; 279 280&i2c1 { 281 clock-frequency = <400000>; 282 status = "okay"; 283 284 tps: tps@2d { 285 reg = <0x2d>; 286 interrupt-parent = <&gpio6>; 287 interrupts = <RK_PA4 IRQ_TYPE_EDGE_RISING>; 288 pinctrl-names = "default"; 289 pinctrl-0 = <&pmic_int>, <&pwr_hold>; 290 291 vcc1-supply = <&vsys>; 292 vcc2-supply = <&vsys>; 293 vcc3-supply = <&vsys>; 294 vcc4-supply = <&vsys>; 295 vcc5-supply = <&vcc_io>; 296 vcc6-supply = <&vcc_io>; 297 vcc7-supply = <&vsys>; 298 vccio-supply = <&vsys>; 299 300 regulators { 301 vcc_rtc: regulator@0 { 302 regulator-name = "vcc_rtc"; 303 regulator-always-on; 304 }; 305 306 vcc_io: regulator@1 { 307 regulator-name = "vcc_io"; 308 regulator-min-microvolt = <3300000>; 309 regulator-max-microvolt = <3300000>; 310 regulator-always-on; 311 }; 312 313 vdd_arm: regulator@2 { 314 regulator-name = "vdd_arm"; 315 regulator-min-microvolt = <600000>; 316 regulator-max-microvolt = <1500000>; 317 regulator-always-on; 318 regulator-boot-on; 319 }; 320 321 vcc_ddr: regulator@3 { 322 regulator-name = "vcc_ddr"; 323 regulator-min-microvolt = <600000>; 324 regulator-max-microvolt = <1500000>; 325 regulator-always-on; 326 regulator-boot-on; 327 }; 328 329 vcc18: regulator@5 { 330 regulator-name = "vcc18"; 331 regulator-min-microvolt = <1800000>; 332 regulator-max-microvolt = <1800000>; 333 regulator-always-on; 334 }; 335 336 vdd_11: regulator@6 { 337 regulator-name = "vdd_11"; 338 regulator-min-microvolt = <1100000>; 339 regulator-max-microvolt = <1100000>; 340 regulator-always-on; 341 }; 342 343 vcc_25: regulator@7 { 344 regulator-name = "vcc_25"; 345 regulator-min-microvolt = <2500000>; 346 regulator-max-microvolt = <2500000>; 347 regulator-always-on; 348 }; 349 350 vccio_wl: regulator@8 { 351 regulator-name = "vccio_wl"; 352 regulator-min-microvolt = <2800000>; 353 regulator-max-microvolt = <2800000>; 354 }; 355 356 vcc25_hdmi: regulator@9 { 357 regulator-name = "vcc25_hdmi"; 358 regulator-min-microvolt = <2500000>; 359 regulator-max-microvolt = <2500000>; 360 regulator-always-on; 361 regulator-boot-on; 362 }; 363 364 vcca_33: regulator@10 { 365 regulator-name = "vcca_33"; 366 regulator-min-microvolt = <3300000>; 367 regulator-max-microvolt = <3300000>; 368 }; 369 370 vcc_rmii: regulator@11 { 371 regulator-name = "vcc_rmii"; 372 regulator-min-microvolt = <3300000>; 373 regulator-max-microvolt = <3300000>; 374 }; 375 376 vcc28_cif: regulator@12 { 377 regulator-name = "vcc28_cif"; 378 regulator-min-microvolt = <2800000>; 379 regulator-max-microvolt = <2800000>; 380 }; 381 }; 382 }; 383}; 384 385#include "tps65910.dtsi" 386 387&i2c2 { 388 status = "okay"; 389}; 390 391&i2c3 { 392 status = "okay"; 393}; 394 395&i2c4 { 396 status = "okay"; 397}; 398 399&i2s0 { 400 #sound-dai-cells = <0>; 401 status = "okay"; 402}; 403 404&mmc0 { 405 bus-width = <4>; 406 disable-wp; 407 no-mmc; 408 no-sdio; 409 pinctrl-names = "default"; 410 pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>; 411 vmmc-supply = <&vcc_sd>; 412 cap-mmc-highspeed; 413 cap-sd-highspeed; 414 status = "okay"; 415}; 416 417&mmc1 { 418 max-frequency = <50000000>; 419 cap-sd-highspeed; 420 keep-power-in-suspend; 421 mmc-pwrseq = <&sdio_pwrseq>; 422 sd-uhs-sdr104; 423 424 bus-width = <4>; 425 non-removable; 426 no-mmc; 427 no-sd; 428 pinctrl-names = "default"; 429 pinctrl-0 = <&sd1_clk>, <&sd1_cmd>, <&sd1_bus4>; 430 vmmc-supply = <&vccio_wl>; 431 status = "okay"; 432}; 433 434&pinctrl { 435 pcfg_output_high: pcfg-output-high { 436 output-high; 437 }; 438 439 ak8963 { 440 comp_int: comp-int { 441 rockchip,pins = <4 RK_PC1 RK_FUNC_GPIO &pcfg_pull_default>; 442 }; 443 }; 444 445 emac { 446 rmii_rst: rmii-rst { 447 rockchip,pins = <1 RK_PD6 RK_FUNC_GPIO &pcfg_output_high>; 448 }; 449 }; 450 451 ir { 452 ir_int: ir-int { 453 rockchip,pins = <6 RK_PA1 RK_FUNC_GPIO &pcfg_pull_default>; 454 }; 455 }; 456 457 keys { 458 pwr_key: pwr-key { 459 rockchip,pins = <6 RK_PA2 RK_FUNC_GPIO &pcfg_pull_default>; 460 }; 461 }; 462 463 mma8452 { 464 gsensor_int: gsensor-int { 465 rockchip,pins = <4 RK_PC0 RK_FUNC_GPIO &pcfg_pull_default>; 466 }; 467 }; 468 469 mmc { 470 sdmmc_pwr: sdmmc-pwr { 471 rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_default>; 472 }; 473 }; 474 475 usb_host { 476 host_drv: host-drv { 477 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_default>; 478 }; 479 480 hub_rst: hub-rst { 481 rockchip,pins = <1 RK_PD7 RK_FUNC_GPIO &pcfg_output_high>; 482 }; 483 484 sata_pwr: sata-pwr { 485 rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_default>; 486 }; 487 488 sata_reset: sata-reset { 489 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_output_high>; 490 }; 491 }; 492 493 usb_otg { 494 otg_drv: otg-drv { 495 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_default>; 496 }; 497 }; 498 499 tps { 500 pmic_int: pmic-int { 501 rockchip,pins = <6 RK_PA4 RK_FUNC_GPIO &pcfg_pull_default>; 502 }; 503 504 pwr_hold: pwr-hold { 505 rockchip,pins = <6 RK_PB0 RK_FUNC_GPIO &pcfg_output_high>; 506 }; 507 }; 508 509 wireless-bluetooth { 510 uart0_gpios: uart0-gpios { 511 rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; 512 }; 513 514 wifi_reg_on: wifi-reg-on { 515 rockchip,pins = <3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>; 516 }; 517 518 wifi_host_wake: wifi-host-wake { 519 rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; 520 }; 521 }; 522}; 523 524&pwm1 { 525 status = "okay"; 526}; 527 528&pwm2 { 529 status = "okay"; 530}; 531 532&pwm3 { 533 status = "okay"; 534}; 535 536&saradc { 537 vref-supply = <&vcc_25>; 538 status = "okay"; 539}; 540 541&spi0 { 542 status = "okay"; 543}; 544 545&uart0 { 546 pinctrl-names = "default"; 547 pinctrl-0 = <&uart0_xfer>, <&uart0_cts>; 548 status = "okay"; 549}; 550 551&uart2 { 552 status = "okay"; 553}; 554 555&uart3 { 556 pinctrl-names = "default"; 557 pinctrl-0 = <&uart3_xfer>, <&uart3_cts>, <&uart3_rts>; 558 status = "okay"; 559}; 560 561&usb_host { 562 pinctrl-names = "default"; 563 pinctrl-0 = <&hub_rst>, <&sata_reset>; 564 status = "okay"; 565}; 566 567&usbphy { 568 status = "okay"; 569}; 570 571&usb_otg { 572 status = "okay"; 573}; 574 575&vop0 { 576 status = "okay"; 577}; 578 579&wdt { 580 status = "okay"; 581}; 582