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