Tom Rini | 8b0c8a1 | 2018-05-06 18:27:01 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ OR X11 |
Jernej Skrabec | 971e53a | 2017-03-30 01:23:14 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2016 Heiko Stuebner <heiko@sntech.de> |
Jernej Skrabec | 971e53a | 2017-03-30 01:23:14 +0200 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include "rk3288.dtsi" |
| 7 | |
| 8 | / { |
| 9 | memory { |
| 10 | device_type = "memory"; |
| 11 | reg = <0 0x80000000>; |
| 12 | }; |
| 13 | |
| 14 | ext_gmac: external-gmac-clock { |
| 15 | compatible = "fixed-clock"; |
| 16 | #clock-cells = <0>; |
| 17 | clock-frequency = <125000000>; |
| 18 | clock-output-names = "ext_gmac"; |
| 19 | }; |
| 20 | |
| 21 | io_domains: io-domains { |
| 22 | compatible = "rockchip,rk3288-io-voltage-domain"; |
| 23 | rockchip,grf = <&grf>; |
| 24 | |
| 25 | audio-supply = <&vcca_33>; |
| 26 | flash0-supply = <&vcc_flash>; |
| 27 | flash1-supply = <&vcc_lan>; |
| 28 | gpio30-supply = <&vcc_io>; |
| 29 | gpio1830-supply = <&vcc_io>; |
| 30 | lcdc-supply = <&vcc_io>; |
| 31 | sdcard-supply = <&vccio_sd>; |
| 32 | wifi-supply = <&vcc_18>; |
| 33 | }; |
| 34 | |
| 35 | |
| 36 | leds { |
Jernej Skrabec | 971e53a | 2017-03-30 01:23:14 +0200 | [diff] [blame] | 37 | compatible = "gpio-leds"; |
| 38 | |
| 39 | work { |
Jernej Skrabec | 971e53a | 2017-03-30 01:23:14 +0200 | [diff] [blame] | 40 | gpios = <&gpio7 4 GPIO_ACTIVE_LOW>; |
| 41 | label = "miqi:green:user"; |
| 42 | linux,default-trigger = "default-on"; |
| 43 | pinctrl-names = "default"; |
| 44 | pinctrl-0 = <&led_ctl>; |
| 45 | }; |
| 46 | }; |
| 47 | |
| 48 | vcc_flash: flash-regulator { |
| 49 | compatible = "regulator-fixed"; |
| 50 | regulator-name = "vcc_flash"; |
| 51 | regulator-min-microvolt = <1800000>; |
| 52 | regulator-max-microvolt = <1800000>; |
| 53 | vin-supply = <&vcc_io>; |
| 54 | }; |
| 55 | |
| 56 | vcc_host: usb-host-regulator { |
| 57 | compatible = "regulator-fixed"; |
| 58 | enable-active-high; |
| 59 | gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>; |
| 60 | pinctrl-names = "default"; |
| 61 | pinctrl-0 = <&host_vbus_drv>; |
| 62 | regulator-name = "vcc_host"; |
| 63 | regulator-min-microvolt = <5000000>; |
| 64 | regulator-max-microvolt = <5000000>; |
| 65 | regulator-always-on; |
| 66 | vin-supply = <&vcc_sys>; |
| 67 | }; |
| 68 | |
| 69 | vcc_sd: sdmmc-regulator { |
| 70 | compatible = "regulator-fixed"; |
| 71 | gpio = <&gpio7 11 GPIO_ACTIVE_LOW>; |
| 72 | pinctrl-names = "default"; |
| 73 | pinctrl-0 = <&sdmmc_pwr>; |
| 74 | regulator-name = "vcc_sd"; |
| 75 | regulator-min-microvolt = <3300000>; |
| 76 | regulator-max-microvolt = <3300000>; |
| 77 | startup-delay-us = <100000>; |
| 78 | vin-supply = <&vcc_io>; |
| 79 | }; |
| 80 | |
| 81 | vcc_sys: vsys-regulator { |
| 82 | compatible = "regulator-fixed"; |
| 83 | regulator-name = "vcc_sys"; |
| 84 | regulator-min-microvolt = <5000000>; |
| 85 | regulator-max-microvolt = <5000000>; |
| 86 | regulator-always-on; |
| 87 | regulator-boot-on; |
| 88 | }; |
| 89 | }; |
| 90 | |
| 91 | &cpu0 { |
| 92 | cpu0-supply = <&vdd_cpu>; |
| 93 | }; |
| 94 | |
| 95 | &emmc { |
| 96 | bus-width = <8>; |
| 97 | cap-mmc-highspeed; |
| 98 | disable-wp; |
| 99 | non-removable; |
| 100 | num-slots = <1>; |
| 101 | pinctrl-names = "default"; |
| 102 | pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>; |
| 103 | vmmc-supply = <&vcc_io>; |
| 104 | vqmmc-supply = <&vcc_flash>; |
| 105 | status = "okay"; |
| 106 | }; |
| 107 | |
| 108 | &gmac { |
| 109 | assigned-clocks = <&cru SCLK_MAC>; |
| 110 | assigned-clock-parents = <&ext_gmac>; |
| 111 | clock_in_out = "input"; |
| 112 | pinctrl-names = "default"; |
| 113 | pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>; |
| 114 | phy-supply = <&vcc_lan>; |
| 115 | phy-mode = "rgmii"; |
| 116 | snps,reset-active-low; |
| 117 | snps,reset-delays-us = <0 10000 1000000>; |
| 118 | snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>; |
| 119 | tx_delay = <0x30>; |
| 120 | rx_delay = <0x10>; |
| 121 | status = "okay"; |
| 122 | }; |
| 123 | |
| 124 | &hdmi { |
| 125 | ddc-i2c-bus = <&i2c5>; |
| 126 | status = "okay"; |
| 127 | }; |
| 128 | |
| 129 | &i2c0 { |
| 130 | clock-frequency = <400000>; |
| 131 | status = "okay"; |
| 132 | |
| 133 | vdd_cpu: syr827@40 { |
| 134 | compatible = "silergy,syr827"; |
| 135 | fcs,suspend-voltage-selector = <1>; |
| 136 | reg = <0x40>; |
| 137 | regulator-name = "vdd_cpu"; |
| 138 | regulator-min-microvolt = <850000>; |
| 139 | regulator-max-microvolt = <1350000>; |
| 140 | regulator-always-on; |
| 141 | regulator-boot-on; |
| 142 | regulator-enable-ramp-delay = <300>; |
| 143 | regulator-ramp-delay = <8000>; |
| 144 | vin-supply = <&vcc_sys>; |
| 145 | }; |
| 146 | |
| 147 | vdd_gpu: syr828@41 { |
| 148 | compatible = "silergy,syr828"; |
| 149 | fcs,suspend-voltage-selector = <1>; |
| 150 | reg = <0x41>; |
| 151 | regulator-name = "vdd_gpu"; |
| 152 | regulator-min-microvolt = <850000>; |
| 153 | regulator-max-microvolt = <1350000>; |
| 154 | regulator-always-on; |
| 155 | vin-supply = <&vcc_sys>; |
| 156 | }; |
| 157 | |
| 158 | hym8563: hym8563@51 { |
| 159 | compatible = "haoyu,hym8563"; |
| 160 | reg = <0x51>; |
| 161 | #clock-cells = <0>; |
| 162 | clock-frequency = <32768>; |
| 163 | clock-output-names = "xin32k"; |
| 164 | }; |
| 165 | |
| 166 | act8846: act8846@5a { |
| 167 | compatible = "active-semi,act8846"; |
| 168 | reg = <0x5a>; |
| 169 | pinctrl-names = "default"; |
| 170 | pinctrl-0 = <&pmic_vsel>; |
| 171 | system-power-controller; |
| 172 | |
| 173 | vp1-supply = <&vcc_sys>; |
| 174 | vp2-supply = <&vcc_sys>; |
| 175 | vp3-supply = <&vcc_sys>; |
| 176 | vp4-supply = <&vcc_sys>; |
| 177 | inl1-supply = <&vcc_sys>; |
| 178 | inl2-supply = <&vcc_sys>; |
| 179 | inl3-supply = <&vcc_20>; |
| 180 | |
| 181 | regulators { |
| 182 | vcc_ddr: REG1 { |
| 183 | regulator-name = "vcc_ddr"; |
| 184 | regulator-always-on; |
| 185 | }; |
| 186 | |
| 187 | vcc_io: REG2 { |
| 188 | regulator-name = "vcc_io"; |
| 189 | regulator-min-microvolt = <3300000>; |
| 190 | regulator-max-microvolt = <3300000>; |
| 191 | regulator-always-on; |
| 192 | }; |
| 193 | |
| 194 | vdd_log: REG3 { |
| 195 | regulator-name = "vdd_log"; |
| 196 | regulator-min-microvolt = <1100000>; |
| 197 | regulator-max-microvolt = <1100000>; |
| 198 | regulator-always-on; |
| 199 | }; |
| 200 | |
| 201 | vcc_20: REG4 { |
| 202 | regulator-name = "vcc_20"; |
| 203 | regulator-min-microvolt = <2000000>; |
| 204 | regulator-max-microvolt = <2000000>; |
| 205 | regulator-always-on; |
| 206 | }; |
| 207 | |
| 208 | vccio_sd: REG5 { |
| 209 | regulator-name = "vccio_sd"; |
| 210 | regulator-min-microvolt = <3300000>; |
| 211 | regulator-max-microvolt = <3300000>; |
| 212 | regulator-always-on; |
| 213 | }; |
| 214 | |
| 215 | vdd10_lcd: REG6 { |
| 216 | regulator-name = "vdd10_lcd"; |
| 217 | regulator-min-microvolt = <1000000>; |
| 218 | regulator-max-microvolt = <1000000>; |
| 219 | regulator-always-on; |
| 220 | }; |
| 221 | |
| 222 | vcca_18: REG7 { |
| 223 | regulator-name = "vcca_18"; |
| 224 | regulator-min-microvolt = <1800000>; |
| 225 | regulator-max-microvolt = <1800000>; |
| 226 | }; |
| 227 | |
| 228 | vcca_33: REG8 { |
| 229 | regulator-name = "vcca_33"; |
| 230 | regulator-min-microvolt = <3300000>; |
| 231 | regulator-max-microvolt = <3300000>; |
| 232 | }; |
| 233 | |
| 234 | vcc_lan: REG9 { |
| 235 | regulator-name = "vcc_lan"; |
| 236 | regulator-min-microvolt = <3300000>; |
| 237 | regulator-max-microvolt = <3300000>; |
| 238 | }; |
| 239 | |
| 240 | vdd_10: REG10 { |
| 241 | regulator-name = "vdd_10"; |
| 242 | regulator-min-microvolt = <1000000>; |
| 243 | regulator-max-microvolt = <1000000>; |
| 244 | regulator-always-on; |
| 245 | }; |
| 246 | |
| 247 | vcc_18: REG11 { |
| 248 | regulator-name = "vcc_18"; |
| 249 | regulator-min-microvolt = <1800000>; |
| 250 | regulator-max-microvolt = <1800000>; |
| 251 | regulator-always-on; |
| 252 | }; |
| 253 | |
| 254 | vcc18_lcd: REG12 { |
| 255 | regulator-name = "vcc18_lcd"; |
| 256 | regulator-min-microvolt = <1800000>; |
| 257 | regulator-max-microvolt = <1800000>; |
| 258 | regulator-always-on; |
| 259 | }; |
| 260 | }; |
| 261 | }; |
| 262 | }; |
| 263 | |
| 264 | &i2c1 { |
| 265 | status = "okay"; |
| 266 | }; |
| 267 | |
| 268 | &i2c2 { |
| 269 | status = "okay"; |
| 270 | }; |
| 271 | |
| 272 | &i2c4 { |
| 273 | status = "okay"; |
| 274 | }; |
| 275 | |
| 276 | &i2c5 { |
| 277 | status = "okay"; |
| 278 | }; |
| 279 | |
| 280 | &pinctrl { |
| 281 | pcfg_output_high: pcfg-output-high { |
| 282 | output-high; |
| 283 | }; |
| 284 | |
| 285 | pcfg_output_low: pcfg-output-low { |
| 286 | output-low; |
| 287 | }; |
| 288 | |
| 289 | pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma { |
| 290 | bias-pull-up; |
| 291 | drive-strength = <12>; |
| 292 | }; |
| 293 | |
| 294 | act8846 { |
| 295 | pmic_int: pmic-int { |
| 296 | rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>; |
| 297 | }; |
| 298 | |
| 299 | pmic_sleep: pmic-sleep { |
| 300 | rockchip,pins = <0 0 RK_FUNC_GPIO &pcfg_output_low>; |
| 301 | }; |
| 302 | |
| 303 | pmic_vsel: pmic-vsel { |
| 304 | rockchip,pins = <7 1 RK_FUNC_GPIO &pcfg_output_low>; |
| 305 | }; |
| 306 | }; |
| 307 | |
| 308 | gmac { |
| 309 | phy_int: phy-int { |
| 310 | rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>; |
| 311 | }; |
| 312 | |
| 313 | phy_pmeb: phy-pmeb { |
| 314 | rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>; |
| 315 | }; |
| 316 | |
| 317 | phy_rst: phy-rst { |
| 318 | rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>; |
| 319 | }; |
| 320 | }; |
| 321 | |
| 322 | leds { |
| 323 | led_ctl: led-ctl { |
| 324 | rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_none>; |
| 325 | }; |
| 326 | }; |
| 327 | |
| 328 | sdmmc { |
| 329 | /* |
| 330 | * Default drive strength isn't enough to achieve even |
| 331 | * high-speed mode on firefly board so bump up to 12ma. |
| 332 | */ |
| 333 | sdmmc_bus4: sdmmc-bus4 { |
| 334 | rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_12ma>, |
| 335 | <6 17 RK_FUNC_1 &pcfg_pull_up_drv_12ma>, |
| 336 | <6 18 RK_FUNC_1 &pcfg_pull_up_drv_12ma>, |
| 337 | <6 19 RK_FUNC_1 &pcfg_pull_up_drv_12ma>; |
| 338 | }; |
| 339 | |
| 340 | sdmmc_clk: sdmmc-clk { |
| 341 | rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_12ma>; |
| 342 | }; |
| 343 | |
| 344 | sdmmc_cmd: sdmmc-cmd { |
| 345 | rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_12ma>; |
| 346 | }; |
| 347 | |
| 348 | sdmmc_pwr: sdmmc-pwr { |
| 349 | rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>; |
| 350 | }; |
| 351 | }; |
| 352 | |
| 353 | usb_host { |
| 354 | host_vbus_drv: host-vbus-drv { |
| 355 | rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>; |
| 356 | }; |
| 357 | }; |
| 358 | }; |
| 359 | |
| 360 | &saradc { |
| 361 | vref-supply = <&vcc_18>; |
| 362 | status = "okay"; |
| 363 | }; |
| 364 | |
| 365 | &sdmmc { |
| 366 | bus-width = <4>; |
| 367 | cap-mmc-highspeed; |
| 368 | cap-sd-highspeed; |
| 369 | card-detect-delay = <200>; |
| 370 | disable-wp; |
| 371 | num-slots = <1>; |
| 372 | pinctrl-names = "default"; |
| 373 | pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>; |
| 374 | vmmc-supply = <&vcc_sd>; |
| 375 | vqmmc-supply = <&vccio_sd>; |
| 376 | status = "okay"; |
| 377 | }; |
| 378 | |
| 379 | &tsadc { |
| 380 | rockchip,hw-tshut-mode = <0>; |
| 381 | rockchip,hw-tshut-polarity = <0>; |
| 382 | status = "okay"; |
| 383 | }; |
| 384 | |
| 385 | &uart2 { |
| 386 | status = "okay"; |
| 387 | }; |
| 388 | |
| 389 | &uart3 { |
| 390 | status = "okay"; |
| 391 | }; |
| 392 | |
| 393 | &usbphy { |
| 394 | status = "okay"; |
| 395 | }; |
| 396 | |
| 397 | &usb_host1 { |
| 398 | vbus-supply = <&vcc_host>; |
| 399 | status = "okay"; |
| 400 | }; |
| 401 | |
| 402 | &vopb { |
| 403 | status = "okay"; |
| 404 | }; |
| 405 | |
| 406 | &vopb_mmu { |
| 407 | status = "okay"; |
| 408 | }; |
| 409 | |
| 410 | &vopl { |
| 411 | status = "okay"; |
| 412 | }; |
| 413 | |
| 414 | &vopl_mmu { |
| 415 | status = "okay"; |
| 416 | }; |
| 417 | |
| 418 | &wdt { |
| 419 | status = "okay"; |
| 420 | }; |