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 leds { 69 compatible = "gpio-leds"; 70 71 power { 72 gpios = <&rk805 1 GPIO_ACTIVE_LOW>; 73 linux,default-trigger = "mmc0"; 74 }; 75 76 standby { 77 gpios = <&rk805 0 GPIO_ACTIVE_LOW>; 78 linux,default-trigger = "heartbeat"; 79 }; 80 }; 81 82 sound { 83 compatible = "audio-graph-card"; 84 label = "rockchip,rk3328"; 85 dais = <&i2s1_p0 86 &spdif_p0>; 87 }; 88 89 spdif-dit { 90 compatible = "linux,spdif-dit"; 91 #sound-dai-cells = <0>; 92 93 port { 94 dit_p0_0: endpoint { 95 remote-endpoint = <&spdif_p0_0>; 96 }; 97 }; 98 }; 99}; 100 101&codec { 102 status = "okay"; 103 104 port@0 { 105 codec_p0_0: endpoint { 106 remote-endpoint = <&i2s1_p0_0>; 107 }; 108 }; 109}; 110 111&cpu0 { 112 cpu-supply = <&vdd_arm>; 113}; 114 115&cpu1 { 116 cpu-supply = <&vdd_arm>; 117}; 118 119&cpu2 { 120 cpu-supply = <&vdd_arm>; 121}; 122 123&cpu3 { 124 cpu-supply = <&vdd_arm>; 125}; 126 127&emmc { 128 bus-width = <8>; 129 cap-mmc-highspeed; 130 mmc-hs200-1_8v; 131 non-removable; 132 pinctrl-names = "default"; 133 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; 134 vmmc-supply = <&vcc_io>; 135 vqmmc-supply = <&vcc18_emmc>; 136 status = "okay"; 137}; 138 139&gmac2io { 140 assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; 141 assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>; 142 clock_in_out = "input"; 143 phy-supply = <&vcc_io>; 144 phy-mode = "rgmii"; 145 pinctrl-names = "default"; 146 pinctrl-0 = <&rgmiim1_pins>; 147 snps,force_thresh_dma_mode; 148 snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; 149 snps,reset-active-low; 150 snps,reset-delays-us = <0 10000 50000>; 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: rk805@18 { 168 compatible = "rockchip,rk805"; 169 reg = <0x18>; 170 interrupt-parent = <&gpio2>; 171 interrupts = <6 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_sys>; 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-ramp-delay = <12500>; 194 regulator-always-on; 195 regulator-boot-on; 196 regulator-state-mem { 197 regulator-on-in-suspend; 198 regulator-suspend-microvolt = <1000000>; 199 }; 200 }; 201 202 vdd_arm: DCDC_REG2 { 203 regulator-name = "vdd_arm"; 204 regulator-min-microvolt = <712500>; 205 regulator-max-microvolt = <1450000>; 206 regulator-ramp-delay = <12500>; 207 regulator-always-on; 208 regulator-boot-on; 209 regulator-state-mem { 210 regulator-on-in-suspend; 211 regulator-suspend-microvolt = <950000>; 212 }; 213 }; 214 215 vcc_ddr: DCDC_REG3 { 216 regulator-name = "vcc_ddr"; 217 regulator-always-on; 218 regulator-boot-on; 219 regulator-state-mem { 220 regulator-on-in-suspend; 221 }; 222 }; 223 224 vcc_io: DCDC_REG4 { 225 regulator-name = "vcc_io"; 226 regulator-min-microvolt = <3300000>; 227 regulator-max-microvolt = <3300000>; 228 regulator-always-on; 229 regulator-boot-on; 230 regulator-state-mem { 231 regulator-on-in-suspend; 232 regulator-suspend-microvolt = <3300000>; 233 }; 234 }; 235 236 vcc_18: LDO_REG1 { 237 regulator-name = "vcc_18"; 238 regulator-min-microvolt = <1800000>; 239 regulator-max-microvolt = <1800000>; 240 regulator-always-on; 241 regulator-boot-on; 242 regulator-state-mem { 243 regulator-on-in-suspend; 244 regulator-suspend-microvolt = <1800000>; 245 }; 246 }; 247 248 vcc18_emmc: LDO_REG2 { 249 regulator-name = "vcc18_emmc"; 250 regulator-min-microvolt = <1800000>; 251 regulator-max-microvolt = <1800000>; 252 regulator-always-on; 253 regulator-boot-on; 254 regulator-state-mem { 255 regulator-on-in-suspend; 256 regulator-suspend-microvolt = <1800000>; 257 }; 258 }; 259 260 vdd_10: LDO_REG3 { 261 regulator-name = "vdd_10"; 262 regulator-min-microvolt = <1000000>; 263 regulator-max-microvolt = <1000000>; 264 regulator-always-on; 265 regulator-boot-on; 266 regulator-state-mem { 267 regulator-on-in-suspend; 268 regulator-suspend-microvolt = <1000000>; 269 }; 270 }; 271 }; 272 }; 273}; 274 275&i2s1 { 276 status = "okay"; 277 278 i2s1_p0: port { 279 i2s1_p0_0: endpoint { 280 dai-format = "i2s"; 281 mclk-fs = <256>; 282 remote-endpoint = <&codec_p0_0>; 283 }; 284 }; 285}; 286 287&io_domains { 288 status = "okay"; 289 290 vccio1-supply = <&vcc_io>; 291 vccio2-supply = <&vcc18_emmc>; 292 vccio3-supply = <&vcc_io>; 293 vccio4-supply = <&vcc_18>; 294 vccio5-supply = <&vcc_io>; 295 vccio6-supply = <&vcc_io>; 296 pmuio-supply = <&vcc_io>; 297}; 298 299&pinctrl { 300 pmic { 301 pmic_int_l: pmic-int-l { 302 rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; 303 }; 304 }; 305 306 usb2 { 307 usb20_host_drv: usb20-host-drv { 308 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 309 }; 310 }; 311 312 usb3 { 313 usb30_host_drv: usb30-host-drv { 314 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; 315 }; 316 }; 317}; 318 319&sdmmc { 320 bus-width = <4>; 321 cap-mmc-highspeed; 322 cap-sd-highspeed; 323 disable-wp; 324 max-frequency = <150000000>; 325 pinctrl-names = "default"; 326 pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>; 327 vmmc-supply = <&vcc_sd>; 328 status = "okay"; 329}; 330 331&spdif { 332 pinctrl-0 = <&spdifm0_tx>; 333 status = "okay"; 334 335 spdif_p0: port { 336 spdif_p0_0: endpoint { 337 remote-endpoint = <&dit_p0_0>; 338 }; 339 }; 340}; 341 342&spi0 { 343 status = "okay"; 344 345 spiflash@0 { 346 compatible = "jedec,spi-nor"; 347 reg = <0>; 348 349 /* maximum speed for Rockchip SPI */ 350 spi-max-frequency = <50000000>; 351 }; 352}; 353 354&tsadc { 355 rockchip,hw-tshut-mode = <0>; 356 rockchip,hw-tshut-polarity = <0>; 357 status = "okay"; 358}; 359 360&uart2 { 361 status = "okay"; 362}; 363 364&u2phy { 365 status = "okay"; 366 367 u2phy_host: host-port { 368 status = "okay"; 369 }; 370 371 u2phy_otg: otg-port { 372 status = "okay"; 373 }; 374}; 375 376&usb20_otg { 377 dr_mode = "host"; 378 status = "okay"; 379}; 380 381&usb_host0_ehci { 382 status = "okay"; 383}; 384 385&usb_host0_ohci { 386 status = "okay"; 387}; 388 389&vop { 390 status = "okay"; 391}; 392 393&vop_mmu { 394 status = "okay"; 395}; 396