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