Tom Rini | 4549e78 | 2018-05-06 18:27:01 -0400 | [diff] [blame^] | 1 | // SPDX-License-Identifier: GPL-2.0+ OR X11 |
Xu Ziyuan | 744368d | 2016-07-05 18:06:30 +0800 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2016 Rockchip Electronics Co., Ltd |
Xu Ziyuan | 744368d | 2016-07-05 18:06:30 +0800 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include "rk3288.dtsi" |
| 7 | |
| 8 | / { |
| 9 | memory { |
| 10 | reg = <0 0x80000000>; |
| 11 | }; |
| 12 | |
Jacob Chen | ee4bc34 | 2017-02-23 14:20:16 +0800 | [diff] [blame] | 13 | ext_gmac: external-gmac-clock { |
| 14 | compatible = "fixed-clock"; |
| 15 | #clock-cells = <0>; |
| 16 | clock-frequency = <125000000>; |
| 17 | clock-output-names = "ext_gmac"; |
| 18 | }; |
| 19 | |
Xu Ziyuan | 744368d | 2016-07-05 18:06:30 +0800 | [diff] [blame] | 20 | keys: gpio-keys { |
| 21 | compatible = "gpio-keys"; |
| 22 | #address-cells = <1>; |
| 23 | #size-cells = <0>; |
| 24 | |
| 25 | button@0 { |
| 26 | gpio-key,wakeup = <1>; |
| 27 | gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; |
| 28 | label = "GPIO Power"; |
| 29 | linux,code = <116>; |
| 30 | pinctrl-names = "default"; |
| 31 | pinctrl-0 = <&pwr_key>; |
| 32 | }; |
| 33 | }; |
| 34 | |
| 35 | vcc_sys: vsys-regulator { |
| 36 | compatible = "regulator-fixed"; |
| 37 | regulator-name = "vcc_sys"; |
| 38 | regulator-min-microvolt = <5000000>; |
| 39 | regulator-max-microvolt = <5000000>; |
| 40 | regulator-always-on; |
| 41 | regulator-boot-on; |
| 42 | }; |
| 43 | |
| 44 | vcc_flash: flash-regulator { |
| 45 | compatible = "regulator-fixed"; |
| 46 | regulator-name = "vcc_flash"; |
| 47 | regulator-min-microvolt = <1800000>; |
| 48 | regulator-max-microvolt = <1800000>; |
| 49 | vin-supply = <&vcc_io>; |
| 50 | }; |
| 51 | |
| 52 | vcc_5v: usb-regulator { |
| 53 | compatible = "regulator-fixed"; |
| 54 | regulator-name = "vcc_5v"; |
| 55 | regulator-min-microvolt = <5000000>; |
| 56 | regulator-max-microvolt = <5000000>; |
| 57 | regulator-always-on; |
| 58 | regulator-boot-on; |
| 59 | vin-supply = <&vcc_sys>; |
| 60 | }; |
| 61 | |
| 62 | vcc_host_5v: usb-host-regulator { |
| 63 | compatible = "regulator-fixed"; |
| 64 | enable-active-high; |
| 65 | gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>; |
| 66 | pinctrl-names = "default"; |
| 67 | pinctrl-0 = <&host_vbus_drv>; |
| 68 | regulator-name = "vcc_host_5v"; |
| 69 | regulator-min-microvolt = <5000000>; |
| 70 | regulator-max-microvolt = <5000000>; |
| 71 | regulator-always-on; |
| 72 | vin-supply = <&vcc_5v>; |
| 73 | }; |
| 74 | |
| 75 | vcc_otg_5v: usb-otg-regulator { |
| 76 | compatible = "regulator-fixed"; |
| 77 | enable-active-high; |
| 78 | gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>; |
| 79 | pinctrl-names = "default"; |
| 80 | pinctrl-0 = <&otg_vbus_drv>; |
| 81 | regulator-name = "vcc_otg_5v"; |
| 82 | regulator-min-microvolt = <5000000>; |
| 83 | regulator-max-microvolt = <5000000>; |
| 84 | regulator-always-on; |
| 85 | vin-supply = <&vcc_5v>; |
| 86 | }; |
Eric Gao | 2085de5 | 2017-05-02 18:32:45 +0800 | [diff] [blame] | 87 | |
| 88 | backlight: backlight { |
| 89 | compatible = "pwm-backlight"; |
| 90 | power-supply = <&vcc_sys>; |
| 91 | enable-gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>; |
| 92 | brightness-levels = < |
| 93 | 0 1 2 3 4 5 6 7 |
| 94 | 8 9 10 11 12 13 14 15 |
| 95 | 16 17 18 19 20 21 22 23 |
| 96 | 24 25 26 27 28 29 30 31 |
| 97 | 32 33 34 35 36 37 38 39 |
| 98 | 40 41 42 43 44 45 46 47 |
| 99 | 48 49 50 51 52 53 54 55 |
| 100 | 56 57 58 59 60 61 62 63 |
| 101 | 64 65 66 67 68 69 70 71 |
| 102 | 72 73 74 75 76 77 78 79 |
| 103 | 80 81 82 83 84 85 86 87 |
| 104 | 88 89 90 91 92 93 94 95 |
| 105 | 96 97 98 99 100 101 102 103 |
| 106 | 104 105 106 107 108 109 110 111 |
| 107 | 112 113 114 115 116 117 118 119 |
| 108 | 120 121 122 123 124 125 126 127 |
| 109 | 128 129 130 131 132 133 134 135 |
| 110 | 136 137 138 139 140 141 142 143 |
| 111 | 144 145 146 147 148 149 150 151 |
| 112 | 152 153 154 155 156 157 158 159 |
| 113 | 160 161 162 163 164 165 166 167 |
| 114 | 168 169 170 171 172 173 174 175 |
| 115 | 176 177 178 179 180 181 182 183 |
| 116 | 184 185 186 187 188 189 190 191 |
| 117 | 192 193 194 195 196 197 198 199 |
| 118 | 200 201 202 203 204 205 206 207 |
| 119 | 208 209 210 211 212 213 214 215 |
| 120 | 216 217 218 219 220 221 222 223 |
| 121 | 224 225 226 227 228 229 230 231 |
| 122 | 232 233 234 235 236 237 238 239 |
| 123 | 240 241 242 243 244 245 246 247 |
| 124 | 248 249 250 251 252 253 254 255>; |
| 125 | default-brightness-level = <50>; |
| 126 | pwms = <&pwm0 0 25000 0>; |
| 127 | pinctrl-names = "default"; |
| 128 | pinctrl-0 = <&pwm0_pin>; |
| 129 | pwm-delay-us = <10000>; |
| 130 | status = "disabled"; |
| 131 | }; |
| 132 | |
| 133 | panel: panel { |
| 134 | compatible = "simple-panel"; |
| 135 | power-supply = <&vcc_io>; |
| 136 | backlight = <&backlight>; |
| 137 | enable-gpios = <&gpio7 3 GPIO_ACTIVE_HIGH>; |
| 138 | status = "disabled"; |
| 139 | }; |
Xu Ziyuan | 744368d | 2016-07-05 18:06:30 +0800 | [diff] [blame] | 140 | }; |
| 141 | |
| 142 | &cpu0 { |
| 143 | cpu0-supply = <&vdd_cpu>; |
| 144 | }; |
| 145 | |
| 146 | &emmc { |
| 147 | broken-cd; |
| 148 | bus-width = <8>; |
| 149 | cap-mmc-highspeed; |
| 150 | disable-wp; |
| 151 | non-removable; |
| 152 | num-slots = <1>; |
| 153 | pinctrl-names = "default"; |
| 154 | pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>; |
| 155 | vmmc-supply = <&vcc_io>; |
| 156 | vqmmc-supply = <&vcc_flash>; |
| 157 | status = "okay"; |
| 158 | }; |
| 159 | |
Jacob Chen | ee4bc34 | 2017-02-23 14:20:16 +0800 | [diff] [blame] | 160 | &gmac { |
| 161 | phy-mode = "rgmii"; |
| 162 | clock_in_out = "input"; |
| 163 | snps,reset-gpio = <&gpio4 7 0>; |
| 164 | snps,reset-active-low; |
| 165 | snps,reset-delays-us = <0 10000 1000000>; |
| 166 | assigned-clocks = <&cru SCLK_MAC>; |
| 167 | assigned-clock-parents = <&ext_gmac>; |
| 168 | pinctrl-names = "default"; |
| 169 | pinctrl-0 = <&rgmii_pins>; |
| 170 | tx_delay = <0x30>; |
| 171 | rx_delay = <0x10>; |
| 172 | status = "okay"; |
| 173 | }; |
| 174 | |
Xu Ziyuan | 744368d | 2016-07-05 18:06:30 +0800 | [diff] [blame] | 175 | &hdmi { |
| 176 | ddc-i2c-bus = <&i2c5>; |
| 177 | status = "okay"; |
| 178 | }; |
| 179 | |
| 180 | &i2c0 { |
| 181 | clock-frequency = <400000>; |
| 182 | status = "okay"; |
| 183 | |
| 184 | vdd_cpu: syr827@40 { |
| 185 | compatible = "silergy,syr827"; |
| 186 | fcs,suspend-voltage-selector = <1>; |
| 187 | reg = <0x40>; |
| 188 | regulator-name = "vdd_cpu"; |
| 189 | regulator-min-microvolt = <850000>; |
| 190 | regulator-max-microvolt = <1350000>; |
| 191 | regulator-always-on; |
| 192 | regulator-boot-on; |
| 193 | vin-supply = <&vcc_sys>; |
| 194 | }; |
| 195 | |
| 196 | vdd_gpu: syr828@41 { |
| 197 | compatible = "silergy,syr828"; |
| 198 | fcs,suspend-voltage-selector = <1>; |
| 199 | reg = <0x41>; |
| 200 | regulator-name = "vdd_gpu"; |
| 201 | regulator-min-microvolt = <850000>; |
| 202 | regulator-max-microvolt = <1350000>; |
| 203 | regulator-always-on; |
| 204 | vin-supply = <&vcc_sys>; |
| 205 | }; |
| 206 | |
| 207 | hym8563: hym8563@51 { |
| 208 | compatible = "haoyu,hym8563"; |
| 209 | reg = <0x51>; |
| 210 | #clock-cells = <0>; |
| 211 | clock-frequency = <32768>; |
| 212 | clock-output-names = "xin32k"; |
| 213 | interrupt-parent = <&gpio7>; |
| 214 | interrupts = <4 IRQ_TYPE_EDGE_FALLING>; |
| 215 | pinctrl-names = "default"; |
| 216 | pinctrl-0 = <&rtc_int>; |
| 217 | }; |
| 218 | |
| 219 | act8846: act8846@5a { |
| 220 | compatible = "active-semi,act8846"; |
| 221 | reg = <0x5a>; |
| 222 | pinctrl-names = "default"; |
| 223 | pinctrl-0 = <&pwr_hold>; |
| 224 | system-power-controller; |
| 225 | |
| 226 | regulators { |
| 227 | vcc_ddr: REG1 { |
| 228 | regulator-name = "vcc_ddr"; |
| 229 | regulator-min-microvolt = <1200000>; |
| 230 | regulator-max-microvolt = <1200000>; |
| 231 | regulator-always-on; |
| 232 | }; |
| 233 | |
| 234 | vcc_io: REG2 { |
| 235 | regulator-name = "vcc_io"; |
| 236 | regulator-min-microvolt = <3300000>; |
| 237 | regulator-max-microvolt = <3300000>; |
| 238 | regulator-always-on; |
| 239 | }; |
| 240 | |
| 241 | vdd_log: REG3 { |
| 242 | regulator-name = "vdd_log"; |
| 243 | regulator-min-microvolt = <1100000>; |
| 244 | regulator-max-microvolt = <1100000>; |
| 245 | regulator-always-on; |
| 246 | }; |
| 247 | |
| 248 | vcc_20: REG4 { |
| 249 | regulator-name = "vcc_20"; |
| 250 | regulator-min-microvolt = <2000000>; |
| 251 | regulator-max-microvolt = <2000000>; |
| 252 | regulator-always-on; |
| 253 | }; |
| 254 | |
| 255 | vccio_sd: REG5 { |
| 256 | regulator-name = "vccio_sd"; |
| 257 | regulator-min-microvolt = <3300000>; |
| 258 | regulator-max-microvolt = <3300000>; |
| 259 | regulator-always-on; |
| 260 | }; |
| 261 | |
| 262 | vdd10_lcd: REG6 { |
| 263 | regulator-name = "vdd10_lcd"; |
| 264 | regulator-min-microvolt = <1000000>; |
| 265 | regulator-max-microvolt = <1000000>; |
| 266 | regulator-always-on; |
| 267 | }; |
| 268 | |
| 269 | vcca_codec: REG7 { |
| 270 | regulator-name = "vcca_codec"; |
| 271 | regulator-min-microvolt = <3300000>; |
| 272 | regulator-max-microvolt = <3300000>; |
| 273 | }; |
| 274 | |
| 275 | vcc_tp: REG8 { |
| 276 | regulator-name = "vcca_33"; |
| 277 | regulator-min-microvolt = <3300000>; |
| 278 | regulator-max-microvolt = <3300000>; |
| 279 | }; |
| 280 | |
| 281 | vccio_pmu: REG9 { |
| 282 | regulator-name = "vccio_pmu"; |
| 283 | regulator-min-microvolt = <3300000>; |
| 284 | regulator-max-microvolt = <3300000>; |
| 285 | }; |
| 286 | |
| 287 | vdd_10: REG10 { |
| 288 | regulator-name = "vdd_10"; |
| 289 | regulator-min-microvolt = <1000000>; |
| 290 | regulator-max-microvolt = <1000000>; |
| 291 | regulator-always-on; |
| 292 | }; |
| 293 | |
| 294 | vcc_18: REG11 { |
| 295 | regulator-name = "vcc_18"; |
| 296 | regulator-min-microvolt = <1800000>; |
| 297 | regulator-max-microvolt = <1800000>; |
| 298 | regulator-always-on; |
| 299 | }; |
| 300 | |
| 301 | vcc18_lcd: REG12 { |
| 302 | regulator-name = "vcc18_lcd"; |
| 303 | regulator-min-microvolt = <1800000>; |
| 304 | regulator-max-microvolt = <1800000>; |
| 305 | regulator-always-on; |
| 306 | }; |
| 307 | }; |
| 308 | }; |
| 309 | }; |
| 310 | |
| 311 | &i2c1 { |
| 312 | status = "okay"; |
| 313 | }; |
| 314 | |
| 315 | &i2c2 { |
| 316 | status = "okay"; |
| 317 | }; |
| 318 | |
| 319 | &i2c4 { |
| 320 | status = "okay"; |
| 321 | }; |
| 322 | |
| 323 | &i2c5 { |
| 324 | status = "okay"; |
| 325 | }; |
| 326 | |
| 327 | &pinctrl { |
| 328 | pcfg_output_high: pcfg-output-high { |
| 329 | output-high; |
| 330 | }; |
| 331 | |
| 332 | pcfg_output_low: pcfg-output-low { |
| 333 | output-low; |
| 334 | }; |
| 335 | |
| 336 | act8846 { |
| 337 | pwr_hold: pwr-hold { |
| 338 | rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_output_high>; |
| 339 | }; |
| 340 | }; |
| 341 | |
| 342 | hym8563 { |
| 343 | rtc_int: rtc-int { |
| 344 | rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>; |
| 345 | }; |
| 346 | }; |
| 347 | |
| 348 | keys { |
| 349 | pwr_key: pwr-key { |
| 350 | rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>; |
| 351 | }; |
| 352 | }; |
| 353 | |
| 354 | sdmmc { |
| 355 | sdmmc_pwr: sdmmc-pwr { |
| 356 | rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>; |
| 357 | }; |
| 358 | }; |
| 359 | |
| 360 | usb_host { |
| 361 | host_vbus_drv: host-vbus-drv { |
| 362 | rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>; |
| 363 | }; |
| 364 | }; |
| 365 | |
| 366 | usb_otg { |
| 367 | otg_vbus_drv: otg-vbus-drv { |
| 368 | rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>; |
| 369 | }; |
| 370 | }; |
| 371 | }; |
| 372 | |
Eric Gao | 2085de5 | 2017-05-02 18:32:45 +0800 | [diff] [blame] | 373 | &pwm0 { |
| 374 | status = "okay"; |
| 375 | }; |
| 376 | |
Xu Ziyuan | 744368d | 2016-07-05 18:06:30 +0800 | [diff] [blame] | 377 | &saradc { |
| 378 | vref-supply = <&vcc_18>; |
| 379 | status = "okay"; |
| 380 | }; |
| 381 | |
| 382 | &sdio0 { |
| 383 | broken-cd; |
| 384 | bus-width = <4>; |
| 385 | disable-wp; |
| 386 | non-removable; |
| 387 | num-slots = <1>; |
| 388 | pinctrl-names = "default"; |
| 389 | pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>; |
| 390 | vmmc-supply = <&vcc_18>; |
| 391 | status = "disabled"; |
| 392 | }; |
| 393 | |
| 394 | &sdmmc { |
| 395 | bus-width = <4>; |
| 396 | cap-mmc-highspeed; |
| 397 | cap-sd-highspeed; |
| 398 | card-detect-delay = <200>; |
| 399 | disable-wp; |
| 400 | num-slots = <1>; |
| 401 | pinctrl-names = "default"; |
| 402 | pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>; |
| 403 | vmmc-supply = <&vccio_sd>; |
| 404 | status = "okay"; |
| 405 | }; |
| 406 | |
| 407 | &spi0 { |
| 408 | pinctrl-names = "default"; |
| 409 | pinctrl-0 = <&spi0_clk>, <&spi0_cs0>, <&spi0_tx>, <&spi0_rx>, <&spi0_cs1>; |
| 410 | status = "okay"; |
| 411 | }; |
| 412 | |
| 413 | &uart0 { |
| 414 | pinctrl-names = "default"; |
| 415 | pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>; |
| 416 | status = "okay"; |
| 417 | }; |
| 418 | |
| 419 | &uart1 { |
| 420 | status = "okay"; |
| 421 | }; |
| 422 | |
| 423 | &uart2 { |
| 424 | status = "okay"; |
| 425 | }; |
| 426 | |
| 427 | &uart3 { |
| 428 | status = "okay"; |
| 429 | }; |
| 430 | |
| 431 | &usb_host1 { |
| 432 | status = "okay"; |
| 433 | }; |
| 434 | |
| 435 | &usb_otg { |
| 436 | status = "okay"; |
| 437 | }; |
| 438 | |
| 439 | &vopb { |
| 440 | status = "okay"; |
| 441 | }; |
| 442 | |
| 443 | &vopb_mmu { |
| 444 | status = "okay"; |
| 445 | }; |
| 446 | |
| 447 | &vopl { |
| 448 | status = "okay"; |
| 449 | }; |
| 450 | |
| 451 | &vopl_mmu { |
| 452 | status = "okay"; |
| 453 | }; |
| 454 | |
Eric Gao | 2085de5 | 2017-05-02 18:32:45 +0800 | [diff] [blame] | 455 | &mipi_dsi0 { |
| 456 | status = "disabled"; |
| 457 | rockchip,panel = <&panel>; |
| 458 | display-timings { |
| 459 | timing0 { |
| 460 | bits-per-pixel = <24>; |
| 461 | clock-frequency = <160000000>; |
| 462 | hfront-porch = <120>; |
| 463 | hsync-len = <20>; |
| 464 | hback-porch = <21>; |
| 465 | hactive = <1200>; |
| 466 | vfront-porch = <21>; |
| 467 | vsync-len = <3>; |
| 468 | vback-porch = <18>; |
| 469 | vactive = <1920>; |
| 470 | hsync-active = <0>; |
| 471 | vsync-active = <0>; |
| 472 | de-active = <1>; |
| 473 | pixelclk-active = <0>; |
| 474 | }; |
| 475 | }; |
| 476 | }; |
| 477 | |
Xu Ziyuan | 744368d | 2016-07-05 18:06:30 +0800 | [diff] [blame] | 478 | &wdt { |
| 479 | status = "okay"; |
| 480 | }; |