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 68&cpu0 { 69 cpu-supply = <&vdd_arm>; 70}; 71 72&cpu1 { 73 cpu-supply = <&vdd_arm>; 74}; 75 76&cpu2 { 77 cpu-supply = <&vdd_arm>; 78}; 79 80&cpu3 { 81 cpu-supply = <&vdd_arm>; 82}; 83 84&emmc { 85 bus-width = <8>; 86 cap-mmc-highspeed; 87 non-removable; 88 pinctrl-names = "default"; 89 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; 90 vmmc-supply = <&vcc_io>; 91 vqmmc-supply = <&vcc18_emmc>; 92 status = "okay"; 93}; 94 95&gmac2io { 96 assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; 97 assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>; 98 clock_in_out = "input"; 99 phy-supply = <&vcc_io>; 100 phy-mode = "rgmii"; 101 pinctrl-names = "default"; 102 pinctrl-0 = <&rgmiim1_pins>; 103 snps,force_thresh_dma_mode; 104 snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; 105 snps,reset-active-low; 106 snps,reset-delays-us = <0 10000 50000>; 107 tx_delay = <0x24>; 108 rx_delay = <0x18>; 109 status = "okay"; 110}; 111 112&i2c1 { 113 status = "okay"; 114 115 rk805: pmic@18 { 116 compatible = "rockchip,rk805"; 117 reg = <0x18>; 118 interrupt-parent = <&gpio2>; 119 interrupts = <6 IRQ_TYPE_LEVEL_LOW>; 120 #clock-cells = <1>; 121 clock-output-names = "xin32k", "rk805-clkout2"; 122 pinctrl-names = "default"; 123 pinctrl-0 = <&pmic_int_l>; 124 rockchip,system-power-controller; 125 wakeup-source; 126 127 vcc1-supply = <&vcc_sys>; 128 vcc2-supply = <&vcc_sys>; 129 vcc3-supply = <&vcc_sys>; 130 vcc4-supply = <&vcc_sys>; 131 vcc5-supply = <&vcc_io>; 132 vcc6-supply = <&vcc_sys>; 133 134 regulators { 135 vdd_logic: DCDC_REG1 { 136 regulator-name = "vdd_logic"; 137 regulator-min-microvolt = <712500>; 138 regulator-max-microvolt = <1450000>; 139 regulator-ramp-delay = <12500>; 140 regulator-always-on; 141 regulator-boot-on; 142 regulator-state-mem { 143 regulator-on-in-suspend; 144 regulator-suspend-microvolt = <1000000>; 145 }; 146 }; 147 148 vdd_arm: DCDC_REG2 { 149 regulator-name = "vdd_arm"; 150 regulator-min-microvolt = <712500>; 151 regulator-max-microvolt = <1450000>; 152 regulator-ramp-delay = <12500>; 153 regulator-always-on; 154 regulator-boot-on; 155 regulator-state-mem { 156 regulator-on-in-suspend; 157 regulator-suspend-microvolt = <950000>; 158 }; 159 }; 160 161 vcc_ddr: DCDC_REG3 { 162 regulator-name = "vcc_ddr"; 163 regulator-always-on; 164 regulator-boot-on; 165 regulator-state-mem { 166 regulator-on-in-suspend; 167 }; 168 }; 169 170 vcc_io: DCDC_REG4 { 171 regulator-name = "vcc_io"; 172 regulator-min-microvolt = <3300000>; 173 regulator-max-microvolt = <3300000>; 174 regulator-always-on; 175 regulator-boot-on; 176 regulator-state-mem { 177 regulator-on-in-suspend; 178 regulator-suspend-microvolt = <3300000>; 179 }; 180 }; 181 182 vcc_18: LDO_REG1 { 183 regulator-name = "vdd_18"; 184 regulator-min-microvolt = <1800000>; 185 regulator-max-microvolt = <1800000>; 186 regulator-always-on; 187 regulator-boot-on; 188 regulator-state-mem { 189 regulator-on-in-suspend; 190 regulator-suspend-microvolt = <1800000>; 191 }; 192 }; 193 194 vcc18_emmc: LDO_REG2 { 195 regulator-name = "vcc_18emmc"; 196 regulator-min-microvolt = <1800000>; 197 regulator-max-microvolt = <1800000>; 198 regulator-always-on; 199 regulator-boot-on; 200 regulator-state-mem { 201 regulator-on-in-suspend; 202 regulator-suspend-microvolt = <1800000>; 203 }; 204 }; 205 206 vdd_10: LDO_REG3 { 207 regulator-name = "vdd_10"; 208 regulator-min-microvolt = <1000000>; 209 regulator-max-microvolt = <1000000>; 210 regulator-always-on; 211 regulator-boot-on; 212 regulator-state-mem { 213 regulator-on-in-suspend; 214 regulator-suspend-microvolt = <1000000>; 215 }; 216 }; 217 }; 218 }; 219}; 220 221&io_domains { 222 status = "okay"; 223 224 vccio1-supply = <&vcc_io>; 225 vccio2-supply = <&vcc18_emmc>; 226 vccio3-supply = <&vcc_io>; 227 vccio4-supply = <&vcc_18>; 228 vccio5-supply = <&vcc_io>; 229 vccio6-supply = <&vcc_io>; 230 pmuio-supply = <&vcc_io>; 231}; 232 233&pinctrl { 234 pmic { 235 pmic_int_l: pmic-int-l { 236 rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; 237 }; 238 }; 239 240 usb2 { 241 usb20_host_drv: usb20-host-drv { 242 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 243 }; 244 }; 245 246 usb3 { 247 usb30_host_drv: usb30-host-drv { 248 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; 249 }; 250 }; 251}; 252 253&sdmmc { 254 bus-width = <4>; 255 cap-mmc-highspeed; 256 cap-sd-highspeed; 257 disable-wp; 258 max-frequency = <150000000>; 259 pinctrl-names = "default"; 260 pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>; 261 vmmc-supply = <&vcc_sd>; 262 status = "okay"; 263}; 264 265&tsadc { 266 rockchip,hw-tshut-mode = <0>; 267 rockchip,hw-tshut-polarity = <0>; 268 status = "okay"; 269}; 270 271&uart2 { 272 status = "okay"; 273}; 274 275&u2phy { 276 status = "okay"; 277 278 u2phy_host: host-port { 279 status = "okay"; 280 }; 281 282 u2phy_otg: otg-port { 283 status = "okay"; 284 }; 285}; 286 287&usb20_otg { 288 dr_mode = "host"; 289 status = "okay"; 290}; 291 292&usb_host0_ehci { 293 status = "okay"; 294}; 295 296&usb_host0_ohci { 297 status = "okay"; 298}; 299