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