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