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#include <dt-bindings/input/input.h> 44 45/ { 46 memory { 47 reg = <0x0 0x80000000>; 48 device_type = "memory"; 49 }; 50 51 adc-keys { 52 compatible = "adc-keys"; 53 io-channels = <&saradc 1>; 54 55 volup-key { 56 linux,code = <KEY_VOLUMEUP>; 57 label = "volume up"; 58 press-threshold-microvolt = <18000>; 59 }; 60 }; 61 62 ext_gmac: external-gmac-clock { 63 compatible = "fixed-clock"; 64 #clock-cells = <0>; 65 clock-frequency = <125000000>; 66 clock-output-names = "ext_gmac"; 67 }; 68 69 vcc_sys: vsys-regulator { 70 compatible = "regulator-fixed"; 71 regulator-name = "vcc_sys"; 72 regulator-min-microvolt = <5000000>; 73 regulator-max-microvolt = <5000000>; 74 regulator-always-on; 75 regulator-boot-on; 76 }; 77 78 backlight: backlight { 79 compatible = "pwm-backlight"; 80 power-supply = <&vcc_sys>; 81 enable-gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>; 82 brightness-levels = < 83 0 1 2 3 4 5 6 7 84 8 9 10 11 12 13 14 15 85 16 17 18 19 20 21 22 23 86 24 25 26 27 28 29 30 31 87 32 33 34 35 36 37 38 39 88 40 41 42 43 44 45 46 47 89 48 49 50 51 52 53 54 55 90 56 57 58 59 60 61 62 63 91 64 65 66 67 68 69 70 71 92 72 73 74 75 76 77 78 79 93 80 81 82 83 84 85 86 87 94 88 89 90 91 92 93 94 95 95 96 97 98 99 100 101 102 103 96 104 105 106 107 108 109 110 111 97 112 113 114 115 116 117 118 119 98 120 121 122 123 124 125 126 127 99 128 129 130 131 132 133 134 135 100 136 137 138 139 140 141 142 143 101 144 145 146 147 148 149 150 151 102 152 153 154 155 156 157 158 159 103 160 161 162 163 164 165 166 167 104 168 169 170 171 172 173 174 175 105 176 177 178 179 180 181 182 183 106 184 185 186 187 188 189 190 191 107 192 193 194 195 196 197 198 199 108 200 201 202 203 204 205 206 207 109 208 209 210 211 212 213 214 215 110 216 217 218 219 220 221 222 223 111 224 225 226 227 228 229 230 231 112 232 233 234 235 236 237 238 239 113 240 241 242 243 244 245 246 247 114 248 249 250 251 252 253 254 255>; 115 default-brightness-level = <50>; 116 pwms = <&pwm0 0 25000 0>; 117 pinctrl-names = "default"; 118 pinctrl-0 = <&pwm0_pin>; 119 pwm-delay-us = <10000>; 120 status = "okay"; 121 }; 122 123 edp_panel: edp-panel { 124 compatible ="lg,lp079qx1-sp0v", "simple-panel"; 125 backlight = <&backlight>; 126 power-supply = <&vcc_io>; 127 enable-gpios = <&gpio7 4 GPIO_ACTIVE_HIGH>; 128 prepare-delay-ms = <20>; 129 enable-delay-ms = <20>; 130 131 ports { 132 panel_in: endpoint { 133 remote-endpoint = <&edp_out>; 134 }; 135 }; 136 }; 137}; 138 139&cpu0 { 140 cpu0-supply = <&vdd_cpu>; 141}; 142 143&display_subsystem { 144 status = "okay"; 145}; 146 147&edp { 148 status = "okay"; 149 150 ports { 151 port@1 { 152 reg = <1>; 153 edp_out: endpoint { 154 remote-endpoint = <&panel_in>; 155 }; 156 }; 157 }; 158}; 159 160&emmc { 161 bus-width = <8>; 162 cap-mmc-highspeed; 163 disable-wp; 164 non-removable; 165 num-slots = <1>; 166 pinctrl-names = "default"; 167 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>; 168 status = "okay"; 169}; 170 171&pwm0 { 172 status = "okay"; 173}; 174 175&route_edp { 176 status = "okay"; 177}; 178 179&saradc { 180 vref-supply = <&vcc_18>; 181 status = "okay"; 182}; 183 184&sdmmc { 185 bus-width = <4>; 186 cap-mmc-highspeed; 187 cap-sd-highspeed; 188 card-detect-delay = <200>; 189 disable-wp; 190 num-slots = <1>; 191 pinctrl-names = "default"; 192 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; 193 status = "okay"; 194 vmmc-supply = <&vcc_sd>; 195 vqmmc-supply = <&vccio_sd>; 196}; 197 198&gmac { 199 assigned-clocks = <&cru SCLK_MAC>; 200 assigned-clock-parents = <&ext_gmac>; 201 clock_in_out = "input"; 202 pinctrl-names = "default"; 203 pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>; 204 phy-supply = <&vcc_lan>; 205 phy-mode = "rgmii"; 206 snps,reset-active-low; 207 snps,reset-delays-us = <0 10000 1000000>; 208 snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>; 209 tx_delay = <0x30>; 210 rx_delay = <0x10>; 211 status = "okay"; 212}; 213 214&gpu { 215 mali-supply = <&vdd_gpu>; 216 status = "okay"; 217}; 218 219&hdmi { 220 status = "okay"; 221}; 222 223&i2c0 { 224 status = "okay"; 225 clock-frequency = <400000>; 226 227 rk808: pmic@1b { 228 compatible = "rockchip,rk808"; 229 reg = <0x1b>; 230 interrupt-parent = <&gpio0>; 231 interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 232 #clock-cells = <1>; 233 clock-output-names = "xin32k", "rk808-clkout2"; 234 pinctrl-names = "default"; 235 pinctrl-0 = <&pmic_int &global_pwroff>; 236 rockchip,system-power-controller; 237 wakeup-source; 238 239 vcc1-supply = <&vcc_sys>; 240 vcc2-supply = <&vcc_sys>; 241 vcc3-supply = <&vcc_sys>; 242 vcc4-supply = <&vcc_sys>; 243 vcc6-supply = <&vcc_sys>; 244 vcc7-supply = <&vcc_sys>; 245 vcc8-supply = <&vcc_io>; 246 vcc9-supply = <&vcc_io>; 247 vcc10-supply = <&vcc_io>; 248 vcc11-supply = <&vcc_io>; 249 vcc12-supply = <&vcc_io>; 250 vddio-supply = <&vcc_io>; 251 252 regulators { 253 vdd_cpu: DCDC_REG1 { 254 regulator-always-on; 255 regulator-boot-on; 256 regulator-min-microvolt = <750000>; 257 regulator-max-microvolt = <1350000>; 258 regulator-name = "vdd_arm"; 259 regulator-state-mem { 260 regulator-off-in-suspend; 261 }; 262 }; 263 264 vdd_gpu: DCDC_REG2 { 265 regulator-always-on; 266 regulator-boot-on; 267 regulator-min-microvolt = <850000>; 268 regulator-max-microvolt = <1250000>; 269 regulator-name = "vdd_gpu"; 270 regulator-state-mem { 271 regulator-on-in-suspend; 272 regulator-suspend-microvolt = <1000000>; 273 }; 274 }; 275 276 vcc_ddr: DCDC_REG3 { 277 regulator-always-on; 278 regulator-boot-on; 279 regulator-name = "vcc_ddr"; 280 regulator-state-mem { 281 regulator-on-in-suspend; 282 }; 283 }; 284 285 vcc_io: DCDC_REG4 { 286 regulator-always-on; 287 regulator-boot-on; 288 regulator-min-microvolt = <3300000>; 289 regulator-max-microvolt = <3300000>; 290 regulator-name = "vcc_io"; 291 regulator-state-mem { 292 regulator-on-in-suspend; 293 regulator-suspend-microvolt = <3300000>; 294 }; 295 }; 296 297 vccio_pmu: LDO_REG1 { 298 regulator-always-on; 299 regulator-boot-on; 300 regulator-min-microvolt = <3300000>; 301 regulator-max-microvolt = <3300000>; 302 regulator-name = "vccio_pmu"; 303 regulator-state-mem { 304 regulator-on-in-suspend; 305 regulator-suspend-microvolt = <3300000>; 306 }; 307 }; 308 309 vcca_33: LDO_REG2 { 310 regulator-always-on; 311 regulator-boot-on; 312 regulator-min-microvolt = <3300000>; 313 regulator-max-microvolt = <3300000>; 314 regulator-name = "vcca_33"; 315 regulator-state-mem { 316 regulator-off-in-suspend; 317 }; 318 }; 319 320 vdd_10: LDO_REG3 { 321 regulator-always-on; 322 regulator-boot-on; 323 regulator-min-microvolt = <1000000>; 324 regulator-max-microvolt = <1000000>; 325 regulator-name = "vdd_10"; 326 regulator-state-mem { 327 regulator-on-in-suspend; 328 regulator-suspend-microvolt = <1000000>; 329 }; 330 }; 331 332 vcc_wl: LDO_REG4 { 333 regulator-always-on; 334 regulator-boot-on; 335 regulator-min-microvolt = <1800000>; 336 regulator-max-microvolt = <1800000>; 337 regulator-name = "vcc_wl"; 338 regulator-state-mem { 339 regulator-on-in-suspend; 340 regulator-suspend-microvolt = <1800000>; 341 }; 342 }; 343 344 vccio_sd: LDO_REG5 { 345 regulator-always-on; 346 regulator-boot-on; 347 regulator-min-microvolt = <1800000>; 348 regulator-max-microvolt = <3300000>; 349 regulator-name = "vccio_sd"; 350 regulator-state-mem { 351 regulator-on-in-suspend; 352 regulator-suspend-microvolt = <3300000>; 353 }; 354 }; 355 356 vdd10_lcd: LDO_REG6 { 357 regulator-always-on; 358 regulator-boot-on; 359 regulator-min-microvolt = <1000000>; 360 regulator-max-microvolt = <1000000>; 361 regulator-name = "vdd10_lcd"; 362 regulator-state-mem { 363 regulator-on-in-suspend; 364 regulator-suspend-microvolt = <1000000>; 365 }; 366 }; 367 368 vcc_18: LDO_REG7 { 369 regulator-always-on; 370 regulator-boot-on; 371 regulator-min-microvolt = <1800000>; 372 regulator-max-microvolt = <1800000>; 373 regulator-name = "vcc_18"; 374 regulator-state-mem { 375 regulator-on-in-suspend; 376 regulator-suspend-microvolt = <1800000>; 377 }; 378 }; 379 380 vcc18_lcd: LDO_REG8 { 381 regulator-always-on; 382 regulator-boot-on; 383 regulator-min-microvolt = <1800000>; 384 regulator-max-microvolt = <1800000>; 385 regulator-name = "vcc18_lcd"; 386 regulator-state-mem { 387 regulator-on-in-suspend; 388 regulator-suspend-microvolt = <1800000>; 389 }; 390 }; 391 392 vcc_sd: SWITCH_REG1 { 393 regulator-always-on; 394 regulator-boot-on; 395 regulator-name = "vcc_sd"; 396 regulator-state-mem { 397 regulator-on-in-suspend; 398 }; 399 }; 400 401 vcc_lan: SWITCH_REG2 { 402 regulator-always-on; 403 regulator-boot-on; 404 regulator-name = "vcc_lan"; 405 regulator-state-mem { 406 regulator-on-in-suspend; 407 }; 408 }; 409 }; 410 }; 411}; 412 413&pinctrl { 414 pcfg_output_high: pcfg-output-high { 415 output-high; 416 }; 417 418 pcfg_output_low: pcfg-output-low { 419 output-low; 420 }; 421 422 pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma { 423 drive-strength = <8>; 424 }; 425 426 pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma { 427 bias-pull-up; 428 drive-strength = <8>; 429 }; 430 431 gmac { 432 phy_int: phy-int { 433 rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>; 434 }; 435 436 phy_pmeb: phy-pmeb { 437 rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>; 438 }; 439 440 phy_rst: phy-rst { 441 rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>; 442 }; 443 }; 444 445 pmic { 446 pmic_int: pmic-int { 447 rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>; 448 }; 449 }; 450 451 sdmmc { 452 sdmmc_bus4: sdmmc-bus4 { 453 rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, 454 <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, 455 <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, 456 <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>; 457 }; 458 459 sdmmc_clk: sdmmc-clk { 460 rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>; 461 }; 462 463 sdmmc_cmd: sdmmc-cmd { 464 rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>; 465 }; 466 467 sdmmc_pwr: sdmmc-pwr { 468 rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>; 469 }; 470 }; 471 472 usbphy { 473 host_drv: host-drv { 474 rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>; 475 }; 476 }; 477}; 478 479&uart2 { 480 status = "okay"; 481}; 482 483&usbphy { 484 pinctrl-names = "default"; 485 pinctrl-0 = <&host_drv>; 486 vbus_drv-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; 487 status = "okay"; 488}; 489 490&usb_host0_ehci { 491 status = "okay"; 492}; 493 494&usb_host1 { 495 status = "okay"; 496}; 497 498&usb_otg { 499 status = "okay"; 500}; 501 502&usb_hsic { 503 status = "okay"; 504}; 505 506&vopl { 507 status = "okay"; 508}; 509 510&vpu { 511 status = "okay"; 512}; 513