1/* 2 * Copyright (c) 2016, 2017 Jerry Xu <Jerry.xu@rock-chips.com> 3 * 4 * This file is dual-licensed: you can use it either under the terms 5 * of the GPL or the X11 license, at your option. Note that this dual 6 * licensing only applies to this file, and not this project as a 7 * whole. 8 * 9 * a) This file is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU General Public License as 11 * published by the Free Software Foundation; either version 2 of the 12 * License, or (at your option) any later version. 13 * 14 * This file is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU General Public License for more details. 18 * 19 * Or, alternatively, 20 * 21 * b) Permission is hereby granted, free of charge, to any person 22 * obtaining a copy of this software and associated documentation 23 * files (the "Software"), to deal in the Software without 24 * restriction, including without limitation the rights to use, 25 * copy, modify, merge, publish, distribute, sublicense, and/or 26 * sell copies of the Software, and to permit persons to whom the 27 * Software is furnished to do so, subject to the following 28 * conditions: 29 * 30 * The above copyright notice and this permission notice shall be 31 * included in all copies or substantial portions of the Software. 32 * 33 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 40 * OTHER DEALINGS IN THE SOFTWARE. 41 */ 42 43/dts-v1/; 44 45#include "rk3288-evb.dtsi" 46#include "rk3288-android.dtsi" 47 48/ { 49 model = "PopMetal-RK3288"; 50 compatible = "chipspark,popmetal-rk3288", "rockchip,rk3288"; 51 52 panel { 53 compatible ="simple-panel"; 54 power-supply = <&vcc_lcd>; 55 enable-gpios = <&gpio7 21 GPIO_ACTIVE_HIGH>; 56 enable-delay-ms = <10>; 57 ddc-i2c-bus = <&i2c2>; 58 59 display-timings { 60 native-mode = <&timing0>; 61 62 timing0: timing0 { 63 clock-frequency = <74250000>; 64 hactive = <1280>; 65 vactive = <720>; 66 hback-porch = <220>; 67 hfront-porch = <120>; 68 vback-porch = <20>; 69 vfront-porch = <5>; 70 hsync-len = <40>; 71 vsync-len = <5>; 72 hsync-active = <0>; 73 vsync-active = <0>; 74 de-active = <0>; 75 pixelclk-active = <0>; 76 }; 77 }; 78 79 port { 80 panel_in_rgb: endpoint { 81 remote-endpoint = <&rgb_out_panel>; 82 }; 83 }; 84 }; 85 86 sdio_pwrseq: sdio-pwrseq { 87 compatible = "mmc-pwrseq-simple"; 88 clocks = <&rk808 1>; 89 clock-names = "ext_clock"; 90 91 /* 92 * On the module itself this is one of these (depending 93 * on the actual card populated): 94 * - SDIO_RESET_L_WL_REG_ON 95 * - PDN (power down when low) 96 */ 97 reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>; 98 }; 99 100 wireless-bluetooth { 101 clocks = <&rk808 1>; 102 clock-names = "ext_clock"; 103 }; 104 105 memory@0 { 106 device_type = "memory"; 107 reg = <0x0 0x0 0x0 0x80000000>; 108 }; 109 110 ext_gmac: external-gmac-clock { 111 compatible = "fixed-clock"; 112 clock-frequency = <125000000>; 113 clock-output-names = "ext_gmac"; 114 #clock-cells = <0>; 115 }; 116 117 gpio-keys { 118 compatible = "gpio-keys"; 119 #address-cells = <1>; 120 #size-cells = <0>; 121 autorepeat; 122 123 pinctrl-names = "default"; 124 pinctrl-0 = <&pwrbtn>; 125 126 button@0 { 127 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; 128 linux,code = <116>; 129 label = "GPIO Key Power"; 130 linux,input-type = <1>; 131 gpio-key,wakeup = <1>; 132 debounce-interval = <100>; 133 }; 134 }; 135 136 ir: ir-receiver { 137 compatible = "gpio-ir-receiver"; 138 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; 139 pinctrl-names = "default"; 140 pinctrl-0 = <&ir_int>; 141 }; 142 143 vcc_flash: flash-regulator { 144 compatible = "regulator-fixed"; 145 regulator-name = "vcc_flash"; 146 regulator-min-microvolt = <1800000>; 147 regulator-max-microvolt = <1800000>; 148 vin-supply = <&vcc_io>; 149 }; 150 151 vcc_sd: sdmmc-regulator { 152 compatible = "regulator-fixed"; 153 gpio = <&gpio7 11 GPIO_ACTIVE_LOW>; 154 pinctrl-names = "default"; 155 pinctrl-0 = <&sdmmc_pwr>; 156 regulator-name = "vcc_sd"; 157 regulator-min-microvolt = <3300000>; 158 regulator-max-microvolt = <3300000>; 159 startup-delay-us = <100000>; 160 vin-supply = <&vcc_io>; 161 }; 162 163 vcc_sys: vsys-regulator { 164 compatible = "regulator-fixed"; 165 regulator-name = "vcc_sys"; 166 regulator-min-microvolt = <5000000>; 167 regulator-max-microvolt = <5000000>; 168 regulator-always-on; 169 regulator-boot-on; 170 }; 171 172 /* 173 * A PT5128 creates both dovdd_1v8 and vcc28_dvp, controlled 174 * by the dvp_pwr pin. 175 */ 176 vcc18_dvp: vcc18-dvp-regulator { 177 compatible = "regulator-fixed"; 178 regulator-name = "vcc18-dvp"; 179 regulator-min-microvolt = <1800000>; 180 regulator-max-microvolt = <1800000>; 181 vin-supply = <&vcc28_dvp>; 182 }; 183 184 vcc28_dvp: vcc28-dvp-regulator { 185 compatible = "regulator-fixed"; 186 enable-active-high; 187 gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>; 188 pinctrl-names = "default"; 189 pinctrl-0 = <&dvp_pwr>; 190 regulator-name = "vcc28_dvp"; 191 regulator-min-microvolt = <2800000>; 192 regulator-max-microvolt = <2800000>; 193 regulator-always-on; 194 vin-supply = <&vcc_io>; 195 }; 196 197 xin32k: xin32k { 198 compatible = "fixed-clock"; 199 clock-frequency = <32768>; 200 clock-output-names = "xin32k"; 201 #clock-cells = <0>; 202 }; 203}; 204 205&cpu0 { 206 cpu0-supply = <&vdd_cpu>; 207}; 208 209&emmc { 210 bus-width = <8>; 211 cap-mmc-highspeed; 212 disable-wp; 213 non-removable; 214 num-slots = <1>; 215 pinctrl-names = "default"; 216 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>; 217 vmmc-supply = <&vcc_io>; 218 vqmmc-supply = <&vcc_flash>; 219 status = "okay"; 220}; 221 222&sdmmc { 223 bus-width = <4>; 224 cap-mmc-highspeed; 225 cap-sd-highspeed; 226 card-detect-delay = <200>; 227 disable-wp; /* wp not hooked up */ 228 num-slots = <1>; 229 pinctrl-names = "default"; 230 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; 231 vmmc-supply = <&vcc_sd>; 232 vqmmc-supply = <&vccio_sd>; 233 status = "okay"; 234 no-sdio; 235 no-mmc; 236}; 237 238&gmac { 239 phy-supply = <&vcc_lan>; 240 phy-mode = "rgmii"; 241 clock_in_out = "input"; 242 snps,reset-gpio = <&gpio4 7 0>; 243 snps,reset-active-low; 244 snps,reset-delays-us = <0 10000 1000000>; 245 assigned-clocks = <&cru SCLK_MAC>; 246 assigned-clock-parents = <&ext_gmac>; 247 pinctrl-names = "default"; 248 pinctrl-0 = <&rgmii_pins>; 249 tx_delay = <0x30>; 250 rx_delay = <0x10>; 251 status = "ok"; 252}; 253 254&gpu { 255 mali-supply = <&vdd_gpu>; 256 status = "okay"; 257}; 258 259&hdmi { 260 status = "okay"; 261}; 262 263&rgb { 264 status = "okay"; 265 266 ports { 267 port@1 { 268 reg = <1>; 269 270 rgb_out_panel: endpoint { 271 remote-endpoint = <&panel_in_rgb>; 272 }; 273 }; 274 }; 275}; 276 277&rgb_in_vopl { 278 status = "okay"; 279}; 280 281&rgb_in_vopb { 282 status = "disabled"; 283}; 284 285&route_rgb { 286 connect = <&vopl_out_rgb>; 287 status = "okay"; 288}; 289 290&hevc_service { 291 status = "okay"; 292}; 293 294&i2c0 { 295 status = "okay"; 296 clock-frequency = <400000>; 297 298 rk808: pmic@1b { 299 compatible = "rockchip,rk808"; 300 reg = <0x1b>; 301 interrupt-parent = <&gpio0>; 302 interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 303 pinctrl-names = "default"; 304 pinctrl-0 = <&pmic_int &global_pwroff>; 305 rockchip,system-power-controller; 306 wakeup-source; 307 #clock-cells = <1>; 308 clock-output-names = "rk808-clkout1", "rk808-clkout2"; 309 310 vcc1-supply = <&vcc_sys>; 311 vcc2-supply = <&vcc_sys>; 312 vcc3-supply = <&vcc_sys>; 313 vcc4-supply = <&vcc_sys>; 314 vcc6-supply = <&vcc_sys>; 315 vcc7-supply = <&vcc_sys>; 316 vcc8-supply = <&vcc_18>; 317 vcc9-supply = <&vcc_io>; 318 vcc10-supply = <&vcc_io>; 319 vcc11-supply = <&vcc_sys>; 320 vcc12-supply = <&vcc_io>; 321 vddio-supply = <&vcc_io>; 322 323 regulators { 324 vdd_cpu: DCDC_REG1 { 325 regulator-always-on; 326 regulator-boot-on; 327 regulator-min-microvolt = <750000>; 328 regulator-max-microvolt = <1350000>; 329 regulator-name = "vdd_arm"; 330 regulator-state-mem { 331 regulator-off-in-suspend; 332 }; 333 }; 334 335 vdd_gpu: DCDC_REG2 { 336 regulator-always-on; 337 regulator-boot-on; 338 regulator-min-microvolt = <850000>; 339 regulator-max-microvolt = <1250000>; 340 regulator-name = "vdd_gpu"; 341 regulator-ramp-delay = <6000>; 342 regulator-state-mem { 343 regulator-on-in-suspend; 344 regulator-suspend-microvolt = <1000000>; 345 }; 346 }; 347 348 vcc_ddr: DCDC_REG3 { 349 regulator-always-on; 350 regulator-boot-on; 351 regulator-name = "vcc_ddr"; 352 regulator-state-mem { 353 regulator-on-in-suspend; 354 }; 355 }; 356 357 vcc_io: DCDC_REG4 { 358 regulator-always-on; 359 regulator-boot-on; 360 regulator-min-microvolt = <3300000>; 361 regulator-max-microvolt = <3300000>; 362 regulator-name = "vcc_io"; 363 regulator-state-mem { 364 regulator-on-in-suspend; 365 regulator-suspend-microvolt = <3300000>; 366 }; 367 }; 368 369 vcc_lan: LDO_REG1 { 370 regulator-always-on; 371 regulator-boot-on; 372 regulator-min-microvolt = <3300000>; 373 regulator-max-microvolt = <3300000>; 374 regulator-name = "vcc_lan"; 375 regulator-state-mem { 376 regulator-on-in-suspend; 377 regulator-suspend-microvolt = <3300000>; 378 }; 379 }; 380 381 vccio_sd: LDO_REG2 { 382 regulator-always-on; 383 regulator-boot-on; 384 regulator-min-microvolt = <3300000>; 385 regulator-max-microvolt = <3300000>; 386 regulator-name = "vccio_sd"; 387 regulator-state-mem { 388 regulator-off-in-suspend; 389 }; 390 }; 391 392 vdd_10: LDO_REG3 { 393 regulator-always-on; 394 regulator-boot-on; 395 regulator-min-microvolt = <1000000>; 396 regulator-max-microvolt = <1000000>; 397 regulator-name = "vdd_10"; 398 regulator-state-mem { 399 regulator-on-in-suspend; 400 regulator-suspend-microvolt = <1000000>; 401 }; 402 }; 403 404 vcc18_lcd: LDO_REG4 { 405 regulator-always-on; 406 regulator-boot-on; 407 regulator-min-microvolt = <1800000>; 408 regulator-max-microvolt = <1800000>; 409 regulator-name = "vcc18_lcd"; 410 regulator-state-mem { 411 regulator-on-in-suspend; 412 regulator-suspend-microvolt = <1800000>; 413 }; 414 }; 415 416 ldo5: LDO_REG5 { 417 regulator-always-on; 418 regulator-min-microvolt = <1800000>; 419 regulator-max-microvolt = <3300000>; 420 regulator-name = "ldo5"; 421 }; 422 423 vdd10_lcd: LDO_REG6 { 424 regulator-always-on; 425 regulator-boot-on; 426 regulator-min-microvolt = <1000000>; 427 regulator-max-microvolt = <1000000>; 428 regulator-name = "vdd10_lcd"; 429 regulator-state-mem { 430 regulator-on-in-suspend; 431 regulator-suspend-microvolt = <1000000>; 432 }; 433 }; 434 435 vcc_18: LDO_REG7 { 436 regulator-always-on; 437 regulator-boot-on; 438 regulator-min-microvolt = <1800000>; 439 regulator-max-microvolt = <1800000>; 440 regulator-name = "vcc_18"; 441 regulator-state-mem { 442 regulator-on-in-suspend; 443 regulator-suspend-microvolt = <1800000>; 444 }; 445 }; 446 447 vcca_33: LDO_REG8 { 448 regulator-always-on; 449 regulator-boot-on; 450 regulator-min-microvolt = <3300000>; 451 regulator-max-microvolt = <3300000>; 452 regulator-name = "vcca_33"; 453 regulator-state-mem { 454 regulator-on-in-suspend; 455 regulator-suspend-microvolt = <3300000>; 456 }; 457 }; 458 459 vccio_wl: SWITCH_REG1 { 460 regulator-always-on; 461 regulator-boot-on; 462 regulator-name = "vccio_wl"; 463 regulator-state-mem { 464 regulator-on-in-suspend; 465 }; 466 }; 467 468 vcc_lcd: SWITCH_REG2 { 469 regulator-always-on; 470 regulator-boot-on; 471 regulator-name = "vcc_lcd"; 472 regulator-state-mem { 473 regulator-on-in-suspend; 474 }; 475 }; 476 }; 477 }; 478}; 479 480&i2c1 { 481 status = "okay"; 482 clock-frequency = <400000>; 483 484 ak8963: ak8963@0d { 485 compatible = "asahi-kasei,ak8975"; 486 reg = <0x0d>; 487 interrupt-parent = <&gpio8>; 488 interrupts = <1 IRQ_TYPE_EDGE_RISING>; 489 pinctrl-names = "default"; 490 pinctrl-0 = <&comp_int>; 491 }; 492 493 l3g4200d: l3g4200d@68 { 494 compatible = "st,l3g4200d-gyro"; 495 st,drdy-int-pin = <2>; 496 reg = <0x6b>; 497 }; 498 499 mma8452: mma8452@1d { 500 compatible = "fsl,mma8452"; 501 reg = <0x1d>; 502 interrupt-parent = <&gpio8>; 503 interrupts = <0 IRQ_TYPE_EDGE_RISING>; 504 pinctrl-names = "default"; 505 pinctrl-0 = <&gsensor_int>; 506 }; 507}; 508 509&i2c2 { 510 status = "okay"; 511}; 512 513&i2c3 { 514 status = "okay"; 515}; 516 517&i2c4 { 518 status = "okay"; 519}; 520 521&io_domains { 522 status = "okay"; 523 524 audio-supply = <&vcca_33>; 525 bb-supply = <&vcc_io>; 526 dvp-supply = <&vcc18_dvp>; 527 flash0-supply = <&vcc_flash>; 528 flash1-supply = <&vcc_lan>; 529 gpio30-supply = <&vcc_io>; 530 gpio1830-supply = <&vcc_io>; 531 lcdc-supply = <&vcc_io>; 532 sdcard-supply = <&vccio_sd>; 533 wifi-supply = <&vccio_wl>; 534}; 535 536&rga { 537 status = "okay"; 538}; 539 540&pinctrl { 541 ak8963 { 542 comp_int: comp-int { 543 rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; 544 }; 545 }; 546 547 buttons { 548 pwrbtn: pwrbtn { 549 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>; 550 }; 551 }; 552 553 dvp { 554 dvp_pwr: dvp-pwr { 555 rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; 556 }; 557 }; 558 559 ir { 560 ir_int: ir-int { 561 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; 562 }; 563 }; 564 565 mma8452 { 566 gsensor_int: gsensor-int { 567 rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; 568 }; 569 }; 570 571 pmic { 572 pmic_int: pmic-int { 573 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>; 574 }; 575 }; 576 577 sdmmc { 578 sdmmc_pwr: sdmmc-pwr { 579 rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; 580 }; 581 }; 582}; 583 584&tsadc { 585 rockchip,hw-tshut-polarity = <0>; 586 status = "okay"; 587}; 588 589&vopb { 590 status = "okay"; 591}; 592 593&vopb_mmu { 594 status = "okay"; 595}; 596 597&vopl { 598 status = "okay"; 599}; 600 601&vopl_mmu { 602 status = "okay"; 603}; 604 605&vpu_service { 606 status = "okay"; 607}; 608 609&uart0 { 610 status = "okay"; 611}; 612 613&uart1 { 614 status = "okay"; 615}; 616 617&uart2 { 618 status = "okay"; 619}; 620 621&uart3 { 622 status = "okay"; 623}; 624 625&uart4 { 626 status = "okay"; 627}; 628 629&usbphy { 630 status = "okay"; 631}; 632 633&usb_host0_ehci { 634 no-relinquish-port; 635 status = "okay"; 636}; 637 638&usb_host1 { 639 status = "okay"; 640}; 641 642&usb_otg { 643 status= "okay"; 644}; 645