Tom Rini | 8b0c8a1 | 2018-05-06 18:27:01 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ OR X11 |
Heiko Stübner | e1de611 | 2017-03-26 21:09:55 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de> |
Heiko Stübner | e1de611 | 2017-03-26 21:09:55 +0200 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | /dts-v1/; |
| 7 | #include <dt-bindings/input/input.h> |
| 8 | #include "rk3188.dtsi" |
Kever Yang | b8482a6 | 2018-04-18 11:13:44 +0800 | [diff] [blame] | 9 | #include "rk3188-radxarock-u-boot.dtsi" |
Heiko Stübner | e1de611 | 2017-03-26 21:09:55 +0200 | [diff] [blame] | 10 | |
| 11 | / { |
| 12 | model = "Radxa Rock"; |
| 13 | compatible = "radxa,rock", "rockchip,rk3188"; |
| 14 | |
Johan Jonker | 7fd0ac1 | 2021-06-25 15:26:30 +0200 | [diff] [blame] | 15 | aliases { |
| 16 | mmc0 = &mmc0; |
| 17 | }; |
| 18 | |
Heiko Stübner | e1de611 | 2017-03-26 21:09:55 +0200 | [diff] [blame] | 19 | chosen { |
| 20 | /* stdout-path = &uart2; */ |
| 21 | stdout-path = "serial2:115200n8"; |
| 22 | }; |
| 23 | |
| 24 | config { |
| 25 | u-boot,dm-pre-reloc; |
| 26 | u-boot,boot-led = "rock:red:power"; |
| 27 | }; |
| 28 | |
| 29 | memory { |
| 30 | device_type = "memory"; |
| 31 | reg = <0x60000000 0x80000000>; |
| 32 | }; |
| 33 | |
| 34 | gpio-keys { |
| 35 | compatible = "gpio-keys"; |
| 36 | autorepeat; |
| 37 | |
| 38 | power { |
| 39 | gpios = <&gpio0 4 GPIO_ACTIVE_LOW>; |
| 40 | linux,code = <KEY_POWER>; |
| 41 | label = "GPIO Key Power"; |
| 42 | linux,input-type = <1>; |
| 43 | wakeup-source; |
| 44 | debounce-interval = <100>; |
| 45 | }; |
| 46 | }; |
| 47 | |
| 48 | gpio-leds { |
| 49 | compatible = "gpio-leds"; |
| 50 | |
| 51 | green { |
| 52 | label = "rock:green:user1"; |
| 53 | gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; |
| 54 | default-state = "off"; |
| 55 | }; |
| 56 | |
| 57 | blue { |
| 58 | label = "rock:blue:user2"; |
| 59 | gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; |
| 60 | default-state = "off"; |
| 61 | }; |
| 62 | |
| 63 | sleep { |
| 64 | label = "rock:red:power"; |
| 65 | gpios = <&gpio0 15 0>; |
| 66 | default-state = "off"; |
| 67 | }; |
| 68 | }; |
| 69 | |
| 70 | sound { |
| 71 | compatible = "simple-audio-card"; |
| 72 | simple-audio-card,name = "SPDIF"; |
| 73 | |
| 74 | simple-audio-card,dai-link@1 { /* S/PDIF - S/PDIF */ |
| 75 | cpu { sound-dai = <&spdif>; }; |
| 76 | codec { sound-dai = <&spdif_out>; }; |
| 77 | }; |
| 78 | }; |
| 79 | |
| 80 | spdif_out: spdif-out { |
| 81 | compatible = "linux,spdif-dit"; |
| 82 | #sound-dai-cells = <0>; |
| 83 | }; |
| 84 | |
| 85 | ir_recv: gpio-ir-receiver { |
| 86 | compatible = "gpio-ir-receiver"; |
| 87 | gpios = <&gpio0 10 1>; |
| 88 | pinctrl-names = "default"; |
| 89 | pinctrl-0 = <&ir_recv_pin>; |
| 90 | }; |
| 91 | |
| 92 | vcc_otg: usb-otg-regulator { |
| 93 | compatible = "regulator-fixed"; |
| 94 | enable-active-high; |
| 95 | gpio = <&gpio2 31 GPIO_ACTIVE_HIGH>; |
| 96 | pinctrl-names = "default"; |
| 97 | pinctrl-0 = <&otg_vbus_drv>; |
| 98 | regulator-name = "otg-vbus"; |
| 99 | regulator-min-microvolt = <5000000>; |
| 100 | regulator-max-microvolt = <5000000>; |
| 101 | regulator-always-on; |
| 102 | regulator-boot-on; |
| 103 | }; |
| 104 | |
| 105 | vcc_sd0: sdmmc-regulator { |
| 106 | compatible = "regulator-fixed"; |
| 107 | regulator-name = "sdmmc-supply"; |
| 108 | regulator-min-microvolt = <3300000>; |
| 109 | regulator-max-microvolt = <3300000>; |
| 110 | gpio = <&gpio3 1 GPIO_ACTIVE_LOW>; |
Heiko Stuebner | e66e1cc | 2018-09-21 10:59:48 +0200 | [diff] [blame] | 111 | pinctrl-names = "default"; |
| 112 | pinctrl-0 = <&sdmmc_pwr>; |
Heiko Stübner | e1de611 | 2017-03-26 21:09:55 +0200 | [diff] [blame] | 113 | startup-delay-us = <100000>; |
| 114 | vin-supply = <&vcc_io>; |
| 115 | }; |
| 116 | |
| 117 | vcc_host: usb-host-regulator { |
| 118 | compatible = "regulator-fixed"; |
| 119 | enable-active-high; |
| 120 | gpio = <&gpio0 3 GPIO_ACTIVE_HIGH>; |
| 121 | pinctrl-names = "default"; |
| 122 | pinctrl-0 = <&host_vbus_drv>; |
| 123 | regulator-name = "host-pwr"; |
| 124 | regulator-min-microvolt = <5000000>; |
| 125 | regulator-max-microvolt = <5000000>; |
| 126 | regulator-always-on; |
| 127 | regulator-boot-on; |
| 128 | }; |
| 129 | |
| 130 | vsys: vsys-regulator { |
| 131 | compatible = "regulator-fixed"; |
| 132 | regulator-name = "vsys"; |
| 133 | regulator-min-microvolt = <5000000>; |
| 134 | regulator-max-microvolt = <5000000>; |
| 135 | regulator-boot-on; |
| 136 | }; |
| 137 | }; |
| 138 | |
| 139 | &dmc { |
| 140 | rockchip,pctl-timing = <0x12c 0xc8 0x1f4 0x1e 0x4e 0x4 0x69 0x6 |
| 141 | 0x3 0x0 0x6 0x5 0xc 0x10 0x6 0x4 |
| 142 | 0x4 0x5 0x4 0x200 0x3 0xa 0x40 0x0 |
| 143 | 0x1 0x5 0x5 0x3 0xc 0x1e 0x100 0x0 |
| 144 | 0x4 0x0>; |
| 145 | rockchip,phy-timing = <0x208c6690 0x690878 0x10022a00 |
| 146 | 0x220 0x40 0x0 0x0>; |
| 147 | rockchip,sdram-params = <0x24716310 0 2 300000000 3 9 0>; |
| 148 | }; |
| 149 | |
| 150 | &emac { |
| 151 | status = "okay"; |
| 152 | |
| 153 | pinctrl-names = "default"; |
| 154 | pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&phy_int>; |
| 155 | |
| 156 | phy = <&phy0>; |
| 157 | phy-supply = <&vcc_rmii>; |
| 158 | |
| 159 | phy0: ethernet-phy@0 { |
| 160 | reg = <0>; |
| 161 | interrupt-parent = <&gpio3>; |
| 162 | interrupts = <26 IRQ_TYPE_LEVEL_LOW>; |
| 163 | }; |
| 164 | }; |
| 165 | |
| 166 | &cpu0 { |
| 167 | cpu0-supply = <&vdd_arm>; |
| 168 | }; |
| 169 | |
| 170 | &i2c1 { |
| 171 | status = "okay"; |
| 172 | clock-frequency = <400000>; |
| 173 | |
| 174 | rtc@51 { |
| 175 | compatible = "haoyu,hym8563"; |
| 176 | reg = <0x51>; |
| 177 | interrupt-parent = <&gpio0>; |
| 178 | interrupts = <13 IRQ_TYPE_EDGE_FALLING>; |
| 179 | pinctrl-names = "default"; |
| 180 | pinctrl-0 = <&rtc_int>; |
| 181 | #clock-cells = <0>; |
| 182 | clock-output-names = "xin32k"; |
| 183 | }; |
| 184 | |
| 185 | act8846: act8846@5a { |
| 186 | compatible = "active-semi,act8846"; |
| 187 | reg = <0x5a>; |
| 188 | status = "okay"; |
| 189 | system-power-controller; |
| 190 | |
| 191 | pinctrl-names = "default"; |
| 192 | pinctrl-0 = <&act8846_dvs0_ctl>; |
| 193 | |
| 194 | vp1-supply = <&vsys>; |
| 195 | vp2-supply = <&vsys>; |
| 196 | vp3-supply = <&vsys>; |
| 197 | vp4-supply = <&vsys>; |
| 198 | inl1-supply = <&vcc_io>; |
| 199 | inl2-supply = <&vsys>; |
| 200 | inl3-supply = <&vsys>; |
| 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 | vdd_log: REG2 { |
| 211 | regulator-name = "VDD_LOG"; |
| 212 | regulator-min-microvolt = <1000000>; |
| 213 | regulator-max-microvolt = <1000000>; |
| 214 | regulator-always-on; |
| 215 | }; |
| 216 | |
| 217 | vdd_arm: REG3 { |
| 218 | regulator-name = "VDD_ARM"; |
| 219 | regulator-min-microvolt = <875000>; |
| 220 | regulator-max-microvolt = <1350000>; |
| 221 | regulator-always-on; |
| 222 | }; |
| 223 | |
| 224 | vcc_io: REG4 { |
| 225 | regulator-name = "VCC_IO"; |
| 226 | regulator-min-microvolt = <3300000>; |
| 227 | regulator-max-microvolt = <3300000>; |
| 228 | regulator-always-on; |
| 229 | }; |
| 230 | |
| 231 | vdd_10: REG5 { |
| 232 | regulator-name = "VDD_10"; |
| 233 | regulator-min-microvolt = <1000000>; |
| 234 | regulator-max-microvolt = <1000000>; |
| 235 | regulator-always-on; |
| 236 | }; |
| 237 | |
| 238 | vdd_hdmi: REG6 { |
| 239 | regulator-name = "VDD_HDMI"; |
| 240 | regulator-min-microvolt = <2500000>; |
| 241 | regulator-max-microvolt = <2500000>; |
| 242 | regulator-always-on; |
| 243 | }; |
| 244 | |
| 245 | vcc18: REG7 { |
| 246 | regulator-name = "VCC_18"; |
| 247 | regulator-min-microvolt = <1800000>; |
| 248 | regulator-max-microvolt = <1800000>; |
| 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_rmii: REG9 { |
| 260 | regulator-name = "VCC_RMII"; |
| 261 | regulator-min-microvolt = <3300000>; |
| 262 | regulator-max-microvolt = <3300000>; |
| 263 | }; |
| 264 | |
| 265 | vccio_wl: REG10 { |
| 266 | regulator-name = "VCCIO_WL"; |
| 267 | regulator-min-microvolt = <3300000>; |
| 268 | regulator-max-microvolt = <3300000>; |
| 269 | regulator-always-on; |
| 270 | }; |
| 271 | |
| 272 | vcc_18: REG11 { |
| 273 | regulator-name = "VCC18_IO"; |
| 274 | regulator-min-microvolt = <1800000>; |
| 275 | regulator-max-microvolt = <1800000>; |
| 276 | regulator-always-on; |
| 277 | }; |
| 278 | |
| 279 | vcc28: REG12 { |
| 280 | regulator-name = "VCC_28"; |
| 281 | regulator-min-microvolt = <2800000>; |
| 282 | regulator-max-microvolt = <2800000>; |
| 283 | regulator-always-on; |
| 284 | }; |
| 285 | }; |
| 286 | }; |
| 287 | }; |
| 288 | |
| 289 | &mmc0 { |
| 290 | num-slots = <1>; |
| 291 | status = "okay"; |
| 292 | pinctrl-names = "default"; |
| 293 | pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>; |
| 294 | vmmc-supply = <&vcc_sd0>; |
| 295 | |
| 296 | bus-width = <4>; |
| 297 | cap-mmc-highspeed; |
| 298 | cap-sd-highspeed; |
| 299 | disable-wp; |
| 300 | }; |
| 301 | |
| 302 | &pwm1 { |
| 303 | status = "okay"; |
| 304 | }; |
| 305 | |
| 306 | &pwm2 { |
| 307 | status = "okay"; |
| 308 | }; |
| 309 | |
| 310 | &pwm3 { |
| 311 | status = "okay"; |
| 312 | }; |
| 313 | |
| 314 | &pinctrl { |
| 315 | pcfg_output_low: pcfg-output-low { |
| 316 | output-low; |
| 317 | }; |
| 318 | |
| 319 | act8846 { |
| 320 | act8846_dvs0_ctl: act8846-dvs0-ctl { |
| 321 | rockchip,pins = <RK_GPIO3 27 RK_FUNC_GPIO &pcfg_output_low>; |
| 322 | }; |
| 323 | }; |
| 324 | |
| 325 | hym8563 { |
| 326 | rtc_int: rtc-int { |
| 327 | rockchip,pins = <RK_GPIO0 0 RK_FUNC_GPIO &pcfg_pull_up>; |
| 328 | }; |
| 329 | }; |
| 330 | |
| 331 | lan8720a { |
| 332 | phy_int: phy-int { |
| 333 | rockchip,pins = <RK_GPIO3 26 RK_FUNC_GPIO &pcfg_pull_up>; |
| 334 | }; |
| 335 | }; |
| 336 | |
| 337 | ir-receiver { |
| 338 | ir_recv_pin: ir-recv-pin { |
| 339 | rockchip,pins = <RK_GPIO0 10 RK_FUNC_GPIO &pcfg_pull_none>; |
| 340 | }; |
| 341 | }; |
| 342 | |
Heiko Stuebner | e66e1cc | 2018-09-21 10:59:48 +0200 | [diff] [blame] | 343 | sd0 { |
| 344 | sdmmc_pwr: sdmmc-pwr { |
| 345 | rockchip,pins = <RK_GPIO3 1 RK_FUNC_GPIO &pcfg_pull_none>; |
| 346 | }; |
| 347 | }; |
| 348 | |
Heiko Stübner | e1de611 | 2017-03-26 21:09:55 +0200 | [diff] [blame] | 349 | usb { |
| 350 | host_vbus_drv: host-vbus-drv { |
| 351 | rockchip,pins = <0 3 RK_FUNC_GPIO &pcfg_pull_none>; |
| 352 | }; |
| 353 | otg_vbus_drv: otg-vbus-drv { |
| 354 | rockchip,pins = <2 31 RK_FUNC_GPIO &pcfg_pull_none>; |
| 355 | }; |
| 356 | }; |
| 357 | }; |
| 358 | |
| 359 | &spdif { |
| 360 | status = "okay"; |
| 361 | }; |
| 362 | |
| 363 | &uart0 { |
| 364 | status = "okay"; |
| 365 | }; |
| 366 | |
| 367 | &uart1 { |
| 368 | status = "okay"; |
| 369 | }; |
| 370 | |
Heiko Stübner | e1de611 | 2017-03-26 21:09:55 +0200 | [diff] [blame] | 371 | &uart3 { |
| 372 | status = "okay"; |
| 373 | }; |
| 374 | |
| 375 | &usbphy { |
| 376 | status = "okay"; |
| 377 | }; |
| 378 | |
| 379 | &usb_host { |
| 380 | status = "okay"; |
| 381 | }; |
| 382 | |
| 383 | &usb_otg { |
| 384 | status = "okay"; |
| 385 | }; |
| 386 | |
| 387 | &wdt { |
| 388 | status = "okay"; |
| 389 | }; |