1/* 2 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd 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#include "rk3288-evb.dtsi" 45#include "rk3288-android.dtsi" 46 47/ { 48 compatible = "rockchip,rk3288-evb-android-rk818", "rockchip,rk3288"; 49 50 sdio_pwrseq: sdio-pwrseq { 51 compatible = "mmc-pwrseq-simple"; 52 clocks = <&rk818 1>; 53 clock-names = "ext_clock"; 54 55 /* 56 * On the module itself this is one of these (depending 57 * on the actual card populated): 58 * - SDIO_RESET_L_WL_REG_ON 59 * - PDN (power down when low) 60 */ 61 reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>; 62 }; 63 64 wireless-bluetooth { 65 clocks = <&rk818 1>; 66 clock-names = "ext_clock"; 67 }; 68 69 /delete-node/ sdmmc-regulator; 70 71 vcc_lcd: vcc-lcd { 72 compatible = "regulator-fixed"; 73 enable-active-high; 74 regulator-boot-on; 75 gpio = <&gpio7 3 GPIO_ACTIVE_HIGH>; 76 pinctrl-names = "default"; 77 pinctrl-0 = <&lcd_en>; 78 regulator-name = "vcc_lcd"; 79 vin-supply = <&vcc_io>; 80 }; 81 82 xin32k: xin32k { 83 compatible = "fixed-clock"; 84 clock-frequency = <32768>; 85 clock-output-names = "xin32k"; 86 #clock-cells = <0>; 87 }; 88}; 89 90&cpu0 { 91 cpu-supply = <&vdd_cpu>; 92}; 93 94&edp_panel { 95 backlight = <&backlight>; 96 power-supply = <&vcc_lcd>; 97}; 98 99&gpu { 100 status = "okay"; 101 mali-supply = <&vdd_gpu>; 102}; 103 104&hdmi_analog_sound { 105 status = "okay"; 106}; 107 108&i2c0 { 109 clock-frequency = <400000>; 110 111 vdd_cpu: syr827@40 { 112 compatible = "silergy,syr827"; 113 reg = <0x40>; 114 vin-supply = <&vcc_sys>; 115 regulator-compatible = "fan53555-reg"; 116 pinctrl-0 = <&vsel1_gpio>; 117 vsel-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; 118 regulator-name = "vdd_cpu"; 119 regulator-min-microvolt = <712500>; 120 regulator-max-microvolt = <1500000>; 121 regulator-ramp-delay = <1000>; 122 fcs,suspend-voltage-selector = <1>; 123 regulator-always-on; 124 regulator-boot-on; 125 regulator-initial-state = <3>; 126 regulator-state-mem { 127 regulator-off-in-suspend; 128 }; 129 }; 130 131 rk818: pmic@1c { 132 compatible = "rockchip,rk818"; 133 reg = <0x1c>; 134 status = "okay"; 135 136 clock-output-names = "rk818-clkout1", "wifibt_32kin"; 137 interrupt-parent = <&gpio0>; 138 interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 139 pinctrl-names = "default"; 140 pinctrl-0 = <&pmic_int>; 141 rockchip,system-power-controller; 142 wakeup-source; 143 #clock-cells = <1>; 144 145 vcc1-supply = <&vcc_sys>; 146 vcc2-supply = <&vcc_sys>; 147 vcc3-supply = <&vcc_sys>; 148 vcc4-supply = <&vcc_sys>; 149 vcc6-supply = <&vcc_sys>; 150 vcc7-supply = <&vcc_sys>; 151 vcc8-supply = <&vcc_sys>; 152 vcc9-supply = <&vcc_io>; 153 boost-supply = <&vcc_sys>; 154 h_5v-supply = <&boost>; 155 156 regulators { 157 vdd_logic: DCDC_REG1 { 158 regulator-name = "vdd_logic"; 159 regulator-always-on; 160 regulator-boot-on; 161 regulator-min-microvolt = <800000>; 162 regulator-max-microvolt = <1250000>; 163 regulator-ramp-delay = <6001>; 164 regulator-state-mem { 165 regulator-on-in-suspend; 166 regulator-suspend-microvolt = <1000000>; 167 }; 168 }; 169 170 vdd_gpu: DCDC_REG2 { 171 regulator-name = "vdd_gpu"; 172 regulator-always-on; 173 regulator-boot-on; 174 regulator-min-microvolt = <800000>; 175 regulator-max-microvolt = <1250000>; 176 regulator-ramp-delay = <6001>; 177 regulator-state-mem { 178 regulator-on-in-suspend; 179 regulator-suspend-microvolt = <1000000>; 180 }; 181 }; 182 183 vcc_ddr: DCDC_REG3 { 184 regulator-always-on; 185 regulator-boot-on; 186 regulator-name = "vcc_ddr"; 187 regulator-state-mem { 188 regulator-on-in-suspend; 189 }; 190 }; 191 192 vcc_io: DCDC_REG4 { 193 regulator-always-on; 194 regulator-boot-on; 195 regulator-min-microvolt = <3300000>; 196 regulator-max-microvolt = <3300000>; 197 regulator-name = "vcc_io"; 198 regulator-state-mem { 199 regulator-off-in-suspend; 200 }; 201 }; 202 203 boost: DCDC_BOOST { 204 regulator-always-on; 205 regulator-boot-on; 206 regulator-min-microvolt = <5000000>; 207 regulator-max-microvolt = <5000000>; 208 regulator-name = "boost"; 209 regulator-state-mem { 210 regulator-on-in-suspend; 211 }; 212 }; 213 214 vcca_codec: LDO_REG1 { 215 regulator-always-on; 216 regulator-boot-on; 217 regulator-min-microvolt = <3300000>; 218 regulator-max-microvolt = <3300000>; 219 regulator-name = "vcca_codec"; 220 regulator-state-mem { 221 regulator-off-in-suspend; 222 }; 223 }; 224 225 vcc_tp: LDO_REG2 { 226 regulator-always-on; 227 regulator-boot-on; 228 regulator-min-microvolt = <3300000>; 229 regulator-max-microvolt = <3300000>; 230 regulator-name = "vcc_tp"; 231 regulator-state-mem { 232 regulator-off-in-suspend; 233 }; 234 }; 235 236 vdd_10: LDO_REG3 { 237 regulator-always-on; 238 regulator-boot-on; 239 regulator-min-microvolt = <1000000>; 240 regulator-max-microvolt = <1000000>; 241 regulator-name = "vdd_10"; 242 regulator-state-mem { 243 regulator-on-in-suspend; 244 regulator-suspend-microvolt = <1000000>; 245 }; 246 }; 247 248 vcc18_lcd: LDO_REG4 { 249 regulator-always-on; 250 regulator-boot-on; 251 regulator-min-microvolt = <1800000>; 252 regulator-max-microvolt = <1800000>; 253 regulator-name = "vcc18_lcd"; 254 regulator-state-mem { 255 regulator-off-in-suspend; 256 }; 257 }; 258 259 vccio_pmu: LDO_REG5 { 260 regulator-always-on; 261 regulator-boot-on; 262 regulator-min-microvolt = <3300000>; 263 regulator-max-microvolt = <3300000>; 264 regulator-name = "vccio_pmu"; 265 regulator-state-mem { 266 regulator-on-in-suspend; 267 regulator-suspend-microvolt = <3300000>; 268 }; 269 }; 270 271 vdd10_lcd: LDO_REG6 { 272 regulator-always-on; 273 regulator-boot-on; 274 regulator-min-microvolt = <1000000>; 275 regulator-max-microvolt = <1000000>; 276 regulator-name = "vdd10_lcd"; 277 regulator-state-mem { 278 regulator-off-in-suspend; 279 }; 280 }; 281 282 vcc_18: LDO_REG7 { 283 regulator-always-on; 284 regulator-boot-on; 285 regulator-min-microvolt = <1800000>; 286 regulator-max-microvolt = <1800000>; 287 regulator-name = "vcc_18"; 288 regulator-state-mem { 289 regulator-on-in-suspend; 290 regulator-suspend-microvolt = <1800000>; 291 }; 292 }; 293 294 vccio_wl: LDO_REG8 { 295 regulator-always-on; 296 regulator-boot-on; 297 regulator-min-microvolt = <1800000>; 298 regulator-max-microvolt = <3300000>; 299 regulator-name = "vccio_wl"; 300 regulator-state-mem { 301 regulator-on-in-suspend; 302 regulator-suspend-microvolt = <3300000>; 303 }; 304 }; 305 306 vccio_sd: LDO_REG9 { 307 regulator-always-on; 308 regulator-boot-on; 309 regulator-min-microvolt = <1800000>; 310 regulator-max-microvolt = <3300000>; 311 regulator-name = "vccio_sd"; 312 regulator-state-mem { 313 regulator-on-in-suspend; 314 regulator-suspend-microvolt = <3300000>; 315 }; 316 }; 317 318 vcc_sd: SWITCH_REG { 319 regulator-always-on; 320 regulator-boot-on; 321 regulator-name = "vcc_sd"; 322 regulator-state-mem { 323 regulator-on-in-suspend; 324 }; 325 }; 326 327 h_5v: HDMI_SWITCH { 328 regulator-always-on; 329 regulator-boot-on; 330 regulator-name = "h_5v"; 331 regulator-state-mem { 332 regulator-on-in-suspend; 333 }; 334 }; 335 }; 336 }; 337}; 338 339&i2c1 { 340 status = "okay"; 341 clock-frequency = <400000>; 342 343 mpu6050@68 { 344 compatible = "invensense,mpu6050"; 345 status = "okay"; 346 pinctrl-names = "default"; 347 pinctrl-0 = <&mpu6050_irq_gpio>; 348 reg = <0x68>; 349 irq-gpio = <&gpio8 0 IRQ_TYPE_EDGE_RISING>; 350 mpu-int_config = <0x10>; 351 mpu-level_shifter = <0>; 352 mpu-orientation = <0 1 0 1 0 0 0 0 1>; 353 orientation-x= <0>; 354 orientation-y= <1>; 355 orientation-z= <0>; 356 support-hw-poweroff = <1>; 357 mpu-debug = <1>; 358 }; 359}; 360 361&lvds_panel { 362 power-supply = <&vcc_lcd>; 363}; 364 365&dsi0 { 366 status = "okay"; 367 rockchip,lane-rate = <1000>; 368 369 panel: panel { 370 compatible = "simple-panel-dsi"; 371 reg = <0>; 372 backlight = <&backlight>; 373 enable-gpios = <&gpio7 4 GPIO_ACTIVE_HIGH>; 374 power-supply = <&vcc_lcd>; 375 dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST)>; 376 dsi,format = <MIPI_DSI_FMT_RGB888>; 377 dsi,lanes = <4>; 378 reset-delay-ms = <20>; 379 init-delay-ms = <20>; 380 enable-delay-ms = <120>; 381 prepare-delay-ms = <120>; 382 status = "okay"; 383 384 disp_timings: display-timings { 385 native-mode = <&timing0>; 386 387 timing0: timing0 { 388 clock-frequency = <150000000>; 389 hactive = <1200>; 390 vactive = <1920>; 391 hback-porch = <80>; 392 hfront-porch = <81>; 393 vback-porch = <21>; 394 vfront-porch = <21>; 395 hsync-len = <10>; 396 vsync-len = <3>; 397 hsync-active = <0>; 398 vsync-active = <0>; 399 de-active = <0>; 400 pixelclk-active = <0>; 401 }; 402 }; 403 }; 404}; 405 406&route_dsi0 { 407 status = "okay"; 408}; 409 410&tsadc { 411 rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */ 412}; 413 414&pinctrl { 415 lcd { 416 lcd_en: lcd-en { 417 rockchip,pins = <7 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; 418 }; 419 }; 420 421 mpu6050 { 422 mpu6050_irq_gpio: mpu6050-irq-gpio { 423 rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; 424 }; 425 }; 426 427 pmic { 428 pmic_int: pmic-int { 429 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>; 430 }; 431 vsel1_gpio: vsel1-gpio { 432 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>; 433 }; 434 }; 435}; 436