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