1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 /* 2 /* 3 * Copyright (c) 2017 PINE64 3 * Copyright (c) 2017 PINE64 4 */ 4 */ 5 5 6 /dts-v1/; 6 /dts-v1/; 7 #include "rk3328.dtsi" 7 #include "rk3328.dtsi" 8 8 9 / { 9 / { 10 model = "Pine64 Rock64"; 10 model = "Pine64 Rock64"; 11 compatible = "pine64,rock64", "rockchi 11 compatible = "pine64,rock64", "rockchip,rk3328"; 12 12 13 aliases { 13 aliases { 14 ethernet0 = &gmac2io; << 15 mmc0 = &sdmmc; 14 mmc0 = &sdmmc; 16 mmc1 = &emmc; 15 mmc1 = &emmc; 17 }; 16 }; 18 17 19 chosen { 18 chosen { 20 stdout-path = "serial2:1500000 19 stdout-path = "serial2:1500000n8"; 21 }; 20 }; 22 21 23 gmac_clkin: external-gmac-clock { 22 gmac_clkin: external-gmac-clock { 24 compatible = "fixed-clock"; 23 compatible = "fixed-clock"; 25 clock-frequency = <125000000>; 24 clock-frequency = <125000000>; 26 clock-output-names = "gmac_clk 25 clock-output-names = "gmac_clkin"; 27 #clock-cells = <0>; 26 #clock-cells = <0>; 28 }; 27 }; 29 28 30 vcc_sd: sdmmc-regulator { 29 vcc_sd: sdmmc-regulator { 31 compatible = "regulator-fixed" 30 compatible = "regulator-fixed"; 32 gpio = <&gpio0 RK_PD6 GPIO_ACT 31 gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; 33 pinctrl-names = "default"; 32 pinctrl-names = "default"; 34 pinctrl-0 = <&sdmmc0m1_pin>; 33 pinctrl-0 = <&sdmmc0m1_pin>; 35 regulator-name = "vcc_sd"; 34 regulator-name = "vcc_sd"; 36 regulator-min-microvolt = <330 35 regulator-min-microvolt = <3300000>; 37 regulator-max-microvolt = <330 36 regulator-max-microvolt = <3300000>; 38 vin-supply = <&vcc_io>; 37 vin-supply = <&vcc_io>; 39 }; 38 }; 40 39 41 /* Common enable line for all of the r !! 40 vcc_host_5v: vcc-host-5v-regulator { 42 vcc_host_5v: vcc_host1_5v: vcc_otg_5v: << 43 compatible = "regulator-fixed" 41 compatible = "regulator-fixed"; 44 gpio = <&gpio0 RK_PA2 GPIO_ACT 42 gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; 45 pinctrl-names = "default"; 43 pinctrl-names = "default"; 46 pinctrl-0 = <&usb20_host_drv>; 44 pinctrl-0 = <&usb20_host_drv>; 47 regulator-name = "vcc_host_5v" 45 regulator-name = "vcc_host_5v"; 48 regulator-always-on; 46 regulator-always-on; 49 regulator-boot-on; 47 regulator-boot-on; 50 vin-supply = <&vcc_sys>; 48 vin-supply = <&vcc_sys>; 51 }; 49 }; 52 50 >> 51 vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator { >> 52 compatible = "regulator-fixed"; >> 53 gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; >> 54 pinctrl-names = "default"; >> 55 pinctrl-0 = <&usb20_host_drv>; >> 56 regulator-name = "vcc_host1_5v"; >> 57 regulator-always-on; >> 58 regulator-boot-on; >> 59 vin-supply = <&vcc_sys>; >> 60 }; >> 61 53 vcc_sys: vcc-sys { 62 vcc_sys: vcc-sys { 54 compatible = "regulator-fixed" 63 compatible = "regulator-fixed"; 55 regulator-name = "vcc_sys"; 64 regulator-name = "vcc_sys"; 56 regulator-always-on; 65 regulator-always-on; 57 regulator-boot-on; 66 regulator-boot-on; 58 regulator-min-microvolt = <500 67 regulator-min-microvolt = <5000000>; 59 regulator-max-microvolt = <500 68 regulator-max-microvolt = <5000000>; 60 }; 69 }; 61 70 62 ir-receiver { 71 ir-receiver { 63 compatible = "gpio-ir-receiver 72 compatible = "gpio-ir-receiver"; 64 gpios = <&gpio2 RK_PA2 GPIO_AC 73 gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; 65 pinctrl-0 = <&ir_int>; 74 pinctrl-0 = <&ir_int>; 66 pinctrl-names = "default"; 75 pinctrl-names = "default"; 67 }; 76 }; 68 77 69 leds { 78 leds { 70 compatible = "gpio-leds"; 79 compatible = "gpio-leds"; 71 80 72 power_led: led-0 { 81 power_led: led-0 { 73 gpios = <&rk805 1 GPIO 82 gpios = <&rk805 1 GPIO_ACTIVE_LOW>; 74 linux,default-trigger 83 linux,default-trigger = "mmc0"; 75 }; 84 }; 76 85 77 standby_led: led-1 { 86 standby_led: led-1 { 78 gpios = <&rk805 0 GPIO 87 gpios = <&rk805 0 GPIO_ACTIVE_LOW>; 79 linux,default-trigger 88 linux,default-trigger = "heartbeat"; 80 }; 89 }; 81 }; 90 }; 82 91 83 spdif_sound: spdif-sound { 92 spdif_sound: spdif-sound { 84 compatible = "simple-audio-car 93 compatible = "simple-audio-card"; 85 simple-audio-card,name = "SPDI 94 simple-audio-card,name = "SPDIF"; 86 95 87 simple-audio-card,cpu { 96 simple-audio-card,cpu { 88 sound-dai = <&spdif>; 97 sound-dai = <&spdif>; 89 }; 98 }; 90 99 91 simple-audio-card,codec { 100 simple-audio-card,codec { 92 sound-dai = <&spdif_di 101 sound-dai = <&spdif_dit>; 93 }; 102 }; 94 }; 103 }; 95 104 96 spdif_dit: spdif-dit { 105 spdif_dit: spdif-dit { 97 compatible = "linux,spdif-dit" 106 compatible = "linux,spdif-dit"; 98 #sound-dai-cells = <0>; 107 #sound-dai-cells = <0>; 99 }; 108 }; 100 }; 109 }; 101 110 102 &analog_sound { 111 &analog_sound { 103 status = "okay"; 112 status = "okay"; 104 }; 113 }; 105 114 106 &codec { 115 &codec { 107 mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_ 116 mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>; 108 status = "okay"; 117 status = "okay"; 109 }; 118 }; 110 119 111 &cpu0 { 120 &cpu0 { 112 cpu-supply = <&vdd_arm>; 121 cpu-supply = <&vdd_arm>; 113 }; 122 }; 114 123 115 &cpu1 { 124 &cpu1 { 116 cpu-supply = <&vdd_arm>; 125 cpu-supply = <&vdd_arm>; 117 }; 126 }; 118 127 119 &cpu2 { 128 &cpu2 { 120 cpu-supply = <&vdd_arm>; 129 cpu-supply = <&vdd_arm>; 121 }; 130 }; 122 131 123 &cpu3 { 132 &cpu3 { 124 cpu-supply = <&vdd_arm>; 133 cpu-supply = <&vdd_arm>; 125 }; 134 }; 126 135 127 &emmc { 136 &emmc { 128 bus-width = <8>; 137 bus-width = <8>; 129 cap-mmc-highspeed; 138 cap-mmc-highspeed; 130 mmc-hs200-1_8v; 139 mmc-hs200-1_8v; 131 non-removable; 140 non-removable; 132 pinctrl-names = "default"; 141 pinctrl-names = "default"; 133 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc 142 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; 134 vmmc-supply = <&vcc_io>; 143 vmmc-supply = <&vcc_io>; 135 vqmmc-supply = <&vcc18_emmc>; 144 vqmmc-supply = <&vcc18_emmc>; 136 status = "okay"; 145 status = "okay"; 137 }; 146 }; 138 147 139 &gmac2io { 148 &gmac2io { 140 assigned-clocks = <&cru SCLK_MAC2IO>, 149 assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; 141 assigned-clock-parents = <&gmac_clkin> 150 assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>; 142 clock_in_out = "input"; 151 clock_in_out = "input"; 143 phy-supply = <&vcc_io>; 152 phy-supply = <&vcc_io>; 144 phy-mode = "rgmii"; 153 phy-mode = "rgmii"; 145 pinctrl-names = "default"; 154 pinctrl-names = "default"; 146 pinctrl-0 = <&rgmiim1_pins>; 155 pinctrl-0 = <&rgmiim1_pins>; 147 snps,force_thresh_dma_mode; 156 snps,force_thresh_dma_mode; 148 snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ 157 snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; 149 snps,reset-active-low; 158 snps,reset-active-low; 150 snps,reset-delays-us = <0 10000 50000> 159 snps,reset-delays-us = <0 10000 50000>; 151 tx_delay = <0x24>; 160 tx_delay = <0x24>; 152 rx_delay = <0x18>; 161 rx_delay = <0x18>; 153 status = "okay"; 162 status = "okay"; 154 }; 163 }; 155 164 156 &hdmi { 165 &hdmi { 157 avdd-0v9-supply = <&vdd_10>; << 158 avdd-1v8-supply = <&vcc_18>; << 159 status = "okay"; 166 status = "okay"; 160 }; 167 }; 161 168 162 &hdmi_sound { 169 &hdmi_sound { 163 status = "okay"; 170 status = "okay"; 164 }; 171 }; 165 172 166 &hdmiphy { 173 &hdmiphy { 167 status = "okay"; 174 status = "okay"; 168 }; 175 }; 169 176 170 &i2c1 { 177 &i2c1 { 171 status = "okay"; 178 status = "okay"; 172 179 173 rk805: pmic@18 { 180 rk805: pmic@18 { 174 compatible = "rockchip,rk805"; 181 compatible = "rockchip,rk805"; 175 reg = <0x18>; 182 reg = <0x18>; 176 interrupt-parent = <&gpio2>; 183 interrupt-parent = <&gpio2>; 177 interrupts = <6 IRQ_TYPE_LEVEL 184 interrupts = <6 IRQ_TYPE_LEVEL_LOW>; 178 #clock-cells = <1>; 185 #clock-cells = <1>; 179 clock-output-names = "xin32k", 186 clock-output-names = "xin32k", "rk805-clkout2"; 180 gpio-controller; 187 gpio-controller; 181 #gpio-cells = <2>; 188 #gpio-cells = <2>; 182 pinctrl-names = "default"; 189 pinctrl-names = "default"; 183 pinctrl-0 = <&pmic_int_l>; 190 pinctrl-0 = <&pmic_int_l>; 184 rockchip,system-power-controll 191 rockchip,system-power-controller; 185 wakeup-source; 192 wakeup-source; 186 193 187 vcc1-supply = <&vcc_sys>; 194 vcc1-supply = <&vcc_sys>; 188 vcc2-supply = <&vcc_sys>; 195 vcc2-supply = <&vcc_sys>; 189 vcc3-supply = <&vcc_sys>; 196 vcc3-supply = <&vcc_sys>; 190 vcc4-supply = <&vcc_sys>; 197 vcc4-supply = <&vcc_sys>; 191 vcc5-supply = <&vcc_io>; 198 vcc5-supply = <&vcc_io>; 192 vcc6-supply = <&vcc_sys>; 199 vcc6-supply = <&vcc_sys>; 193 200 194 regulators { 201 regulators { 195 vdd_logic: DCDC_REG1 { 202 vdd_logic: DCDC_REG1 { 196 regulator-name 203 regulator-name = "vdd_logic"; 197 regulator-min- 204 regulator-min-microvolt = <712500>; 198 regulator-max- 205 regulator-max-microvolt = <1450000>; 199 regulator-ramp 206 regulator-ramp-delay = <12500>; 200 regulator-alwa 207 regulator-always-on; 201 regulator-boot 208 regulator-boot-on; 202 regulator-stat 209 regulator-state-mem { 203 regula 210 regulator-on-in-suspend; 204 regula 211 regulator-suspend-microvolt = <1000000>; 205 }; 212 }; 206 }; 213 }; 207 214 208 vdd_arm: DCDC_REG2 { 215 vdd_arm: DCDC_REG2 { 209 regulator-name 216 regulator-name = "vdd_arm"; 210 regulator-min- 217 regulator-min-microvolt = <712500>; 211 regulator-max- 218 regulator-max-microvolt = <1450000>; 212 regulator-ramp 219 regulator-ramp-delay = <12500>; 213 regulator-alwa 220 regulator-always-on; 214 regulator-boot 221 regulator-boot-on; 215 regulator-stat 222 regulator-state-mem { 216 regula 223 regulator-on-in-suspend; 217 regula 224 regulator-suspend-microvolt = <950000>; 218 }; 225 }; 219 }; 226 }; 220 227 221 vcc_ddr: DCDC_REG3 { 228 vcc_ddr: DCDC_REG3 { 222 regulator-name 229 regulator-name = "vcc_ddr"; 223 regulator-alwa 230 regulator-always-on; 224 regulator-boot 231 regulator-boot-on; 225 regulator-stat 232 regulator-state-mem { 226 regula 233 regulator-on-in-suspend; 227 }; 234 }; 228 }; 235 }; 229 236 230 vcc_io: DCDC_REG4 { 237 vcc_io: DCDC_REG4 { 231 regulator-name 238 regulator-name = "vcc_io"; 232 regulator-min- 239 regulator-min-microvolt = <3300000>; 233 regulator-max- 240 regulator-max-microvolt = <3300000>; 234 regulator-alwa 241 regulator-always-on; 235 regulator-boot 242 regulator-boot-on; 236 regulator-stat 243 regulator-state-mem { 237 regula 244 regulator-on-in-suspend; 238 regula 245 regulator-suspend-microvolt = <3300000>; 239 }; 246 }; 240 }; 247 }; 241 248 242 vcc_18: LDO_REG1 { 249 vcc_18: LDO_REG1 { 243 regulator-name 250 regulator-name = "vcc_18"; 244 regulator-min- 251 regulator-min-microvolt = <1800000>; 245 regulator-max- 252 regulator-max-microvolt = <1800000>; 246 regulator-alwa 253 regulator-always-on; 247 regulator-boot 254 regulator-boot-on; 248 regulator-stat 255 regulator-state-mem { 249 regula 256 regulator-on-in-suspend; 250 regula 257 regulator-suspend-microvolt = <1800000>; 251 }; 258 }; 252 }; 259 }; 253 260 254 vcc18_emmc: LDO_REG2 { 261 vcc18_emmc: LDO_REG2 { 255 regulator-name 262 regulator-name = "vcc18_emmc"; 256 regulator-min- 263 regulator-min-microvolt = <1800000>; 257 regulator-max- 264 regulator-max-microvolt = <1800000>; 258 regulator-alwa 265 regulator-always-on; 259 regulator-boot 266 regulator-boot-on; 260 regulator-stat 267 regulator-state-mem { 261 regula 268 regulator-on-in-suspend; 262 regula 269 regulator-suspend-microvolt = <1800000>; 263 }; 270 }; 264 }; 271 }; 265 272 266 vdd_10: LDO_REG3 { 273 vdd_10: LDO_REG3 { 267 regulator-name 274 regulator-name = "vdd_10"; 268 regulator-min- 275 regulator-min-microvolt = <1000000>; 269 regulator-max- 276 regulator-max-microvolt = <1000000>; 270 regulator-alwa 277 regulator-always-on; 271 regulator-boot 278 regulator-boot-on; 272 regulator-stat 279 regulator-state-mem { 273 regula 280 regulator-on-in-suspend; 274 regula 281 regulator-suspend-microvolt = <1000000>; 275 }; 282 }; 276 }; 283 }; 277 }; 284 }; 278 }; 285 }; 279 }; 286 }; 280 287 281 &i2s0 { 288 &i2s0 { 282 status = "okay"; 289 status = "okay"; 283 }; 290 }; 284 291 285 &i2s1 { 292 &i2s1 { 286 status = "okay"; 293 status = "okay"; 287 }; 294 }; 288 295 289 &io_domains { 296 &io_domains { 290 status = "okay"; 297 status = "okay"; 291 298 292 vccio1-supply = <&vcc_io>; 299 vccio1-supply = <&vcc_io>; 293 vccio2-supply = <&vcc18_emmc>; 300 vccio2-supply = <&vcc18_emmc>; 294 vccio3-supply = <&vcc_io>; 301 vccio3-supply = <&vcc_io>; 295 vccio4-supply = <&vcc_18>; 302 vccio4-supply = <&vcc_18>; 296 vccio5-supply = <&vcc_io>; 303 vccio5-supply = <&vcc_io>; 297 vccio6-supply = <&vcc_io>; 304 vccio6-supply = <&vcc_io>; 298 pmuio-supply = <&vcc_io>; 305 pmuio-supply = <&vcc_io>; 299 }; 306 }; 300 307 301 &pinctrl { 308 &pinctrl { 302 ir { 309 ir { 303 ir_int: ir-int { 310 ir_int: ir-int { 304 rockchip,pins = <2 RK_ 311 rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 305 }; 312 }; 306 }; 313 }; 307 314 308 pmic { 315 pmic { 309 pmic_int_l: pmic-int-l { 316 pmic_int_l: pmic-int-l { 310 rockchip,pins = <2 RK_ 317 rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; 311 }; 318 }; 312 }; 319 }; 313 320 314 usb2 { 321 usb2 { 315 usb20_host_drv: usb20-host-drv 322 usb20_host_drv: usb20-host-drv { 316 rockchip,pins = <0 RK_ 323 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 317 }; 324 }; 318 }; 325 }; 319 }; 326 }; 320 327 321 &sdmmc { 328 &sdmmc { 322 bus-width = <4>; 329 bus-width = <4>; 323 cap-mmc-highspeed; 330 cap-mmc-highspeed; 324 cap-sd-highspeed; 331 cap-sd-highspeed; 325 disable-wp; 332 disable-wp; 326 max-frequency = <150000000>; 333 max-frequency = <150000000>; 327 pinctrl-names = "default"; 334 pinctrl-names = "default"; 328 pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd & 335 pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>; 329 vmmc-supply = <&vcc_sd>; 336 vmmc-supply = <&vcc_sd>; 330 status = "okay"; 337 status = "okay"; 331 }; 338 }; 332 339 333 &spdif { 340 &spdif { 334 pinctrl-0 = <&spdifm0_tx>; 341 pinctrl-0 = <&spdifm0_tx>; 335 status = "okay"; 342 status = "okay"; 336 }; 343 }; 337 344 338 &spi0 { 345 &spi0 { 339 status = "okay"; 346 status = "okay"; 340 347 341 flash@0 { 348 flash@0 { 342 compatible = "jedec,spi-nor"; 349 compatible = "jedec,spi-nor"; 343 reg = <0>; 350 reg = <0>; 344 351 345 /* maximum speed for Rockchip 352 /* maximum speed for Rockchip SPI */ 346 spi-max-frequency = <50000000> 353 spi-max-frequency = <50000000>; 347 }; 354 }; 348 }; 355 }; 349 356 350 &tsadc { 357 &tsadc { 351 rockchip,hw-tshut-mode = <0>; 358 rockchip,hw-tshut-mode = <0>; 352 rockchip,hw-tshut-polarity = <0>; 359 rockchip,hw-tshut-polarity = <0>; 353 status = "okay"; 360 status = "okay"; 354 }; 361 }; 355 362 356 &uart2 { 363 &uart2 { 357 status = "okay"; 364 status = "okay"; 358 }; 365 }; 359 366 360 &u2phy { 367 &u2phy { 361 status = "okay"; 368 status = "okay"; 362 369 363 u2phy_host: host-port { 370 u2phy_host: host-port { 364 status = "okay"; 371 status = "okay"; 365 }; 372 }; 366 373 367 u2phy_otg: otg-port { 374 u2phy_otg: otg-port { 368 status = "okay"; 375 status = "okay"; 369 }; 376 }; 370 }; 377 }; 371 378 372 &usb20_otg { 379 &usb20_otg { 373 dr_mode = "host"; 380 dr_mode = "host"; 374 status = "okay"; 381 status = "okay"; 375 }; 382 }; 376 383 377 &usbdrd3 { 384 &usbdrd3 { 378 dr_mode = "host"; 385 dr_mode = "host"; 379 status = "okay"; 386 status = "okay"; 380 }; 387 }; 381 388 382 &usb_host0_ehci { 389 &usb_host0_ehci { 383 status = "okay"; 390 status = "okay"; 384 }; 391 }; 385 392 386 &usb_host0_ohci { 393 &usb_host0_ohci { 387 status = "okay"; 394 status = "okay"; 388 }; 395 }; 389 396 390 &vop { 397 &vop { 391 status = "okay"; 398 status = "okay"; 392 }; 399 }; 393 400 394 &vop_mmu { 401 &vop_mmu { 395 status = "okay"; 402 status = "okay"; 396 }; 403 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.