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