Chen-Yu Tsai | bab9729 | 2020-04-27 14:52:53 +0800 | [diff] [blame] | 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_gpio>; |
| 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 { |
| 90 | label = "firefly:blue:power"; |
| 91 | linux,default-trigger = "heartbeat"; |
| 92 | gpios = <&rk805 1 GPIO_ACTIVE_LOW>; |
| 93 | default-state = "on"; |
| 94 | mode = <0x23>; |
| 95 | }; |
| 96 | |
| 97 | user { |
| 98 | label = "firefly:yellow:user"; |
| 99 | linux,default-trigger = "mmc1"; |
| 100 | gpios = <&rk805 0 GPIO_ACTIVE_LOW>; |
| 101 | default-state = "off"; |
| 102 | mode = <0x05>; |
| 103 | }; |
| 104 | }; |
| 105 | }; |
| 106 | |
| 107 | &cpu0 { |
| 108 | cpu-supply = <&vdd_arm>; |
| 109 | }; |
| 110 | |
| 111 | &cpu1 { |
| 112 | cpu-supply = <&vdd_arm>; |
| 113 | }; |
| 114 | |
| 115 | &cpu2 { |
| 116 | cpu-supply = <&vdd_arm>; |
| 117 | }; |
| 118 | |
| 119 | &cpu3 { |
| 120 | cpu-supply = <&vdd_arm>; |
| 121 | }; |
| 122 | |
| 123 | &emmc { |
| 124 | bus-width = <8>; |
| 125 | cap-mmc-highspeed; |
| 126 | max-frequency = <150000000>; |
| 127 | mmc-ddr-1_8v; |
| 128 | mmc-hs200-1_8v; |
| 129 | non-removable; |
| 130 | pinctrl-names = "default"; |
| 131 | pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; |
| 132 | vmmc-supply = <&vcc_io>; |
| 133 | vqmmc-supply = <&vcc18_emmc>; |
| 134 | status = "okay"; |
| 135 | }; |
| 136 | |
| 137 | &gmac2io { |
| 138 | assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; |
| 139 | assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>; |
| 140 | clock_in_out = "input"; |
| 141 | phy-supply = <&vcc_phy>; |
| 142 | phy-mode = "rgmii"; |
| 143 | pinctrl-names = "default"; |
| 144 | pinctrl-0 = <&rgmiim1_pins>; |
| 145 | snps,aal; |
| 146 | snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; |
| 147 | snps,reset-active-low; |
| 148 | snps,reset-delays-us = <0 10000 50000>; |
| 149 | snps,rxpbl = <0x4>; |
| 150 | snps,txpbl = <0x4>; |
| 151 | tx_delay = <0x24>; |
| 152 | rx_delay = <0x18>; |
| 153 | status = "okay"; |
| 154 | }; |
| 155 | |
| 156 | &hdmi { |
| 157 | status = "okay"; |
| 158 | }; |
| 159 | |
| 160 | &hdmiphy { |
| 161 | status = "okay"; |
| 162 | }; |
| 163 | |
| 164 | &i2c1 { |
| 165 | status = "okay"; |
| 166 | |
| 167 | rk805: pmic@18 { |
| 168 | compatible = "rockchip,rk805"; |
| 169 | reg = <0x18>; |
| 170 | interrupt-parent = <&gpio1>; |
| 171 | interrupts = <24 IRQ_TYPE_LEVEL_LOW>; |
| 172 | #clock-cells = <1>; |
| 173 | clock-output-names = "xin32k", "rk805-clkout2"; |
| 174 | gpio-controller; |
| 175 | #gpio-cells = <2>; |
| 176 | pinctrl-names = "default"; |
| 177 | pinctrl-0 = <&pmic_int_l>; |
| 178 | rockchip,system-power-controller; |
| 179 | wakeup-source; |
| 180 | |
| 181 | vcc1-supply = <&vcc_sys>; |
| 182 | vcc2-supply = <&vcc_sys>; |
| 183 | vcc3-supply = <&vcc_sys>; |
| 184 | vcc4-supply = <&vcc_sys>; |
| 185 | vcc5-supply = <&vcc_io>; |
| 186 | vcc6-supply = <&vcc_io>; |
| 187 | |
| 188 | regulators { |
| 189 | vdd_logic: DCDC_REG1 { |
| 190 | regulator-name = "vdd_logic"; |
| 191 | regulator-min-microvolt = <712500>; |
| 192 | regulator-max-microvolt = <1450000>; |
| 193 | regulator-always-on; |
| 194 | regulator-boot-on; |
| 195 | regulator-state-mem { |
| 196 | regulator-on-in-suspend; |
| 197 | regulator-suspend-microvolt = <1000000>; |
| 198 | }; |
| 199 | }; |
| 200 | |
| 201 | vdd_arm: DCDC_REG2 { |
| 202 | regulator-name = "vdd_arm"; |
| 203 | regulator-min-microvolt = <712500>; |
| 204 | regulator-max-microvolt = <1450000>; |
| 205 | regulator-always-on; |
| 206 | regulator-boot-on; |
| 207 | regulator-state-mem { |
| 208 | regulator-on-in-suspend; |
| 209 | regulator-suspend-microvolt = <950000>; |
| 210 | }; |
| 211 | }; |
| 212 | |
| 213 | vcc_ddr: DCDC_REG3 { |
| 214 | regulator-name = "vcc_ddr"; |
| 215 | regulator-always-on; |
| 216 | regulator-boot-on; |
| 217 | regulator-state-mem { |
| 218 | regulator-on-in-suspend; |
| 219 | }; |
| 220 | }; |
| 221 | |
| 222 | vcc_io: DCDC_REG4 { |
| 223 | regulator-name = "vcc_io"; |
| 224 | regulator-min-microvolt = <3300000>; |
| 225 | regulator-max-microvolt = <3300000>; |
| 226 | regulator-always-on; |
| 227 | regulator-boot-on; |
| 228 | regulator-state-mem { |
| 229 | regulator-on-in-suspend; |
| 230 | regulator-suspend-microvolt = <3300000>; |
| 231 | }; |
| 232 | }; |
| 233 | |
| 234 | vcc_18: LDO_REG1 { |
| 235 | regulator-name = "vcc_18"; |
| 236 | regulator-min-microvolt = <1800000>; |
| 237 | regulator-max-microvolt = <1800000>; |
| 238 | regulator-always-on; |
| 239 | regulator-boot-on; |
| 240 | regulator-state-mem { |
| 241 | regulator-on-in-suspend; |
| 242 | regulator-suspend-microvolt = <1800000>; |
| 243 | }; |
| 244 | }; |
| 245 | |
| 246 | vcc18_emmc: LDO_REG2 { |
| 247 | regulator-name = "vcc18_emmc"; |
| 248 | regulator-min-microvolt = <1800000>; |
| 249 | regulator-max-microvolt = <1800000>; |
| 250 | regulator-always-on; |
| 251 | regulator-boot-on; |
| 252 | regulator-state-mem { |
| 253 | regulator-on-in-suspend; |
| 254 | regulator-suspend-microvolt = <1800000>; |
| 255 | }; |
| 256 | }; |
| 257 | |
| 258 | vdd_10: LDO_REG3 { |
| 259 | regulator-name = "vdd_10"; |
| 260 | regulator-min-microvolt = <1000000>; |
| 261 | regulator-max-microvolt = <1000000>; |
| 262 | regulator-always-on; |
| 263 | regulator-boot-on; |
| 264 | regulator-state-mem { |
| 265 | regulator-on-in-suspend; |
| 266 | regulator-suspend-microvolt = <1000000>; |
| 267 | }; |
| 268 | }; |
| 269 | }; |
| 270 | }; |
| 271 | }; |
| 272 | |
| 273 | &io_domains { |
| 274 | status = "okay"; |
| 275 | |
| 276 | vccio1-supply = <&vcc_io>; |
| 277 | vccio2-supply = <&vcc18_emmc>; |
| 278 | vccio3-supply = <&vcc_sdio>; |
| 279 | vccio4-supply = <&vcc_18>; |
| 280 | vccio5-supply = <&vcc_io>; |
| 281 | vccio6-supply = <&vcc_io>; |
| 282 | pmuio-supply = <&vcc_io>; |
| 283 | }; |
| 284 | |
| 285 | &pinctrl { |
| 286 | pmic { |
| 287 | pmic_int_l: pmic-int-l { |
| 288 | rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>; |
| 289 | }; |
| 290 | }; |
| 291 | |
| 292 | usb2 { |
| 293 | usb20_host_drv: usb20-host-drv { |
| 294 | rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; |
| 295 | }; |
| 296 | }; |
| 297 | }; |
| 298 | |
| 299 | &sdmmc { |
| 300 | bus-width = <4>; |
| 301 | cap-mmc-highspeed; |
| 302 | cap-sd-highspeed; |
| 303 | disable-wp; |
| 304 | max-frequency = <150000000>; |
| 305 | pinctrl-names = "default"; |
| 306 | pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>; |
| 307 | sd-uhs-sdr12; |
| 308 | sd-uhs-sdr25; |
| 309 | sd-uhs-sdr50; |
| 310 | sd-uhs-sdr104; |
| 311 | vmmc-supply = <&vcc_sd>; |
| 312 | vqmmc-supply = <&vcc_sdio>; |
| 313 | status = "okay"; |
| 314 | }; |
| 315 | |
| 316 | &tsadc { |
| 317 | status = "okay"; |
| 318 | }; |
| 319 | |
| 320 | &u2phy { |
| 321 | status = "okay"; |
| 322 | }; |
| 323 | |
| 324 | &u2phy_host { |
| 325 | status = "okay"; |
| 326 | }; |
| 327 | |
| 328 | &u2phy_otg { |
| 329 | status = "okay"; |
| 330 | }; |
| 331 | |
| 332 | &uart2 { |
| 333 | status = "okay"; |
| 334 | }; |
| 335 | |
| 336 | &usb20_otg { |
| 337 | status = "okay"; |
| 338 | }; |
| 339 | |
| 340 | &usb_host0_ehci { |
| 341 | status = "okay"; |
| 342 | }; |
| 343 | |
| 344 | &usb_host0_ohci { |
| 345 | status = "okay"; |
| 346 | }; |
| 347 | |
| 348 | &vop { |
| 349 | status = "okay"; |
| 350 | }; |
| 351 | |
| 352 | &vop_mmu { |
| 353 | status = "okay"; |
| 354 | }; |