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