Heiko Stuebner | 6bcf60f | 2013-10-14 17:34:02 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de> |
| 3 | * |
Heiko Stuebner | e068f49 | 2015-03-06 19:04:05 +0100 | [diff] [blame] | 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. |
Heiko Stuebner | 6bcf60f | 2013-10-14 17:34:02 +0200 | [diff] [blame] | 8 | * |
Heiko Stuebner | e068f49 | 2015-03-06 19:04:05 +0100 | [diff] [blame] | 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. |
Heiko Stuebner | 6bcf60f | 2013-10-14 17:34:02 +0200 | [diff] [blame] | 41 | */ |
| 42 | |
| 43 | /dts-v1/; |
| 44 | #include "rk3188.dtsi" |
| 45 | |
| 46 | / { |
| 47 | model = "Radxa Rock"; |
Beniamino Galvani | ac4eba8 | 2014-05-06 19:10:11 +0200 | [diff] [blame] | 48 | compatible = "radxa,rock", "rockchip,rk3188"; |
Heiko Stuebner | 6bcf60f | 2013-10-14 17:34:02 +0200 | [diff] [blame] | 49 | |
| 50 | memory { |
| 51 | reg = <0x60000000 0x80000000>; |
| 52 | }; |
| 53 | |
Heiko Stuebner | c3030d3 | 2014-07-26 18:44:35 +0200 | [diff] [blame] | 54 | gpio-keys { |
| 55 | compatible = "gpio-keys"; |
| 56 | #address-cells = <1>; |
| 57 | #size-cells = <0>; |
| 58 | autorepeat; |
| 59 | |
| 60 | button@0 { |
| 61 | gpios = <&gpio0 4 GPIO_ACTIVE_LOW>; |
| 62 | linux,code = <116>; |
| 63 | label = "GPIO Key Power"; |
| 64 | linux,input-type = <1>; |
| 65 | gpio-key,wakeup = <1>; |
| 66 | debounce-interval = <100>; |
| 67 | }; |
| 68 | }; |
| 69 | |
| 70 | gpio-leds { |
| 71 | compatible = "gpio-leds"; |
| 72 | |
| 73 | green { |
Romain Perier | 3db5894 | 2014-11-23 16:19:35 +0000 | [diff] [blame] | 74 | label = "rock:green:user1"; |
Heiko Stuebner | c3030d3 | 2014-07-26 18:44:35 +0200 | [diff] [blame] | 75 | gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; |
| 76 | default-state = "off"; |
Heiko Stuebner | 6bcf60f | 2013-10-14 17:34:02 +0200 | [diff] [blame] | 77 | }; |
| 78 | |
Romain Perier | 3db5894 | 2014-11-23 16:19:35 +0000 | [diff] [blame] | 79 | blue { |
| 80 | label = "rock:blue:user2"; |
Heiko Stuebner | c3030d3 | 2014-07-26 18:44:35 +0200 | [diff] [blame] | 81 | gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; |
| 82 | default-state = "off"; |
Heiko Stuebner | 6bcf60f | 2013-10-14 17:34:02 +0200 | [diff] [blame] | 83 | }; |
| 84 | |
Heiko Stuebner | c3030d3 | 2014-07-26 18:44:35 +0200 | [diff] [blame] | 85 | sleep { |
Romain Perier | 3db5894 | 2014-11-23 16:19:35 +0000 | [diff] [blame] | 86 | label = "rock:red:power"; |
Heiko Stuebner | c3030d3 | 2014-07-26 18:44:35 +0200 | [diff] [blame] | 87 | gpios = <&gpio0 15 0>; |
| 88 | default-state = "off"; |
Heiko Stuebner | 6bcf60f | 2013-10-14 17:34:02 +0200 | [diff] [blame] | 89 | }; |
Heiko Stuebner | 6bcf60f | 2013-10-14 17:34:02 +0200 | [diff] [blame] | 90 | }; |
Heiko Stuebner | b09e35a | 2014-06-26 16:18:44 +0200 | [diff] [blame] | 91 | |
Beniamino Galvani | 0856705 | 2014-07-13 14:10:01 +0200 | [diff] [blame] | 92 | ir_recv: gpio-ir-receiver { |
| 93 | compatible = "gpio-ir-receiver"; |
| 94 | gpios = <&gpio0 10 1>; |
| 95 | pinctrl-names = "default"; |
| 96 | pinctrl-0 = <&ir_recv_pin>; |
| 97 | }; |
| 98 | |
Heiko Stuebner | f1c8547 | 2014-09-09 15:40:52 +0200 | [diff] [blame] | 99 | vcc_otg: usb-otg-regulator { |
| 100 | compatible = "regulator-fixed"; |
| 101 | enable-active-high; |
| 102 | gpio = <&gpio2 31 GPIO_ACTIVE_HIGH>; |
| 103 | pinctrl-names = "default"; |
Heiko Stuebner | 66fa6cf | 2014-09-16 18:53:10 +0200 | [diff] [blame] | 104 | pinctrl-0 = <&otg_vbus_drv>; |
Heiko Stuebner | f1c8547 | 2014-09-09 15:40:52 +0200 | [diff] [blame] | 105 | regulator-name = "otg-vbus"; |
| 106 | regulator-min-microvolt = <5000000>; |
| 107 | regulator-max-microvolt = <5000000>; |
| 108 | regulator-always-on; |
| 109 | regulator-boot-on; |
| 110 | }; |
| 111 | |
Heiko Stuebner | b09e35a | 2014-06-26 16:18:44 +0200 | [diff] [blame] | 112 | vcc_sd0: sdmmc-regulator { |
| 113 | compatible = "regulator-fixed"; |
| 114 | regulator-name = "sdmmc-supply"; |
| 115 | regulator-min-microvolt = <3300000>; |
| 116 | regulator-max-microvolt = <3300000>; |
| 117 | gpio = <&gpio3 1 GPIO_ACTIVE_LOW>; |
| 118 | startup-delay-us = <100000>; |
| 119 | vin-supply = <&vcc_io>; |
| 120 | }; |
Heiko Stuebner | f1c8547 | 2014-09-09 15:40:52 +0200 | [diff] [blame] | 121 | |
| 122 | vcc_host: usb-host-regulator { |
| 123 | compatible = "regulator-fixed"; |
| 124 | enable-active-high; |
| 125 | gpio = <&gpio0 3 GPIO_ACTIVE_HIGH>; |
| 126 | pinctrl-names = "default"; |
Heiko Stuebner | 66fa6cf | 2014-09-16 18:53:10 +0200 | [diff] [blame] | 127 | pinctrl-0 = <&host_vbus_drv>; |
Heiko Stuebner | f1c8547 | 2014-09-09 15:40:52 +0200 | [diff] [blame] | 128 | regulator-name = "host-pwr"; |
| 129 | regulator-min-microvolt = <5000000>; |
| 130 | regulator-max-microvolt = <5000000>; |
| 131 | regulator-always-on; |
| 132 | regulator-boot-on; |
| 133 | }; |
Heiko Stuebner | 776920e | 2015-03-07 15:14:59 +0100 | [diff] [blame] | 134 | |
| 135 | vsys: vsys-regulator { |
| 136 | compatible = "regulator-fixed"; |
| 137 | regulator-name = "vsys"; |
| 138 | regulator-min-microvolt = <5000000>; |
| 139 | regulator-max-microvolt = <5000000>; |
| 140 | regulator-boot-on; |
| 141 | }; |
Heiko Stuebner | 6bcf60f | 2013-10-14 17:34:02 +0200 | [diff] [blame] | 142 | }; |
Heiko Stuebner | fcbbf96 | 2014-07-26 23:08:06 +0200 | [diff] [blame] | 143 | |
Romain Perier | c6ec956 | 2014-09-08 17:14:50 +0000 | [diff] [blame] | 144 | &emac { |
| 145 | status = "okay"; |
| 146 | |
| 147 | pinctrl-names = "default"; |
| 148 | pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&phy_int>; |
| 149 | |
| 150 | phy = <&phy0>; |
| 151 | phy-supply = <&vcc_rmii>; |
| 152 | |
| 153 | phy0: ethernet-phy@0 { |
| 154 | reg = <0>; |
| 155 | interrupt-parent = <&gpio3>; |
| 156 | interrupts = <26 IRQ_TYPE_LEVEL_LOW>; |
| 157 | }; |
| 158 | }; |
| 159 | |
Heiko Stuebner | 3adb132 | 2014-09-13 00:34:30 +0200 | [diff] [blame] | 160 | &cpu0 { |
| 161 | cpu0-supply = <&vdd_arm>; |
| 162 | }; |
| 163 | |
Beniamino Galvani | fe2c89a | 2014-06-22 16:41:09 +0200 | [diff] [blame] | 164 | &i2c1 { |
| 165 | status = "okay"; |
| 166 | clock-frequency = <400000>; |
| 167 | |
Heiko Stübner | 4721ab8 | 2014-08-20 21:07:22 +0200 | [diff] [blame] | 168 | rtc@51 { |
| 169 | compatible = "haoyu,hym8563"; |
| 170 | reg = <0x51>; |
| 171 | interrupt-parent = <&gpio0>; |
| 172 | interrupts = <13 IRQ_TYPE_EDGE_FALLING>; |
| 173 | pinctrl-names = "default"; |
| 174 | pinctrl-0 = <&rtc_int>; |
| 175 | #clock-cells = <0>; |
| 176 | clock-output-names = "xin32k"; |
| 177 | }; |
| 178 | |
Beniamino Galvani | fe2c89a | 2014-06-22 16:41:09 +0200 | [diff] [blame] | 179 | act8846: act8846@5a { |
| 180 | compatible = "active-semi,act8846"; |
| 181 | reg = <0x5a>; |
| 182 | status = "okay"; |
Michael Niewöhner | 9ab79be | 2015-05-11 22:57:21 +0200 | [diff] [blame] | 183 | system-power-controller; |
Beniamino Galvani | fe2c89a | 2014-06-22 16:41:09 +0200 | [diff] [blame] | 184 | |
| 185 | pinctrl-names = "default"; |
| 186 | pinctrl-0 = <&act8846_dvs0_ctl>; |
| 187 | |
Heiko Stuebner | 776920e | 2015-03-07 15:14:59 +0100 | [diff] [blame] | 188 | vp1-supply = <&vsys>; |
| 189 | vp2-supply = <&vsys>; |
| 190 | vp3-supply = <&vsys>; |
| 191 | vp4-supply = <&vsys>; |
| 192 | inl1-supply = <&vcc_io>; |
| 193 | inl2-supply = <&vsys>; |
| 194 | inl3-supply = <&vsys>; |
| 195 | |
Beniamino Galvani | fe2c89a | 2014-06-22 16:41:09 +0200 | [diff] [blame] | 196 | regulators { |
| 197 | vcc_ddr: REG1 { |
| 198 | regulator-name = "VCC_DDR"; |
| 199 | regulator-min-microvolt = <1200000>; |
| 200 | regulator-max-microvolt = <1200000>; |
| 201 | regulator-always-on; |
| 202 | }; |
| 203 | |
| 204 | vdd_log: REG2 { |
| 205 | regulator-name = "VDD_LOG"; |
| 206 | regulator-min-microvolt = <1000000>; |
| 207 | regulator-max-microvolt = <1000000>; |
| 208 | regulator-always-on; |
| 209 | }; |
| 210 | |
| 211 | vdd_arm: REG3 { |
| 212 | regulator-name = "VDD_ARM"; |
| 213 | regulator-min-microvolt = <875000>; |
Heiko Stuebner | 3adb132 | 2014-09-13 00:34:30 +0200 | [diff] [blame] | 214 | regulator-max-microvolt = <1350000>; |
Beniamino Galvani | fe2c89a | 2014-06-22 16:41:09 +0200 | [diff] [blame] | 215 | regulator-always-on; |
| 216 | }; |
| 217 | |
| 218 | vcc_io: REG4 { |
| 219 | regulator-name = "VCC_IO"; |
| 220 | regulator-min-microvolt = <3300000>; |
| 221 | regulator-max-microvolt = <3300000>; |
| 222 | regulator-always-on; |
| 223 | }; |
| 224 | |
| 225 | vdd_10: REG5 { |
| 226 | regulator-name = "VDD_10"; |
| 227 | regulator-min-microvolt = <1000000>; |
| 228 | regulator-max-microvolt = <1000000>; |
| 229 | regulator-always-on; |
| 230 | }; |
| 231 | |
| 232 | vdd_hdmi: REG6 { |
| 233 | regulator-name = "VDD_HDMI"; |
| 234 | regulator-min-microvolt = <2500000>; |
| 235 | regulator-max-microvolt = <2500000>; |
| 236 | regulator-always-on; |
| 237 | }; |
| 238 | |
| 239 | vcc18: REG7 { |
| 240 | regulator-name = "VCC_18"; |
| 241 | regulator-min-microvolt = <1800000>; |
| 242 | regulator-max-microvolt = <1800000>; |
| 243 | regulator-always-on; |
| 244 | }; |
| 245 | |
| 246 | vcca_33: REG8 { |
| 247 | regulator-name = "VCCA_33"; |
| 248 | regulator-min-microvolt = <3300000>; |
| 249 | regulator-max-microvolt = <3300000>; |
| 250 | regulator-always-on; |
| 251 | }; |
| 252 | |
| 253 | vcc_rmii: REG9 { |
| 254 | regulator-name = "VCC_RMII"; |
| 255 | regulator-min-microvolt = <3300000>; |
| 256 | regulator-max-microvolt = <3300000>; |
Beniamino Galvani | fe2c89a | 2014-06-22 16:41:09 +0200 | [diff] [blame] | 257 | }; |
| 258 | |
| 259 | vccio_wl: REG10 { |
| 260 | regulator-name = "VCCIO_WL"; |
| 261 | regulator-min-microvolt = <3300000>; |
| 262 | regulator-max-microvolt = <3300000>; |
| 263 | regulator-always-on; |
| 264 | }; |
| 265 | |
| 266 | vcc_18: REG11 { |
| 267 | regulator-name = "VCC18_IO"; |
| 268 | regulator-min-microvolt = <1800000>; |
| 269 | regulator-max-microvolt = <1800000>; |
| 270 | regulator-always-on; |
| 271 | }; |
| 272 | |
| 273 | vcc28: REG12 { |
| 274 | regulator-name = "VCC_28"; |
| 275 | regulator-min-microvolt = <2800000>; |
| 276 | regulator-max-microvolt = <2800000>; |
| 277 | regulator-always-on; |
| 278 | }; |
| 279 | }; |
| 280 | }; |
| 281 | }; |
| 282 | |
Heiko Stuebner | b09e35a | 2014-06-26 16:18:44 +0200 | [diff] [blame] | 283 | &mmc0 { |
| 284 | num-slots = <1>; |
| 285 | status = "okay"; |
Heiko Stuebner | 1302d32 | 2014-08-11 19:51:44 +0200 | [diff] [blame] | 286 | pinctrl-names = "default"; |
| 287 | pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>; |
Heiko Stuebner | b09e35a | 2014-06-26 16:18:44 +0200 | [diff] [blame] | 288 | vmmc-supply = <&vcc_sd0>; |
| 289 | |
Jaehoon Chung | 356649a | 2014-08-07 16:38:02 +0900 | [diff] [blame] | 290 | bus-width = <4>; |
| 291 | disable-wp; |
Heiko Stuebner | b09e35a | 2014-06-26 16:18:44 +0200 | [diff] [blame] | 292 | }; |
| 293 | |
Julien CHAUVEAU | efb66e9 | 2014-11-14 16:32:25 +0100 | [diff] [blame] | 294 | &pwm1 { |
| 295 | status = "okay"; |
| 296 | }; |
| 297 | |
| 298 | &pwm2 { |
| 299 | status = "okay"; |
| 300 | }; |
| 301 | |
| 302 | &pwm3 { |
| 303 | status = "okay"; |
| 304 | }; |
| 305 | |
Beniamino Galvani | fe2c89a | 2014-06-22 16:41:09 +0200 | [diff] [blame] | 306 | &pinctrl { |
| 307 | pcfg_output_low: pcfg-output-low { |
| 308 | output-low; |
| 309 | }; |
| 310 | |
| 311 | act8846 { |
| 312 | act8846_dvs0_ctl: act8846-dvs0-ctl { |
| 313 | rockchip,pins = <RK_GPIO3 27 RK_FUNC_GPIO &pcfg_output_low>; |
| 314 | }; |
| 315 | }; |
Beniamino Galvani | 0856705 | 2014-07-13 14:10:01 +0200 | [diff] [blame] | 316 | |
Heiko Stübner | 4721ab8 | 2014-08-20 21:07:22 +0200 | [diff] [blame] | 317 | hym8563 { |
| 318 | rtc_int: rtc-int { |
| 319 | rockchip,pins = <RK_GPIO0 0 RK_FUNC_GPIO &pcfg_pull_up>; |
| 320 | }; |
| 321 | }; |
| 322 | |
Romain Perier | c6ec956 | 2014-09-08 17:14:50 +0000 | [diff] [blame] | 323 | lan8720a { |
| 324 | phy_int: phy-int { |
| 325 | rockchip,pins = <RK_GPIO3 26 RK_FUNC_GPIO &pcfg_pull_up>; |
| 326 | }; |
| 327 | }; |
| 328 | |
Beniamino Galvani | 0856705 | 2014-07-13 14:10:01 +0200 | [diff] [blame] | 329 | ir-receiver { |
| 330 | ir_recv_pin: ir-recv-pin { |
| 331 | rockchip,pins = <RK_GPIO0 10 RK_FUNC_GPIO &pcfg_pull_none>; |
| 332 | }; |
| 333 | }; |
Heiko Stuebner | f1c8547 | 2014-09-09 15:40:52 +0200 | [diff] [blame] | 334 | |
| 335 | usb { |
| 336 | host_vbus_drv: host-vbus-drv { |
| 337 | rockchip,pins = <0 3 RK_FUNC_GPIO &pcfg_pull_none>; |
| 338 | }; |
| 339 | otg_vbus_drv: otg-vbus-drv { |
| 340 | rockchip,pins = <2 31 RK_FUNC_GPIO &pcfg_pull_none>; |
| 341 | }; |
| 342 | }; |
Beniamino Galvani | fe2c89a | 2014-06-22 16:41:09 +0200 | [diff] [blame] | 343 | }; |
| 344 | |
Heiko Stuebner | fcbbf96 | 2014-07-26 23:08:06 +0200 | [diff] [blame] | 345 | &uart0 { |
| 346 | status = "okay"; |
| 347 | }; |
| 348 | |
| 349 | &uart1 { |
| 350 | status = "okay"; |
| 351 | }; |
| 352 | |
| 353 | &uart2 { |
Heiko Stuebner | fcbbf96 | 2014-07-26 23:08:06 +0200 | [diff] [blame] | 354 | status = "okay"; |
| 355 | }; |
| 356 | |
| 357 | &uart3 { |
| 358 | status = "okay"; |
| 359 | }; |
Heiko Stuebner | eb2b9d4 | 2014-07-30 10:16:17 +0200 | [diff] [blame] | 360 | |
Heiko Stuebner | f1c8547 | 2014-09-09 15:40:52 +0200 | [diff] [blame] | 361 | &usb_host { |
| 362 | status = "okay"; |
| 363 | }; |
| 364 | |
| 365 | &usb_otg { |
| 366 | status = "okay"; |
| 367 | }; |
| 368 | |
Heiko Stuebner | eb2b9d4 | 2014-07-30 10:16:17 +0200 | [diff] [blame] | 369 | &wdt { |
| 370 | status = "okay"; |
| 371 | }; |