Xu Ziyuan | 535b3dc | 2016-08-01 08:46:19 +0800 | [diff] [blame] | 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 | |
Dzmitry Sankouski | 55003db | 2023-01-22 18:21:22 +0300 | [diff] [blame] | 41 | #include <dt-bindings/input/input.h> |
Xu Ziyuan | 535b3dc | 2016-08-01 08:46:19 +0800 | [diff] [blame] | 42 | #include "rk3288.dtsi" |
| 43 | |
| 44 | / { |
| 45 | memory { |
| 46 | device_type = "memory"; |
Johan Jonker | 9a26fb1 | 2023-12-27 13:06:47 +0100 | [diff] [blame] | 47 | reg = <0x0 0x0 0x0 0x80000000>; |
Xu Ziyuan | 535b3dc | 2016-08-01 08:46:19 +0800 | [diff] [blame] | 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"; |
Xu Ziyuan | 535b3dc | 2016-08-01 08:46:19 +0800 | [diff] [blame] | 59 | autorepeat; |
| 60 | |
| 61 | pinctrl-names = "default"; |
| 62 | pinctrl-0 = <&pwrbtn>; |
| 63 | |
| 64 | button@0 { |
| 65 | gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; |
| 66 | label = "GPIO Key Power"; |
Dzmitry Sankouski | 55003db | 2023-01-22 18:21:22 +0300 | [diff] [blame] | 67 | linux,code = <KEY_POWER>; |
Xu Ziyuan | 535b3dc | 2016-08-01 08:46:19 +0800 | [diff] [blame] | 68 | linux,input-type = <1>; |
| 69 | gpio-key,wakeup = <1>; |
| 70 | debounce-interval = <100>; |
| 71 | }; |
| 72 | }; |
| 73 | |
| 74 | gpio-leds { |
| 75 | compatible = "gpio-leds"; |
| 76 | |
| 77 | pwr-led { |
| 78 | gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; |
| 79 | linux,default-trigger = "default-on"; |
| 80 | }; |
| 81 | |
| 82 | act-led { |
| 83 | gpios=<&gpio2 3 GPIO_ACTIVE_LOW>; |
| 84 | linux,default-trigger="mmc0"; |
| 85 | }; |
| 86 | }; |
| 87 | |
| 88 | vcc_sys: vsys-regulator { |
| 89 | compatible = "regulator-fixed"; |
| 90 | regulator-name = "vcc_sys"; |
| 91 | regulator-min-microvolt = <5000000>; |
| 92 | regulator-max-microvolt = <5000000>; |
| 93 | regulator-always-on; |
| 94 | regulator-boot-on; |
| 95 | }; |
| 96 | |
| 97 | /* |
| 98 | * NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from |
| 99 | * vcc_io directly. Those boards won't be able to power cycle SD cards |
| 100 | * but it shouldn't hurt to toggle this pin there anyway. |
| 101 | */ |
| 102 | vcc_sd: sdmmc-regulator { |
| 103 | compatible = "regulator-fixed"; |
| 104 | gpio = <&gpio7 11 GPIO_ACTIVE_LOW>; |
| 105 | pinctrl-names = "default"; |
| 106 | pinctrl-0 = <&sdmmc_pwr>; |
| 107 | regulator-name = "vcc_sd"; |
| 108 | regulator-min-microvolt = <3300000>; |
| 109 | regulator-max-microvolt = <3300000>; |
| 110 | startup-delay-us = <100000>; |
| 111 | vin-supply = <&vcc_io>; |
| 112 | }; |
Eddie Cai | 04ef38d | 2017-03-07 12:46:00 +0800 | [diff] [blame] | 113 | |
| 114 | vcc5v0_host: usb-host-regulator { |
| 115 | compatible = "regulator-fixed"; |
| 116 | enable-active-high; |
| 117 | gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>; |
| 118 | pinctrl-names = "default"; |
| 119 | pinctrl-0 = <&host_vbus_drv>; |
| 120 | regulator-name = "vcc5v0_host"; |
| 121 | regulator-min-microvolt = <5000000>; |
| 122 | regulator-max-microvolt = <5000000>; |
| 123 | regulator-always-on; |
| 124 | }; |
Xu Ziyuan | 535b3dc | 2016-08-01 08:46:19 +0800 | [diff] [blame] | 125 | }; |
| 126 | |
| 127 | &cpu0 { |
| 128 | cpu0-supply = <&vdd_cpu>; |
| 129 | }; |
| 130 | |
Xu Ziyuan | 535b3dc | 2016-08-01 08:46:19 +0800 | [diff] [blame] | 131 | &sdmmc { |
| 132 | bus-width = <4>; |
| 133 | cap-mmc-highspeed; |
| 134 | cap-sd-highspeed; |
| 135 | card-detect-delay = <200>; |
| 136 | disable-wp; /* wp not hooked up */ |
| 137 | num-slots = <1>; |
| 138 | pinctrl-names = "default"; |
| 139 | pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; |
| 140 | status = "okay"; |
| 141 | supports-sd; |
| 142 | vmmc-supply = <&vcc_sd>; |
| 143 | vqmmc-supply = <&vccio_sd>; |
| 144 | }; |
| 145 | |
| 146 | &gpu { |
| 147 | mali-supply = <&vdd_gpu>; |
| 148 | status = "okay"; |
| 149 | }; |
| 150 | |
| 151 | &gmac { |
| 152 | phy-supply = <&vcc33_lan>; |
| 153 | phy-mode = "rgmii"; |
| 154 | clock_in_out = "input"; |
| 155 | snps,reset-gpio = <&gpio4 7 0>; |
| 156 | snps,reset-active-low; |
| 157 | snps,reset-delays-us = <0 10000 1000000>; |
| 158 | assigned-clocks = <&cru SCLK_MAC>; |
| 159 | assigned-clock-parents = <&ext_gmac>; |
| 160 | pinctrl-names = "default"; |
| 161 | pinctrl-0 = <&rgmii_pins>; |
| 162 | tx_delay = <0x30>; |
| 163 | rx_delay = <0x10>; |
Jacob Chen | 8ddfce5 | 2017-02-23 14:20:16 +0800 | [diff] [blame] | 164 | status = "okay"; |
Xu Ziyuan | 535b3dc | 2016-08-01 08:46:19 +0800 | [diff] [blame] | 165 | }; |
| 166 | |
| 167 | &hdmi { |
| 168 | ddc-i2c-bus = <&i2c5>; |
| 169 | status = "okay"; |
| 170 | }; |
| 171 | |
| 172 | &i2c0 { |
| 173 | status = "okay"; |
| 174 | clock-frequency = <400000>; |
| 175 | |
| 176 | rk808: pmic@1b { |
| 177 | compatible = "rockchip,rk808"; |
| 178 | reg = <0x1b>; |
| 179 | interrupt-parent = <&gpio0>; |
| 180 | interrupts = <4 IRQ_TYPE_LEVEL_LOW>; |
| 181 | pinctrl-names = "default"; |
| 182 | pinctrl-0 = <&pmic_int &global_pwroff>; |
| 183 | rockchip,system-power-controller; |
| 184 | wakeup-source; |
| 185 | #clock-cells = <1>; |
| 186 | clock-output-names = "xin32k", "rk808-clkout2"; |
| 187 | |
| 188 | vcc1-supply = <&vcc_sys>; |
| 189 | vcc2-supply = <&vcc_sys>; |
| 190 | vcc3-supply = <&vcc_sys>; |
| 191 | vcc4-supply = <&vcc_sys>; |
| 192 | vcc6-supply = <&vcc_sys>; |
| 193 | vcc7-supply = <&vcc_sys>; |
| 194 | vcc8-supply = <&vcc_18>; |
| 195 | vcc9-supply = <&vcc_io>; |
| 196 | vcc10-supply = <&vcc_io>; |
| 197 | vcc11-supply = <&vcc_sys>; |
| 198 | vcc12-supply = <&vcc_io>; |
| 199 | vddio-supply = <&vcc18_ldo1>; |
| 200 | |
| 201 | regulators { |
| 202 | vdd_cpu: DCDC_REG1 { |
| 203 | regulator-always-on; |
| 204 | regulator-boot-on; |
| 205 | regulator-min-microvolt = <750000>; |
| 206 | regulator-max-microvolt = <1350000>; |
| 207 | regulator-name = "vdd_arm"; |
| 208 | regulator-state-mem { |
| 209 | regulator-off-in-suspend; |
| 210 | }; |
| 211 | }; |
| 212 | |
| 213 | vdd_gpu: DCDC_REG2 { |
| 214 | regulator-always-on; |
| 215 | regulator-boot-on; |
| 216 | regulator-min-microvolt = <850000>; |
| 217 | regulator-max-microvolt = <1250000>; |
| 218 | regulator-name = "vdd_gpu"; |
| 219 | regulator-state-mem { |
| 220 | regulator-on-in-suspend; |
| 221 | regulator-suspend-microvolt = <1000000>; |
| 222 | }; |
| 223 | }; |
| 224 | |
| 225 | vcc_ddr: DCDC_REG3 { |
| 226 | regulator-always-on; |
| 227 | regulator-boot-on; |
| 228 | regulator-name = "vcc_ddr"; |
| 229 | regulator-state-mem { |
| 230 | regulator-on-in-suspend; |
| 231 | }; |
| 232 | }; |
| 233 | |
| 234 | vcc_io: DCDC_REG4 { |
| 235 | regulator-always-on; |
| 236 | regulator-boot-on; |
| 237 | regulator-min-microvolt = <3300000>; |
| 238 | regulator-max-microvolt = <3300000>; |
| 239 | regulator-name = "vcc_io"; |
| 240 | regulator-state-mem { |
| 241 | regulator-on-in-suspend; |
| 242 | regulator-suspend-microvolt = <3300000>; |
| 243 | }; |
| 244 | }; |
| 245 | |
| 246 | vcc18_ldo1: LDO_REG1 { |
| 247 | regulator-always-on; |
| 248 | regulator-boot-on; |
| 249 | regulator-min-microvolt = <1800000>; |
| 250 | regulator-max-microvolt = <1800000>; |
| 251 | regulator-name = "vcc18_ldo1"; |
| 252 | regulator-state-mem { |
| 253 | regulator-on-in-suspend; |
| 254 | regulator-suspend-microvolt = <1800000>; |
| 255 | }; |
| 256 | }; |
| 257 | |
| 258 | vcc33_mipi: LDO_REG2 { |
| 259 | regulator-always-on; |
| 260 | regulator-boot-on; |
| 261 | regulator-min-microvolt = <3300000>; |
| 262 | regulator-max-microvolt = <3300000>; |
| 263 | regulator-name = "vcc33_mipi"; |
| 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 | vcc18_codec: LDO_REG4 { |
| 282 | regulator-always-on; |
| 283 | regulator-boot-on; |
| 284 | regulator-min-microvolt = <1800000>; |
| 285 | regulator-max-microvolt = <1800000>; |
| 286 | regulator-name = "vcc18_codec"; |
| 287 | regulator-state-mem { |
| 288 | regulator-on-in-suspend; |
| 289 | regulator-suspend-microvolt = <1800000>; |
| 290 | }; |
| 291 | }; |
| 292 | |
| 293 | vccio_sd: LDO_REG5 { |
| 294 | regulator-always-on; |
| 295 | regulator-boot-on; |
| 296 | regulator-min-microvolt = <1800000>; |
| 297 | regulator-max-microvolt = <3300000>; |
| 298 | regulator-name = "vccio_sd"; |
| 299 | regulator-state-mem { |
| 300 | regulator-on-in-suspend; |
| 301 | regulator-suspend-microvolt = <3300000>; |
| 302 | }; |
| 303 | }; |
| 304 | |
| 305 | vdd10_lcd: LDO_REG6 { |
| 306 | regulator-always-on; |
| 307 | regulator-boot-on; |
| 308 | regulator-min-microvolt = <1000000>; |
| 309 | regulator-max-microvolt = <1000000>; |
| 310 | regulator-name = "vdd10_lcd"; |
| 311 | regulator-state-mem { |
| 312 | regulator-on-in-suspend; |
| 313 | regulator-suspend-microvolt = <1000000>; |
| 314 | }; |
| 315 | }; |
| 316 | |
| 317 | vcc_18: LDO_REG7 { |
| 318 | regulator-always-on; |
| 319 | regulator-boot-on; |
| 320 | regulator-min-microvolt = <1800000>; |
| 321 | regulator-max-microvolt = <1800000>; |
| 322 | regulator-name = "vcc_18"; |
| 323 | regulator-state-mem { |
| 324 | regulator-on-in-suspend; |
| 325 | regulator-suspend-microvolt = <1800000>; |
| 326 | }; |
| 327 | }; |
| 328 | |
| 329 | vcc18_lcd: LDO_REG8 { |
| 330 | regulator-always-on; |
| 331 | regulator-boot-on; |
| 332 | regulator-min-microvolt = <1800000>; |
| 333 | regulator-max-microvolt = <1800000>; |
| 334 | regulator-name = "vcc18_lcd"; |
| 335 | regulator-state-mem { |
| 336 | regulator-on-in-suspend; |
| 337 | regulator-suspend-microvolt = <1800000>; |
| 338 | }; |
| 339 | }; |
| 340 | |
| 341 | vcc33_sd: SWITCH_REG1 { |
| 342 | regulator-always-on; |
| 343 | regulator-boot-on; |
| 344 | regulator-name = "vcc33_sd"; |
| 345 | regulator-state-mem { |
| 346 | regulator-on-in-suspend; |
| 347 | }; |
| 348 | }; |
| 349 | |
| 350 | vcc33_lan: SWITCH_REG2 { |
| 351 | regulator-always-on; |
| 352 | regulator-boot-on; |
| 353 | regulator-name = "vcc33_lan"; |
| 354 | regulator-state-mem { |
| 355 | regulator-on-in-suspend; |
| 356 | }; |
| 357 | }; |
| 358 | }; |
| 359 | }; |
| 360 | }; |
| 361 | |
| 362 | &i2c2 { |
| 363 | status = "okay"; |
| 364 | headset: nau8825@1a { |
| 365 | compatible = "nuvoton,nau8825"; |
| 366 | #sound-dai-cells = <0>; |
| 367 | reg = <0x1a>; |
| 368 | interrupt-parent = <&gpio6>; |
| 369 | interrupts = <5 IRQ_TYPE_LEVEL_LOW>; |
| 370 | nuvoton,jkdet-enable = <1>; |
| 371 | nuvoton,jkdet-pull-enable = <1>; |
| 372 | nuvoton,jkdet-pull-up = <0>; |
| 373 | nuvoton,jkdet-polarity = <1>; |
| 374 | nuvoton,vref-impedance = <2>; |
| 375 | nuvoton,micbias-voltage = <6>; |
| 376 | nuvoton,sar-threshold-num = <4>; |
| 377 | nuvoton,sar-threshold = <0xa 0x14 0x26 0x73>; |
| 378 | nuvoton,sar-hysteresis = <0>; |
| 379 | nuvoton,sar-voltage = <6>; |
| 380 | nuvoton,sar-compare-time = <0>; |
| 381 | nuvoton,sar-sampling-time = <0>; |
| 382 | nuvoton,short-key-debounce = <3>; |
| 383 | nuvoton,jack-insert-debounce = <7>; |
| 384 | nuvoton,jack-eject-debounce = <7>; |
| 385 | clock-names = "mclk"; |
| 386 | clocks = <&cru SCLK_I2S0_OUT>; |
| 387 | }; |
| 388 | }; |
| 389 | |
| 390 | &i2c5 { |
| 391 | status = "okay"; |
| 392 | }; |
| 393 | |
| 394 | &wdt { |
| 395 | status = "okay"; |
| 396 | }; |
| 397 | |
| 398 | &pwm0 { |
| 399 | status = "okay"; |
| 400 | }; |
| 401 | |
| 402 | &saradc { |
| 403 | vref-supply = <&vcc18_ldo1>; |
| 404 | status ="okay"; |
| 405 | }; |
| 406 | |
| 407 | &uart0 { |
| 408 | status = "okay"; |
| 409 | }; |
| 410 | |
| 411 | &uart1 { |
| 412 | status = "okay"; |
| 413 | }; |
| 414 | |
| 415 | &uart2 { |
| 416 | status = "okay"; |
| 417 | }; |
| 418 | |
| 419 | &uart3 { |
| 420 | status = "okay"; |
| 421 | }; |
| 422 | |
| 423 | &uart4 { |
| 424 | status = "okay"; |
| 425 | }; |
| 426 | |
| 427 | &tsadc { |
| 428 | rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */ |
| 429 | rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */ |
| 430 | status = "okay"; |
| 431 | }; |
| 432 | |
| 433 | &usbphy { |
| 434 | status = "okay"; |
| 435 | }; |
| 436 | |
| 437 | &usb_host0_ehci { |
| 438 | status = "okay"; |
| 439 | }; |
| 440 | |
| 441 | &usb_host1 { |
| 442 | status = "okay"; |
| 443 | }; |
| 444 | |
| 445 | &usb_otg { |
| 446 | status= "okay"; |
| 447 | }; |
| 448 | |
| 449 | &vopb { |
| 450 | status = "okay"; |
| 451 | }; |
| 452 | |
| 453 | &vopb_mmu { |
| 454 | status = "okay"; |
| 455 | }; |
| 456 | |
| 457 | &vopl { |
| 458 | status = "okay"; |
| 459 | }; |
| 460 | |
| 461 | &vopl_mmu { |
| 462 | status = "okay"; |
| 463 | }; |
| 464 | |
| 465 | &pinctrl { |
| 466 | pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma { |
| 467 | drive-strength = <8>; |
| 468 | }; |
| 469 | |
| 470 | pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma { |
| 471 | bias-pull-up; |
| 472 | drive-strength = <8>; |
| 473 | }; |
| 474 | |
| 475 | backlight { |
| 476 | bl_en: bl-en { |
| 477 | rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>; |
| 478 | }; |
| 479 | }; |
| 480 | |
| 481 | buttons { |
| 482 | pwrbtn: pwrbtn { |
| 483 | rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>; |
| 484 | }; |
| 485 | }; |
| 486 | |
| 487 | eth_phy { |
| 488 | eth_phy_pwr: eth-phy-pwr { |
| 489 | rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_none>; |
| 490 | }; |
| 491 | }; |
| 492 | |
| 493 | pmic { |
| 494 | pmic_int: pmic-int { |
| 495 | rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>; |
| 496 | }; |
| 497 | }; |
| 498 | |
| 499 | sdmmc { |
| 500 | /* |
| 501 | * Default drive strength isn't enough to achieve even |
| 502 | * high-speed mode on EVB board so bump up to 8ma. |
| 503 | */ |
| 504 | sdmmc_bus4: sdmmc-bus4 { |
| 505 | rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, |
| 506 | <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, |
| 507 | <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, |
| 508 | <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>; |
| 509 | }; |
| 510 | |
| 511 | sdmmc_clk: sdmmc-clk { |
| 512 | rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>; |
| 513 | }; |
| 514 | |
| 515 | sdmmc_cmd: sdmmc-cmd { |
| 516 | rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>; |
| 517 | }; |
| 518 | |
| 519 | sdmmc_pwr: sdmmc-pwr { |
| 520 | rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>; |
| 521 | }; |
| 522 | }; |
| 523 | |
| 524 | usb { |
| 525 | host_vbus_drv: host-vbus-drv { |
| 526 | rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>; |
| 527 | }; |
| 528 | |
| 529 | pwr_3g: pwr-3g { |
| 530 | rockchip,pins = <7 8 RK_FUNC_GPIO &pcfg_pull_none>; |
| 531 | }; |
| 532 | }; |
| 533 | }; |