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