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