1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2017 PINE64 4 */ 5 6/dts-v1/; 7#include "rk3328.dtsi" 8 9/ { 10 model = "Pine64 Rock64"; 11 compatible = "pine64,rock64", "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 vcc_sd: sdmmc-regulator { 25 compatible = "regulator-fixed"; 26 gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; 27 pinctrl-names = "default"; 28 pinctrl-0 = <&sdmmc0m1_gpio>; 29 regulator-name = "vcc_sd"; 30 regulator-min-microvolt = <3300000>; 31 regulator-max-microvolt = <3300000>; 32 vin-supply = <&vcc_io>; 33 }; 34 35 vcc_host_5v: vcc-host-5v-regulator { 36 compatible = "regulator-fixed"; 37 enable-active-high; 38 gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; 39 pinctrl-names = "default"; 40 pinctrl-0 = <&usb30_host_drv>; 41 regulator-name = "vcc_host_5v"; 42 regulator-always-on; 43 regulator-boot-on; 44 vin-supply = <&vcc_sys>; 45 }; 46 47 vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator { 48 compatible = "regulator-fixed"; 49 enable-active-high; 50 gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; 51 pinctrl-names = "default"; 52 pinctrl-0 = <&usb20_host_drv>; 53 regulator-name = "vcc_host1_5v"; 54 regulator-always-on; 55 regulator-boot-on; 56 vin-supply = <&vcc_sys>; 57 }; 58 59 vcc_sys: vcc-sys { 60 compatible = "regulator-fixed"; 61 regulator-name = "vcc_sys"; 62 regulator-always-on; 63 regulator-boot-on; 64 regulator-min-microvolt = <5000000>; 65 regulator-max-microvolt = <5000000>; 66 }; 67 68 sound { 69 compatible = "audio-graph-card"; 70 label = "rockchip,rk3328"; 71 dais = <&spdif_p0>; 72 }; 73 74 spdif-dit { 75 compatible = "linux,spdif-dit"; 76 #sound-dai-cells = <0>; 77 78 port { 79 dit_p0_0: endpoint { 80 remote-endpoint = <&spdif_p0_0>; 81 }; 82 }; 83 }; 84}; 85 86&cpu0 { 87 cpu-supply = <&vdd_arm>; 88}; 89 90&cpu1 { 91 cpu-supply = <&vdd_arm>; 92}; 93 94&cpu2 { 95 cpu-supply = <&vdd_arm>; 96}; 97 98&cpu3 { 99 cpu-supply = <&vdd_arm>; 100}; 101 102&emmc { 103 bus-width = <8>; 104 cap-mmc-highspeed; 105 mmc-hs200-1_8v; 106 non-removable; 107 pinctrl-names = "default"; 108 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; 109 vmmc-supply = <&vcc_io>; 110 vqmmc-supply = <&vcc18_emmc>; 111 status = "okay"; 112}; 113 114&gmac2io { 115 assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; 116 assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>; 117 clock_in_out = "input"; 118 phy-supply = <&vcc_io>; 119 phy-mode = "rgmii"; 120 pinctrl-names = "default"; 121 pinctrl-0 = <&rgmiim1_pins>; 122 snps,force_thresh_dma_mode; 123 snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; 124 snps,reset-active-low; 125 snps,reset-delays-us = <0 10000 50000>; 126 tx_delay = <0x24>; 127 rx_delay = <0x18>; 128 status = "okay"; 129}; 130 131&hdmi { 132 status = "okay"; 133}; 134 135&hdmiphy { 136 status = "okay"; 137}; 138 139&i2c1 { 140 status = "okay"; 141 142 rk805: rk805@18 { 143 compatible = "rockchip,rk805"; 144 reg = <0x18>; 145 interrupt-parent = <&gpio2>; 146 interrupts = <6 IRQ_TYPE_LEVEL_LOW>; 147 #clock-cells = <1>; 148 clock-output-names = "xin32k", "rk805-clkout2"; 149 pinctrl-names = "default"; 150 pinctrl-0 = <&pmic_int_l>; 151 rockchip,system-power-controller; 152 wakeup-source; 153 154 vcc1-supply = <&vcc_sys>; 155 vcc2-supply = <&vcc_sys>; 156 vcc3-supply = <&vcc_sys>; 157 vcc4-supply = <&vcc_sys>; 158 vcc5-supply = <&vcc_io>; 159 vcc6-supply = <&vcc_sys>; 160 161 regulators { 162 vdd_logic: DCDC_REG1 { 163 regulator-name = "vdd_logic"; 164 regulator-min-microvolt = <712500>; 165 regulator-max-microvolt = <1450000>; 166 regulator-ramp-delay = <12500>; 167 regulator-always-on; 168 regulator-boot-on; 169 regulator-state-mem { 170 regulator-on-in-suspend; 171 regulator-suspend-microvolt = <1000000>; 172 }; 173 }; 174 175 vdd_arm: DCDC_REG2 { 176 regulator-name = "vdd_arm"; 177 regulator-min-microvolt = <712500>; 178 regulator-max-microvolt = <1450000>; 179 regulator-ramp-delay = <12500>; 180 regulator-always-on; 181 regulator-boot-on; 182 regulator-state-mem { 183 regulator-on-in-suspend; 184 regulator-suspend-microvolt = <950000>; 185 }; 186 }; 187 188 vcc_ddr: DCDC_REG3 { 189 regulator-name = "vcc_ddr"; 190 regulator-always-on; 191 regulator-boot-on; 192 regulator-state-mem { 193 regulator-on-in-suspend; 194 }; 195 }; 196 197 vcc_io: DCDC_REG4 { 198 regulator-name = "vcc_io"; 199 regulator-min-microvolt = <3300000>; 200 regulator-max-microvolt = <3300000>; 201 regulator-always-on; 202 regulator-boot-on; 203 regulator-state-mem { 204 regulator-on-in-suspend; 205 regulator-suspend-microvolt = <3300000>; 206 }; 207 }; 208 209 vcc_18: LDO_REG1 { 210 regulator-name = "vdd_18"; 211 regulator-min-microvolt = <1800000>; 212 regulator-max-microvolt = <1800000>; 213 regulator-always-on; 214 regulator-boot-on; 215 regulator-state-mem { 216 regulator-on-in-suspend; 217 regulator-suspend-microvolt = <1800000>; 218 }; 219 }; 220 221 vcc18_emmc: LDO_REG2 { 222 regulator-name = "vcc_18emmc"; 223 regulator-min-microvolt = <1800000>; 224 regulator-max-microvolt = <1800000>; 225 regulator-always-on; 226 regulator-boot-on; 227 regulator-state-mem { 228 regulator-on-in-suspend; 229 regulator-suspend-microvolt = <1800000>; 230 }; 231 }; 232 233 vdd_10: LDO_REG3 { 234 regulator-name = "vdd_10"; 235 regulator-min-microvolt = <1000000>; 236 regulator-max-microvolt = <1000000>; 237 regulator-always-on; 238 regulator-boot-on; 239 regulator-state-mem { 240 regulator-on-in-suspend; 241 regulator-suspend-microvolt = <1000000>; 242 }; 243 }; 244 }; 245 }; 246}; 247 248&io_domains { 249 status = "okay"; 250 251 vccio1-supply = <&vcc_io>; 252 vccio2-supply = <&vcc18_emmc>; 253 vccio3-supply = <&vcc_io>; 254 vccio4-supply = <&vcc_18>; 255 vccio5-supply = <&vcc_io>; 256 vccio6-supply = <&vcc_io>; 257 pmuio-supply = <&vcc_io>; 258}; 259 260&pinctrl { 261 pmic { 262 pmic_int_l: pmic-int-l { 263 rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; 264 }; 265 }; 266 267 usb2 { 268 usb20_host_drv: usb20-host-drv { 269 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 270 }; 271 }; 272 273 usb3 { 274 usb30_host_drv: usb30-host-drv { 275 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; 276 }; 277 }; 278}; 279 280&sdmmc { 281 bus-width = <4>; 282 cap-mmc-highspeed; 283 cap-sd-highspeed; 284 disable-wp; 285 max-frequency = <150000000>; 286 pinctrl-names = "default"; 287 pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>; 288 vmmc-supply = <&vcc_sd>; 289 status = "okay"; 290}; 291 292&spdif { 293 pinctrl-0 = <&spdifm0_tx>; 294 status = "okay"; 295 #sound-dai-cells = <0>; 296 297 spdif_p0: port { 298 spdif_p0_0: endpoint { 299 remote-endpoint = <&dit_p0_0>; 300 }; 301 }; 302}; 303 304&spi0 { 305 status = "okay"; 306 307 spiflash@0 { 308 compatible = "jedec,spi-nor"; 309 reg = <0>; 310 311 /* maximum speed for Rockchip SPI */ 312 spi-max-frequency = <50000000>; 313 }; 314}; 315 316&tsadc { 317 rockchip,hw-tshut-mode = <0>; 318 rockchip,hw-tshut-polarity = <0>; 319 status = "okay"; 320}; 321 322&uart2 { 323 status = "okay"; 324}; 325 326&u2phy { 327 status = "okay"; 328 329 u2phy_host: host-port { 330 status = "okay"; 331 }; 332 333 u2phy_otg: otg-port { 334 status = "okay"; 335 }; 336}; 337 338&usb20_otg { 339 dr_mode = "host"; 340 status = "okay"; 341}; 342 343&usb_host0_ehci { 344 status = "okay"; 345}; 346 347&usb_host0_ohci { 348 status = "okay"; 349}; 350 351&vop { 352 status = "okay"; 353}; 354 355&vop_mmu { 356 status = "okay"; 357}; 358