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