Heiko Stuebner | cde669f | 2015-05-26 21:50:09 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015 Heiko Stuebner <heiko@sntech.de> |
| 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/; |
Heiko Stuebner | 8b30c89 | 2016-03-31 20:24:29 +0200 | [diff] [blame] | 44 | #include <dt-bindings/input/input.h> |
Heiko Stuebner | cde669f | 2015-05-26 21:50:09 +0200 | [diff] [blame] | 45 | #include <dt-bindings/pwm/pwm.h> |
| 46 | #include "rk3288.dtsi" |
| 47 | |
| 48 | / { |
| 49 | compatible = "netxeon,r89", "rockchip,rk3288"; |
| 50 | |
| 51 | memory { |
Heiko Stuebner | 6158e6d | 2015-07-15 20:57:21 +0200 | [diff] [blame] | 52 | device_type = "memory"; |
Heiko Stuebner | cde669f | 2015-05-26 21:50:09 +0200 | [diff] [blame] | 53 | reg = <0x0 0x80000000>; |
| 54 | }; |
| 55 | |
| 56 | ext_gmac: external-gmac-clock { |
| 57 | compatible = "fixed-clock"; |
| 58 | clock-frequency = <125000000>; |
| 59 | clock-output-names = "ext_gmac"; |
| 60 | #clock-cells = <0>; |
| 61 | }; |
| 62 | |
| 63 | gpio-keys { |
| 64 | compatible = "gpio-keys"; |
Heiko Stuebner | cde669f | 2015-05-26 21:50:09 +0200 | [diff] [blame] | 65 | autorepeat; |
| 66 | |
| 67 | pinctrl-names = "default"; |
| 68 | pinctrl-0 = <&pwrbtn>; |
| 69 | |
Heiko Stuebner | 8b30c89 | 2016-03-31 20:24:29 +0200 | [diff] [blame] | 70 | power { |
Heiko Stuebner | cde669f | 2015-05-26 21:50:09 +0200 | [diff] [blame] | 71 | gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; |
Heiko Stuebner | 8b30c89 | 2016-03-31 20:24:29 +0200 | [diff] [blame] | 72 | linux,code = <KEY_POWER>; |
Heiko Stuebner | cde669f | 2015-05-26 21:50:09 +0200 | [diff] [blame] | 73 | label = "GPIO Key Power"; |
| 74 | linux,input-type = <1>; |
Sudeep Holla | 4f66f24 | 2016-02-08 21:55:12 +0000 | [diff] [blame] | 75 | wakeup-source; |
Heiko Stuebner | cde669f | 2015-05-26 21:50:09 +0200 | [diff] [blame] | 76 | debounce-interval = <100>; |
| 77 | }; |
| 78 | }; |
| 79 | |
Heiko Stuebner | 0661114 | 2015-11-27 23:35:00 +0100 | [diff] [blame] | 80 | ir: ir-receiver { |
| 81 | compatible = "gpio-ir-receiver"; |
| 82 | gpios = <&gpio7 0 GPIO_ACTIVE_LOW>; |
| 83 | pinctrl-names = "default"; |
| 84 | pinctrl-0 = <&ir_int>; |
| 85 | }; |
| 86 | |
Heiko Stuebner | cde669f | 2015-05-26 21:50:09 +0200 | [diff] [blame] | 87 | vcc_host: vcc-host-regulator { |
| 88 | compatible = "regulator-fixed"; |
| 89 | enable-active-high; |
| 90 | gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>; |
| 91 | pinctrl-names = "default"; |
| 92 | pinctrl-0 = <&host_vbus_drv>; |
| 93 | regulator-name = "vcc_host"; |
| 94 | regulator-always-on; |
| 95 | regulator-boot-on; |
| 96 | }; |
| 97 | |
| 98 | vcc_otg: vcc-otg-regulator { |
| 99 | compatible = "regulator-fixed"; |
| 100 | enable-active-high; |
| 101 | gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>; |
| 102 | pinctrl-names = "default"; |
| 103 | pinctrl-0 = <&otg_vbus_drv>; |
| 104 | regulator-name = "vcc_otg"; |
| 105 | regulator-always-on; |
| 106 | regulator-boot-on; |
| 107 | }; |
| 108 | |
| 109 | vcc_sdmmc: sdmmc-regulator { |
| 110 | compatible = "regulator-fixed"; |
| 111 | regulator-name = "sdmmc-supply"; |
| 112 | regulator-min-microvolt = <3300000>; |
| 113 | regulator-max-microvolt = <3300000>; |
| 114 | gpio = <&gpio7 11 GPIO_ACTIVE_LOW>; |
| 115 | startup-delay-us = <100000>; |
| 116 | vin-supply = <&vcc_io>; |
| 117 | }; |
| 118 | |
| 119 | vcc_sys: sys-regulator { |
| 120 | compatible = "regulator-fixed"; |
| 121 | regulator-name = "sys-supply"; |
| 122 | regulator-min-microvolt = <5000000>; |
| 123 | regulator-max-microvolt = <5000000>; |
| 124 | regulator-always-on; |
| 125 | regulator-boot-on; |
| 126 | }; |
| 127 | }; |
| 128 | |
| 129 | &cpu0 { |
| 130 | cpu0-supply = <&vdd_cpu>; |
| 131 | }; |
| 132 | |
| 133 | &gmac { |
| 134 | phy-supply = <&vcc_lan>; |
| 135 | phy-mode = "rgmii"; |
| 136 | clock_in_out = "input"; |
| 137 | snps,reset-gpio = <&gpio4 7 0>; |
| 138 | snps,reset-active-low; |
| 139 | snps,reset-delays-us = <0 10000 1000000>; |
| 140 | assigned-clocks = <&cru SCLK_MAC>; |
| 141 | assigned-clock-parents = <&ext_gmac>; |
| 142 | pinctrl-names = "default"; |
| 143 | pinctrl-0 = <&rgmii_pins>; |
| 144 | tx_delay = <0x30>; |
| 145 | rx_delay = <0x10>; |
| 146 | status = "ok"; |
| 147 | }; |
| 148 | |
| 149 | &hdmi { |
| 150 | status = "okay"; |
| 151 | }; |
| 152 | |
| 153 | &i2c0 { |
| 154 | status = "okay"; |
| 155 | |
| 156 | vdd_cpu: pmic@40 { |
| 157 | compatible = "silergy,syr827"; |
| 158 | reg = <0x40>; |
| 159 | fcs,suspend-voltage-selector = <1>; |
| 160 | regulator-name = "VDD_CPU"; |
| 161 | regulator-enable-ramp-delay = <300>; |
| 162 | regulator-min-microvolt = <850000>; |
| 163 | regulator-max-microvolt = <1350000>; |
| 164 | regulator-ramp-delay = <8000>; |
| 165 | regulator-always-on; |
| 166 | regulator-boot-on; |
| 167 | vin-supply = <&vcc_sys>; |
| 168 | }; |
| 169 | |
| 170 | vdd_gpu: pmic@41 { |
| 171 | compatible = "silergy,syr828"; |
| 172 | reg = <0x41>; |
| 173 | fcs,suspend-voltage-selector = <1>; |
| 174 | regulator-name = "VDD_GPU"; |
| 175 | regulator-enable-ramp-delay = <300>; |
| 176 | regulator-min-microvolt = <850000>; |
| 177 | regulator-max-microvolt = <1350000>; |
| 178 | regulator-ramp-delay = <8000>; |
| 179 | regulator-always-on; |
| 180 | regulator-boot-on; |
| 181 | vin-supply = <&vcc_sys>; |
| 182 | }; |
| 183 | |
| 184 | rtc@51 { |
| 185 | compatible = "haoyu,hym8563"; |
| 186 | reg = <0x51>; |
| 187 | #clock-cells = <0>; |
| 188 | clock-output-names = "xin32k"; |
| 189 | interrupt-parent = <&gpio0>; |
| 190 | interrupts = <4 IRQ_TYPE_EDGE_FALLING>; |
| 191 | pinctrl-names = "default"; |
| 192 | pinctrl-0 = <&pmic_int>; |
| 193 | }; |
| 194 | |
| 195 | act8846: pmic@5a { |
| 196 | compatible = "active-semi,act8846"; |
| 197 | reg = <0x5a>; |
| 198 | pinctrl-names = "default"; |
| 199 | pinctrl-0 = <&pmic_vsel>, <&pwr_hold>; |
| 200 | system-power-controller; |
| 201 | |
| 202 | regulators { |
| 203 | vcc_ddr: REG1 { |
| 204 | regulator-name = "VCC_DDR"; |
| 205 | regulator-min-microvolt = <1200000>; |
| 206 | regulator-max-microvolt = <1200000>; |
| 207 | regulator-always-on; |
| 208 | }; |
| 209 | |
| 210 | vcc_io: REG2 { |
| 211 | regulator-name = "VCC_IO"; |
| 212 | regulator-min-microvolt = <3300000>; |
| 213 | regulator-max-microvolt = <3300000>; |
| 214 | regulator-always-on; |
| 215 | }; |
| 216 | |
| 217 | vdd_log: REG3 { |
| 218 | regulator-name = "VDD_LOG"; |
| 219 | regulator-min-microvolt = <1000000>; |
| 220 | regulator-max-microvolt = <1000000>; |
| 221 | regulator-always-on; |
| 222 | }; |
| 223 | |
| 224 | vcc_20: REG4 { |
| 225 | regulator-name = "VCC_20"; |
| 226 | regulator-min-microvolt = <2000000>; |
| 227 | regulator-max-microvolt = <2000000>; |
| 228 | regulator-always-on; |
| 229 | }; |
| 230 | |
| 231 | vccio_sd: REG5 { |
| 232 | regulator-name = "VCCIO_SD"; |
| 233 | regulator-min-microvolt = <3300000>; |
| 234 | regulator-max-microvolt = <3300000>; |
| 235 | regulator-always-on; |
| 236 | }; |
| 237 | |
| 238 | vdd10_lcd: REG6 { |
| 239 | regulator-name = "VDD10_LCD"; |
| 240 | regulator-min-microvolt = <1000000>; |
| 241 | regulator-max-microvolt = <1000000>; |
| 242 | regulator-always-on; |
| 243 | }; |
| 244 | |
| 245 | vcc_wl: REG7 { |
| 246 | regulator-name = "VCC_WL"; |
| 247 | regulator-min-microvolt = <3300000>; |
| 248 | regulator-max-microvolt = <3300000>; |
| 249 | regulator-always-on; |
| 250 | }; |
| 251 | |
| 252 | vcca_33: REG8 { |
| 253 | regulator-name = "VCCA_33"; |
| 254 | regulator-min-microvolt = <3300000>; |
| 255 | regulator-max-microvolt = <3300000>; |
| 256 | regulator-always-on; |
| 257 | }; |
| 258 | |
| 259 | vcc_lan: REG9 { |
| 260 | regulator-name = "VCC_LAN"; |
| 261 | regulator-min-microvolt = <3300000>; |
| 262 | regulator-max-microvolt = <3300000>; |
| 263 | regulator-always-on; |
| 264 | }; |
| 265 | |
| 266 | vdd_10: REG10 { |
| 267 | regulator-name = "VDD_10"; |
| 268 | regulator-min-microvolt = <1000000>; |
| 269 | regulator-max-microvolt = <1000000>; |
| 270 | regulator-always-on; |
| 271 | }; |
| 272 | |
| 273 | vcc_18: REG11 { |
| 274 | regulator-name = "VCC_18"; |
| 275 | regulator-min-microvolt = <1800000>; |
| 276 | regulator-max-microvolt = <1800000>; |
| 277 | regulator-always-on; |
| 278 | }; |
| 279 | |
| 280 | vcc18_lcd: REG12 { |
| 281 | regulator-name = "VCC18_LCD"; |
| 282 | regulator-min-microvolt = <1800000>; |
| 283 | regulator-max-microvolt = <1800000>; |
| 284 | regulator-always-on; |
| 285 | }; |
| 286 | }; |
| 287 | }; |
| 288 | }; |
| 289 | |
| 290 | &i2c5 { |
| 291 | status = "okay"; |
| 292 | }; |
| 293 | |
| 294 | &pinctrl { |
| 295 | pcfg_output_high: pcfg-output-high { |
| 296 | output-high; |
| 297 | }; |
| 298 | |
| 299 | pcfg_output_low: pcfg-output-low { |
| 300 | output-low; |
| 301 | }; |
| 302 | |
| 303 | act8846 { |
| 304 | pmic_vsel: pmic-vsel { |
| 305 | rockchip,pins = <7 1 RK_FUNC_GPIO &pcfg_output_low>; |
| 306 | }; |
| 307 | |
| 308 | pwr_hold: pwr-hold { |
| 309 | rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_output_high>; |
| 310 | }; |
| 311 | }; |
| 312 | |
| 313 | buttons { |
| 314 | pwrbtn: pwrbtn { |
| 315 | rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>; |
| 316 | }; |
| 317 | }; |
| 318 | |
Heiko Stuebner | 0661114 | 2015-11-27 23:35:00 +0100 | [diff] [blame] | 319 | ir { |
| 320 | ir_int: ir-int { |
| 321 | rockchip,pins = <7 0 RK_FUNC_GPIO &pcfg_pull_up>; |
| 322 | }; |
| 323 | }; |
| 324 | |
Heiko Stuebner | cde669f | 2015-05-26 21:50:09 +0200 | [diff] [blame] | 325 | pmic { |
| 326 | pmic_int: pmic-int { |
| 327 | rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>; |
| 328 | }; |
| 329 | }; |
| 330 | |
| 331 | usb { |
| 332 | host_vbus_drv: host-vbus-drv { |
| 333 | rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>; |
| 334 | }; |
| 335 | |
| 336 | otg_vbus_drv: otg-vbus-drv { |
| 337 | rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>; |
| 338 | }; |
| 339 | }; |
| 340 | }; |
| 341 | |
| 342 | &pwm0 { |
| 343 | status = "okay"; |
| 344 | }; |
| 345 | |
| 346 | &saradc { |
| 347 | vref-supply = <&vcc_18>; |
| 348 | status = "okay"; |
| 349 | }; |
| 350 | |
| 351 | &sdmmc { |
| 352 | bus-width = <4>; |
| 353 | cap-mmc-highspeed; |
| 354 | cap-sd-highspeed; |
| 355 | card-detect-delay = <200>; |
| 356 | disable-wp; |
| 357 | num-slots = <1>; |
| 358 | pinctrl-names = "default"; |
| 359 | pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; |
| 360 | vmmc-supply = <&vcc_sdmmc>; |
| 361 | vqmmc-supply = <&vccio_sd>; |
| 362 | status = "okay"; |
| 363 | }; |
| 364 | |
| 365 | &tsadc { |
| 366 | rockchip,hw-tshut-mode = <0>; |
| 367 | rockchip,hw-tshut-polarity = <0>; |
| 368 | status = "okay"; |
| 369 | }; |
| 370 | |
| 371 | &uart0 { |
| 372 | status = "okay"; |
| 373 | }; |
| 374 | |
| 375 | &uart1 { |
| 376 | status = "okay"; |
| 377 | }; |
| 378 | |
| 379 | &uart2 { |
| 380 | status = "okay"; |
| 381 | }; |
| 382 | |
| 383 | &uart3 { |
| 384 | status = "okay"; |
| 385 | }; |
| 386 | |
| 387 | &uart4 { |
| 388 | status = "okay"; |
| 389 | }; |
| 390 | |
| 391 | &usb_host0_ehci { |
| 392 | status = "okay"; |
| 393 | }; |
| 394 | |
| 395 | &usb_host1 { |
| 396 | status = "okay"; |
| 397 | }; |
| 398 | |
| 399 | &usb_otg { |
| 400 | status = "okay"; |
| 401 | }; |
| 402 | |
| 403 | &usbphy { |
| 404 | status = "okay"; |
| 405 | }; |
| 406 | |
| 407 | &vopb { |
| 408 | status = "okay"; |
| 409 | }; |
| 410 | |
| 411 | &vopb_mmu { |
| 412 | status = "okay"; |
| 413 | }; |
| 414 | |
| 415 | &vopl { |
| 416 | status = "okay"; |
| 417 | }; |
| 418 | |
| 419 | &vopl_mmu { |
| 420 | status = "okay"; |
| 421 | }; |
| 422 | |
| 423 | &wdt { |
| 424 | status = "okay"; |
| 425 | }; |