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