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/dts-v1/; 42#include "rk3288-evb.dtsi" 43#include "rk3288-linux.dtsi" 44 45/ { 46 compatible = "rockchip,rk3288-evb-rk808-linux", "rockchip,rk3288"; 47 48 adc-keys { 49 compatible = "adc-keys"; 50 io-channels = <&saradc 1>; 51 io-channel-names = "buttons"; 52 poll-interval = <100>; 53 keyup-threshold-microvolt = <1800000>; 54 55 button-up { 56 label = "Volume Up"; 57 linux,code = <KEY_VOLUMEUP>; 58 press-threshold-microvolt = <18000>; 59 }; 60 61 button-down { 62 label = "Volume Down"; 63 linux,code = <KEY_VOLUMEDOWN>; 64 press-threshold-microvolt = <300000>; 65 }; 66 67 menu { 68 label = "Menu"; 69 linux,code = <KEY_MENU>; 70 press-threshold-microvolt = <640000>; 71 }; 72 73 esc { 74 label = "Esc"; 75 linux,code = <KEY_ESC>; 76 press-threshold-microvolt = <1000000>; 77 }; 78 79 home { 80 label = "Home"; 81 linux,code = <KEY_HOME>; 82 press-threshold-microvolt = <1300000>; 83 }; 84 }; 85 86 sdio_pwrseq: sdio-pwrseq { 87 compatible = "mmc-pwrseq-simple"; 88 clocks = <&rk808 1>; 89 clock-names = "ext_clock"; 90 pinctrl-names = "default"; 91 pinctrl-0 = <&wifi_enable_h>; 92 93 /* 94 * On the module itself this is one of these (depending 95 * on the actual card populated): 96 * - SDIO_RESET_L_WL_REG_ON 97 * - PDN (power down when low) 98 */ 99 reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>; 100 }; 101 102 wireless-bluetooth { 103 clocks = <&rk808 1>; 104 clock-names = "ext_clock"; 105 }; 106 107 /delete-node/ sdmmc-regulator; 108 109 vcc18_dvp: vcc18-dvp { 110 compatible = "regulator-fixed"; 111 regulator-name = "vcc18_dvp"; 112 regulator-min-microvolt = <1800000>; 113 regulator-max-microvolt = <1800000>; 114 gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; 115 enable-active-high; 116 regulator-always-on; 117 vin-supply = <&vcc_io>; 118 }; 119 120 vdd_log: vdd-logic { 121 compatible = "pwm-regulator"; 122 rockchip,pwm_id = <1>; 123 rockchip,pwm_voltage = <1100000>; 124 pwms = <&pwm1 0 25000 1>; 125 regulator-name = "vcc_log"; 126 regulator-min-microvolt = <860000>; 127 regulator-max-microvolt = <1360000>; 128 regulator-always-on; 129 regulator-boot-on; 130 }; 131 132 xin32k: xin32k { 133 compatible = "fixed-clock"; 134 clock-frequency = <32768>; 135 clock-output-names = "xin32k"; 136 #clock-cells = <0>; 137 }; 138}; 139 140&backlight { 141 enable-gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>; 142 pinctrl-names = "default"; 143 pinctrl-0 = <&bl_en>; 144 pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>; 145}; 146 147&cpu0 { 148 cpu0-supply = <&vdd_cpu>; 149}; 150 151&dfi { 152 status = "okay"; 153}; 154 155&dmc { 156 center-supply = <&vdd_log>; 157 status = "okay"; 158}; 159 160&edp_in_vopb { 161 status = "disabled"; 162}; 163 164&edp_in_vopl { 165 status = "okay"; 166}; 167 168&gpu { 169 status = "okay"; 170 mali-supply = <&vdd_gpu>; 171}; 172 173&hdmi { 174 pinctrl-0 = <&hdmi_ddc>, <&hdmi_cec_c0>; 175}; 176 177&i2c0 { 178 clock-frequency = <400000>; 179 180 rk808: pmic@1b { 181 compatible = "rockchip,rk808"; 182 reg = <0x1b>; 183 interrupt-parent = <&gpio0>; 184 interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 185 pinctrl-names = "default"; 186 pinctrl-0 = <&pmic_int &global_pwroff>; 187 rockchip,system-power-controller; 188 wakeup-source; 189 #clock-cells = <1>; 190 clock-output-names = "rk808-clkout1", "rk808-clkout2"; 191 192 vcc1-supply = <&vcc_sys>; 193 vcc2-supply = <&vcc_sys>; 194 vcc3-supply = <&vcc_sys>; 195 vcc4-supply = <&vcc_sys>; 196 vcc6-supply = <&vcc_sys>; 197 vcc8-supply = <&vcc_io>; 198 vcc9-supply = <&vcc_io>; 199 vcc12-supply = <&vcc_io>; 200 vddio-supply = <&vcc_io>; 201 202 regulators { 203 vdd_cpu: DCDC_REG1 { 204 regulator-always-on; 205 regulator-boot-on; 206 regulator-min-microvolt = <750000>; 207 regulator-max-microvolt = <1400000>; 208 regulator-name = "vdd_arm"; 209 regulator-state-mem { 210 regulator-off-in-suspend; 211 }; 212 }; 213 214 vdd_gpu: DCDC_REG2 { 215 regulator-always-on; 216 regulator-boot-on; 217 regulator-min-microvolt = <850000>; 218 regulator-max-microvolt = <1250000>; 219 regulator-name = "vdd_gpu"; 220 regulator-ramp-delay = <6000>; 221 regulator-state-mem { 222 regulator-off-in-suspend; 223 }; 224 }; 225 226 vcc_ddr: DCDC_REG3 { 227 regulator-always-on; 228 regulator-boot-on; 229 regulator-name = "vcc_ddr"; 230 regulator-state-mem { 231 regulator-on-in-suspend; 232 }; 233 }; 234 235 vcc_io: DCDC_REG4 { 236 regulator-always-on; 237 regulator-boot-on; 238 regulator-min-microvolt = <3300000>; 239 regulator-max-microvolt = <3300000>; 240 regulator-name = "vcc_io"; 241 regulator-state-mem { 242 regulator-on-in-suspend; 243 regulator-suspend-microvolt = <3300000>; 244 }; 245 }; 246 247 vcc_tp: LDO_REG1 { 248 regulator-always-on; 249 regulator-boot-on; 250 regulator-min-microvolt = <3300000>; 251 regulator-max-microvolt = <3300000>; 252 regulator-name = "vcc_tp"; 253 regulator-state-mem { 254 regulator-off-in-suspend; 255 }; 256 }; 257 258 vcca_codec: LDO_REG2 { 259 regulator-always-on; 260 regulator-boot-on; 261 regulator-min-microvolt = <3300000>; 262 regulator-max-microvolt = <3300000>; 263 regulator-name = "vcca_codec"; 264 regulator-state-mem { 265 regulator-off-in-suspend; 266 }; 267 }; 268 269 vdd_10: LDO_REG3 { 270 regulator-always-on; 271 regulator-boot-on; 272 regulator-min-microvolt = <1000000>; 273 regulator-max-microvolt = <1000000>; 274 regulator-name = "vdd_10"; 275 regulator-state-mem { 276 regulator-on-in-suspend; 277 regulator-suspend-microvolt = <1000000>; 278 }; 279 }; 280 281 vcc_wl: LDO_REG4 { 282 regulator-always-on; 283 regulator-boot-on; 284 regulator-min-microvolt = <1800000>; 285 regulator-max-microvolt = <3300000>; 286 regulator-name = "vcc_wl"; 287 regulator-state-mem { 288 regulator-off-in-suspend; 289 }; 290 }; 291 292 vccio_sd: LDO_REG5 { 293 regulator-always-on; 294 regulator-boot-on; 295 regulator-min-microvolt = <1800000>; 296 regulator-max-microvolt = <3300000>; 297 regulator-name = "vccio_sd"; 298 regulator-state-mem { 299 regulator-on-in-suspend; 300 regulator-suspend-microvolt = <3300000>; 301 }; 302 }; 303 304 vdd10_lcd: LDO_REG6 { 305 regulator-always-on; 306 regulator-boot-on; 307 regulator-min-microvolt = <1000000>; 308 regulator-max-microvolt = <1000000>; 309 regulator-name = "vdd10_lcd"; 310 regulator-state-mem { 311 regulator-off-in-suspend; 312 }; 313 }; 314 315 vcc_18: LDO_REG7 { 316 regulator-always-on; 317 regulator-boot-on; 318 regulator-min-microvolt = <1800000>; 319 regulator-max-microvolt = <1800000>; 320 regulator-name = "vcc_18"; 321 regulator-state-mem { 322 regulator-on-in-suspend; 323 regulator-suspend-microvolt = <1800000>; 324 }; 325 }; 326 327 vcc18_lcd: LDO_REG8 { 328 regulator-always-on; 329 regulator-boot-on; 330 regulator-min-microvolt = <1800000>; 331 regulator-max-microvolt = <1800000>; 332 regulator-name = "vcc18_lcd"; 333 regulator-state-mem { 334 regulator-off-in-suspend; 335 }; 336 }; 337 338 vcc_sd: SWITCH_REG1 { 339 regulator-always-on; 340 regulator-boot-on; 341 regulator-name = "vcc_sd"; 342 regulator-state-mem { 343 regulator-on-in-suspend; 344 }; 345 }; 346 347 vcc_lcd: SWITCH_REG2 { 348 regulator-always-on; 349 regulator-boot-on; 350 regulator-name = "vcc_lcd"; 351 regulator-state-mem { 352 regulator-off-in-suspend; 353 }; 354 }; 355 }; 356 }; 357 358 CW2015@62 { 359 compatible = "cw201x"; 360 reg = <0x62>; 361 bat_low_gpio = <&gpio0 7 GPIO_ACTIVE_LOW>; 362 dc_det_gpio = <&gpio0 8 GPIO_ACTIVE_LOW>; 363 chg_ok_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>; 364 bat_config_info = <0x15 0x42 0x60 0x59 0x52 0x58 0x4D 0x48 0x48 0x44 0x44 0x46 0x49 0x48 0x32 365 0x24 0x20 0x17 0x13 0x0F 0x19 0x3E 0x51 0x45 0x08 0x76 0x0B 0x85 0x0E 0x1C 0x2E 0x3E 0x4D 0x52 0x52 366 0x57 0x3D 0x1B 0x6A 0x2D 0x25 0x43 0x52 0x87 0x8F 0x91 0x94 0x52 0x82 0x8C 0x92 0x96 0xFF 0x7B 0xBB 367 0xCB 0x2F 0x7D 0x72 0xA5 0xB5 0xC1 0x46 0xAE>; 368 is_dc_charge = <1>; 369 is_usb_charge = <0>; 370 monitor_sec = <5>; 371 virtual_power = <0>; 372 divider_res1 = <200>; 373 divider_res2 = <200>; 374 }; 375}; 376 377&i2c1 { 378 status = "okay"; 379 clock-frequency = <400000>; 380 381 mpu6050@68 { 382 compatible = "invensense,mpu6050"; 383 status = "okay"; 384 pinctrl-names = "default"; 385 pinctrl-0 = <&mpu6050_irq_gpio>; 386 reg = <0x68>; 387 irq-gpio = <&gpio8 0 IRQ_TYPE_EDGE_RISING>; 388 mpu-int_config = <0x10>; 389 mpu-level_shifter = <0>; 390 mpu-orientation = <0 1 0 1 0 0 0 0 1>; 391 orientation-x= <0>; 392 orientation-y= <1>; 393 orientation-z= <0>; 394 support-hw-poweroff = <1>; 395 mpu-debug = <1>; 396 }; 397 398 ak8963: compass@d{ 399 compatible = "mpu_ak8963"; 400 reg = <0x0d>; 401 compass-bus = <0>; 402 compass-adapt_num = <0>; 403 compass-orientation = <1 0 0 0 1 0 0 0 1>; 404 orientation-x= <0>; 405 orientation-y= <0>; 406 orientation-z= <1>; 407 compass-debug = <1>; 408 status = "okay"; 409 }; 410}; 411 412&io_domains { 413 status = "okay"; 414 audio-supply = <&vcc_io>; 415 bb-supply = <&vcc_io>; 416 dvp-supply = <&vcc18_dvp>; 417 flash0-supply = <&vcc_18>; 418 flash1-supply = <&vcc_io>; 419 gpio30-supply = <&vcc_io>; 420 gpio1830 = <&vcc_io>; 421 lcdc-supply = <&vcc_lcd>; 422 sdcard-supply = <&vccio_sd>; 423 wifi-supply = <&vcc_wl>; 424}; 425 426&i2c3 { 427 status = "okay"; 428 429 ov13850: ov13850@10 { 430 compatible = "ovti,ov13850"; 431 reg = <0x10>; 432 clocks = <&cru SCLK_VIP_OUT>; 433 clock-names = "xvclk"; 434 /* avdd-supply = <>; */ 435 /* dvdd-supply = <>; */ 436 /* dovdd-supply = <>; */ 437 /* reset-gpios = <>; */ 438 pinctrl-names = "rockchip,camera_default"; 439 pinctrl-0 = <&isp_mipi>; 440 power-gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; 441 reset-gpio = <&gpio7 RK_PC5 GPIO_ACTIVE_HIGH>; 442 pwdn-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>; 443 rockchip,camera-module-index = <0>; 444 rockchip,camera-module-facing = "back"; 445 rockchip,camera-module-name = "CMK-CT0116"; 446 rockchip,camera-module-lens-name = "Largan-50013A1"; 447 port { 448 ov13850_out: endpoint { 449 remote-endpoint = <&mipi_in_ucam0>; 450 data-lanes = <1 2>; 451 }; 452 }; 453 }; 454 455 gc8034: gc8034@37 { 456 compatible = "galaxycore,gc8034"; 457 status = "okay"; 458 reg = <0x37>; 459 clocks = <&cru SCLK_VIP_OUT>; 460 clock-names = "xvclk"; 461 pinctrl-names = "rockchip,camera_default"; 462 pinctrl-0 = <&isp_mipi>; 463 power-gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; 464 reset-gpios = <&gpio7 RK_PC5 GPIO_ACTIVE_LOW>; 465 pwdn-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_LOW>; 466 rockchip,camera-module-index = <0>; 467 rockchip,camera-module-facing = "back"; 468 rockchip,camera-module-name = "LH-RK-8034-v1.0"; 469 rockchip,camera-module-lens-name = "CK8401"; 470 port { 471 gc8034_out: endpoint { 472 remote-endpoint = <&mipi_in_gc8034>; 473 data-lanes = <1 2 3 4>; 474 }; 475 }; 476 }; 477}; 478 479&isp_mmu { 480 status = "okay"; 481}; 482 483&mipi_phy_rx0 { 484 status = "okay"; 485 486 ports { 487 #address-cells = <1>; 488 #size-cells = <0>; 489 490 port@0 { 491 reg = <0>; 492 #address-cells = <1>; 493 #size-cells = <0>; 494 495 mipi_in_ucam0: endpoint@1 { 496 reg = <1>; 497 remote-endpoint = <&ov13850_out>; 498 data-lanes = <1 2>; 499 }; 500 mipi_in_gc8034: endpoint@0 { 501 reg = <0>; 502 remote-endpoint = <&gc8034_out>; 503 data-lanes = <1 2 3 4>; 504 }; 505 }; 506 507 port@1 { 508 reg = <1>; 509 #address-cells = <1>; 510 #size-cells = <0>; 511 512 dphy_rx_out: endpoint@0 { 513 reg = <0>; 514 remote-endpoint = <&isp_mipi_in>; 515 }; 516 }; 517 }; 518}; 519 520&rkisp1 { 521 status = "okay"; 522 port { 523 #address-cells = <1>; 524 #size-cells = <0>; 525 526 isp_mipi_in: endpoint@0 { 527 reg = <0>; 528 remote-endpoint = <&dphy_rx_out>; 529 }; 530 531 }; 532}; 533 534&rga { 535 status = "okay"; 536}; 537 538&route_edp { 539 status = "okay"; 540}; 541 542&route_hdmi { 543 status = "okay"; 544}; 545 546&uart2 { 547 status = "disabled"; 548}; 549 550&pwm0 { 551 status = "okay"; 552}; 553 554&pwm1 { 555 pinctrl-names = "active"; 556 pinctrl-0 = <&pwm1_pin_pull_down>; 557 status = "okay"; 558}; 559 560&pinctrl { 561 backlight { 562 bl_en: bl-en { 563 rockchip,pins = <7 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 564 }; 565 }; 566 567 buttons { 568 pwrbtn: pwrbtn { 569 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>; 570 }; 571 }; 572 573 mpu6050 { 574 mpu6050_irq_gpio: mpu6050-irq-gpio { 575 rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; 576 }; 577 }; 578}; 579