1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2017 T-Chip Intelligent Technology Co., Ltd 4 */ 5 6/dts-v1/; 7 8#include "rk3328.dtsi" 9 10/ { 11 aliases { 12 ethernet0 = &gmac2io; 13 mmc0 = &sdmmc; 14 mmc1 = &emmc; 15 }; 16 17 chosen { 18 stdout-path = "serial2:1500000n8"; 19 }; 20 21 gmac_clkin: external-gmac-clock { 22 compatible = "fixed-clock"; 23 clock-frequency = <125000000>; 24 clock-output-names = "gmac_clkin"; 25 #clock-cells = <0>; 26 }; 27 28 dc_12v: regulator-dc-12v { 29 compatible = "regulator-fixed"; 30 regulator-name = "dc_12v"; 31 regulator-always-on; 32 regulator-boot-on; 33 regulator-min-microvolt = <12000000>; 34 regulator-max-microvolt = <12000000>; 35 }; 36 37 vcc_sd: regulator-sdmmc { 38 compatible = "regulator-fixed"; 39 gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; 40 pinctrl-names = "default"; 41 pinctrl-0 = <&sdmmc0m1_pin>; 42 regulator-boot-on; 43 regulator-name = "vcc_sd"; 44 regulator-min-microvolt = <3300000>; 45 regulator-max-microvolt = <3300000>; 46 vin-supply = <&vcc_io>; 47 }; 48 49 vcc_sdio: regulator-sdmmcio { 50 compatible = "regulator-gpio"; 51 states = <1800000 0x1>, <3300000 0x0>; 52 regulator-name = "vcc_sdio"; 53 regulator-type = "voltage"; 54 regulator-min-microvolt = <1800000>; 55 regulator-max-microvolt = <3300000>; 56 regulator-always-on; 57 vin-supply = <&vcc_sys>; 58 }; 59 60 vcc_host1_5v: vcc_otg_5v: regulator-vcc-host1-5v { 61 compatible = "regulator-fixed"; 62 enable-active-high; 63 pinctrl-names = "default"; 64 pinctrl-0 = <&usb20_host_drv>; 65 regulator-name = "vcc_host1_5v"; 66 regulator-always-on; 67 vin-supply = <&vcc_sys>; 68 }; 69 70 vcc_sys: regulator-vcc-sys { 71 compatible = "regulator-fixed"; 72 regulator-name = "vcc_sys"; 73 regulator-always-on; 74 regulator-boot-on; 75 regulator-min-microvolt = <5000000>; 76 regulator-max-microvolt = <5000000>; 77 vin-supply = <&dc_12v>; 78 }; 79 80 vcc_phy: regulator-vcc-phy { 81 compatible = "regulator-fixed"; 82 regulator-name = "vcc_phy"; 83 regulator-always-on; 84 regulator-boot-on; 85 }; 86 87 ir-receiver { 88 compatible = "gpio-ir-receiver"; 89 gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; 90 pinctrl-0 = <&ir_int>; 91 pinctrl-names = "default"; 92 }; 93 94 leds { 95 compatible = "gpio-leds"; 96 97 power_led: led-0 { 98 label = "firefly:blue:power"; 99 linux,default-trigger = "heartbeat"; 100 gpios = <&rk805 1 GPIO_ACTIVE_LOW>; 101 default-state = "on"; 102 }; 103 104 user_led: led-1 { 105 label = "firefly:yellow:user"; 106 linux,default-trigger = "mmc1"; 107 gpios = <&rk805 0 GPIO_ACTIVE_LOW>; 108 default-state = "off"; 109 }; 110 }; 111}; 112 113&analog_sound { 114 status = "okay"; 115}; 116 117&codec { 118 status = "okay"; 119}; 120 121&cpu0 { 122 cpu-supply = <&vdd_arm>; 123}; 124 125&cpu1 { 126 cpu-supply = <&vdd_arm>; 127}; 128 129&cpu2 { 130 cpu-supply = <&vdd_arm>; 131}; 132 133&cpu3 { 134 cpu-supply = <&vdd_arm>; 135}; 136 137&emmc { 138 bus-width = <8>; 139 cap-mmc-highspeed; 140 max-frequency = <150000000>; 141 mmc-ddr-1_8v; 142 mmc-hs200-1_8v; 143 non-removable; 144 pinctrl-names = "default"; 145 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; 146 vmmc-supply = <&vcc_io>; 147 vqmmc-supply = <&vcc18_emmc>; 148 status = "okay"; 149}; 150 151&gmac2io { 152 assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; 153 assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>; 154 clock_in_out = "input"; 155 phy-supply = <&vcc_phy>; 156 phy-mode = "rgmii"; 157 pinctrl-names = "default"; 158 pinctrl-0 = <&rgmiim1_pins>; 159 snps,aal; 160 snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; 161 snps,reset-active-low; 162 snps,reset-delays-us = <0 10000 50000>; 163 snps,rxpbl = <0x4>; 164 snps,txpbl = <0x4>; 165 tx_delay = <0x24>; 166 rx_delay = <0x18>; 167 status = "okay"; 168}; 169 170&gpu { 171 mali-supply = <&vdd_logic>; 172}; 173 174&hdmi { 175 status = "okay"; 176}; 177 178&hdmiphy { 179 status = "okay"; 180}; 181 182&hdmi_sound { 183 status = "okay"; 184}; 185 186&i2c1 { 187 status = "okay"; 188 189 rk805: pmic@18 { 190 compatible = "rockchip,rk805"; 191 reg = <0x18>; 192 #clock-cells = <1>; 193 clock-output-names = "xin32k", "rk805-clkout2"; 194 gpio-controller; 195 #gpio-cells = <2>; 196 pinctrl-names = "default"; 197 pinctrl-0 = <&pmic_int_l>; 198 system-power-controller; 199 wakeup-source; 200 201 vcc1-supply = <&vcc_sys>; 202 vcc2-supply = <&vcc_sys>; 203 vcc3-supply = <&vcc_sys>; 204 vcc4-supply = <&vcc_sys>; 205 vcc5-supply = <&vcc_io>; 206 vcc6-supply = <&vcc_io>; 207 208 regulators { 209 vdd_logic: DCDC_REG1 { 210 regulator-name = "vdd_logic"; 211 regulator-min-microvolt = <712500>; 212 regulator-max-microvolt = <1450000>; 213 regulator-always-on; 214 regulator-boot-on; 215 regulator-state-mem { 216 regulator-on-in-suspend; 217 regulator-suspend-microvolt = <1000000>; 218 }; 219 }; 220 221 vdd_arm: DCDC_REG2 { 222 regulator-name = "vdd_arm"; 223 regulator-min-microvolt = <712500>; 224 regulator-max-microvolt = <1450000>; 225 regulator-always-on; 226 regulator-boot-on; 227 regulator-state-mem { 228 regulator-on-in-suspend; 229 regulator-suspend-microvolt = <950000>; 230 }; 231 }; 232 233 vcc_ddr: DCDC_REG3 { 234 regulator-name = "vcc_ddr"; 235 regulator-always-on; 236 regulator-boot-on; 237 regulator-state-mem { 238 regulator-on-in-suspend; 239 }; 240 }; 241 242 vcc_io: DCDC_REG4 { 243 regulator-name = "vcc_io"; 244 regulator-min-microvolt = <3300000>; 245 regulator-max-microvolt = <3300000>; 246 regulator-always-on; 247 regulator-boot-on; 248 regulator-state-mem { 249 regulator-on-in-suspend; 250 regulator-suspend-microvolt = <3300000>; 251 }; 252 }; 253 254 vcc_18: LDO_REG1 { 255 regulator-name = "vcc_18"; 256 regulator-min-microvolt = <1800000>; 257 regulator-max-microvolt = <1800000>; 258 regulator-always-on; 259 regulator-boot-on; 260 regulator-state-mem { 261 regulator-on-in-suspend; 262 regulator-suspend-microvolt = <1800000>; 263 }; 264 }; 265 266 vcc18_emmc: LDO_REG2 { 267 regulator-name = "vcc18_emmc"; 268 regulator-min-microvolt = <1800000>; 269 regulator-max-microvolt = <1800000>; 270 regulator-always-on; 271 regulator-boot-on; 272 regulator-state-mem { 273 regulator-on-in-suspend; 274 regulator-suspend-microvolt = <1800000>; 275 }; 276 }; 277 278 vdd_10: LDO_REG3 { 279 regulator-name = "vdd_10"; 280 regulator-min-microvolt = <1000000>; 281 regulator-max-microvolt = <1000000>; 282 regulator-always-on; 283 regulator-boot-on; 284 regulator-state-mem { 285 regulator-on-in-suspend; 286 regulator-suspend-microvolt = <1000000>; 287 }; 288 }; 289 }; 290 }; 291}; 292 293&i2s0 { 294 status = "okay"; 295}; 296 297&i2s1 { 298 status = "okay"; 299}; 300 301&io_domains { 302 status = "okay"; 303 304 vccio1-supply = <&vcc_io>; 305 vccio2-supply = <&vcc18_emmc>; 306 vccio3-supply = <&vcc_sdio>; 307 vccio4-supply = <&vcc_18>; 308 vccio5-supply = <&vcc_io>; 309 vccio6-supply = <&vcc_io>; 310 pmuio-supply = <&vcc_io>; 311}; 312 313&pinctrl { 314 ir { 315 ir_int: ir-int { 316 rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 317 }; 318 }; 319 320 pmic { 321 pmic_int_l: pmic-int-l { 322 rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>; 323 }; 324 }; 325 326 usb2 { 327 usb20_host_drv: usb20-host-drv { 328 rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; 329 }; 330 }; 331}; 332 333&sdmmc { 334 bus-width = <4>; 335 cap-mmc-highspeed; 336 cap-sd-highspeed; 337 disable-wp; 338 max-frequency = <150000000>; 339 pinctrl-names = "default"; 340 pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>; 341 sd-uhs-sdr12; 342 sd-uhs-sdr25; 343 sd-uhs-sdr50; 344 sd-uhs-sdr104; 345 vmmc-supply = <&vcc_sd>; 346 vqmmc-supply = <&vcc_sdio>; 347 status = "okay"; 348}; 349 350&tsadc { 351 status = "okay"; 352}; 353 354&u2phy { 355 status = "okay"; 356}; 357 358&u2phy_host { 359 status = "okay"; 360}; 361 362&u2phy_otg { 363 status = "okay"; 364}; 365 366&uart2 { 367 status = "okay"; 368}; 369 370&usb20_otg { 371 dr_mode = "host"; 372 status = "okay"; 373}; 374 375&usbdrd3 { 376 dr_mode = "host"; 377 status = "okay"; 378}; 379 380&usb_host0_ehci { 381 status = "okay"; 382}; 383 384&usb_host0_ohci { 385 status = "okay"; 386}; 387 388&vop { 389 status = "okay"; 390}; 391 392&vop_mmu { 393 status = "okay"; 394}; 395