1/* 2 * This file is dual-licensed: you can use it either under the terms 3 * of the GPL or the X11 license, at your option. Note that this dual 4 * licensing only applies to this file, and not this project as a 5 * whole. 6 * 7 * a) This file is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License as 9 * published by the Free Software Foundation; either version 2 of the 10 * License, or (at your option) any later version. 11 * 12 * This file is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * Or, alternatively, 18 * 19 * b) Permission is hereby granted, free of charge, to any person 20 * obtaining a copy of this software and associated documentation 21 * files (the "Software"), to deal in the Software without 22 * restriction, including without limitation the rights to use, 23 * copy, modify, merge, publish, distribute, sublicense, and/or 24 * sell copies of the Software, and to permit persons to whom the 25 * Software is furnished to do so, subject to the following 26 * conditions: 27 * 28 * The above copyright notice and this permission notice shall be 29 * included in all copies or substantial portions of the Software. 30 * 31 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 32 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 33 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 34 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 35 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 36 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 37 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 38 * OTHER DEALINGS IN THE SOFTWARE. 39 */ 40 41#include "rk3288.dtsi" 42#include <dt-bindings/input/input.h> 43 44/ { 45 memory { 46 reg = <0x0 0x80000000>; 47 device_type = "memory"; 48 }; 49 50 adc-keys { 51 compatible = "adc-keys"; 52 io-channels = <&saradc 1>; 53 54 volup-key { 55 linux,code = <KEY_VOLUMEUP>; 56 label = "volume up"; 57 press-threshold-microvolt = <18000>; 58 }; 59 }; 60 61 ext_gmac: external-gmac-clock { 62 compatible = "fixed-clock"; 63 #clock-cells = <0>; 64 clock-frequency = <125000000>; 65 clock-output-names = "ext_gmac"; 66 }; 67 68 vcc_sys: vsys-regulator { 69 compatible = "regulator-fixed"; 70 regulator-name = "vcc_sys"; 71 regulator-min-microvolt = <5000000>; 72 regulator-max-microvolt = <5000000>; 73 regulator-always-on; 74 regulator-boot-on; 75 }; 76}; 77 78&cpu0 { 79 cpu0-supply = <&vdd_cpu>; 80}; 81 82&emmc { 83 bus-width = <8>; 84 cap-mmc-highspeed; 85 disable-wp; 86 non-removable; 87 num-slots = <1>; 88 pinctrl-names = "default"; 89 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>; 90 status = "okay"; 91}; 92 93&saradc { 94 vref-supply = <&vcc_18>; 95 status = "okay"; 96}; 97 98&sdmmc { 99 bus-width = <4>; 100 cap-mmc-highspeed; 101 cap-sd-highspeed; 102 card-detect-delay = <200>; 103 disable-wp; 104 num-slots = <1>; 105 pinctrl-names = "default"; 106 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; 107 status = "okay"; 108 vmmc-supply = <&vcc_sd>; 109 vqmmc-supply = <&vccio_sd>; 110}; 111 112&gmac { 113 assigned-clocks = <&cru SCLK_MAC>; 114 assigned-clock-parents = <&ext_gmac>; 115 clock_in_out = "input"; 116 pinctrl-names = "default"; 117 pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>; 118 phy-supply = <&vcc_lan>; 119 phy-mode = "rgmii"; 120 snps,reset-active-low; 121 snps,reset-delays-us = <0 10000 1000000>; 122 snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>; 123 tx_delay = <0x30>; 124 rx_delay = <0x10>; 125 status = "okay"; 126}; 127 128&gpu { 129 mali-supply = <&vdd_gpu>; 130 status = "okay"; 131}; 132 133&hdmi { 134 status = "okay"; 135}; 136 137&i2c0 { 138 status = "okay"; 139 clock-frequency = <400000>; 140 141 rk808: pmic@1b { 142 compatible = "rockchip,rk808"; 143 reg = <0x1b>; 144 interrupt-parent = <&gpio0>; 145 interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 146 #clock-cells = <1>; 147 clock-output-names = "xin32k", "rk808-clkout2"; 148 pinctrl-names = "default"; 149 pinctrl-0 = <&pmic_int &global_pwroff>; 150 rockchip,system-power-controller; 151 wakeup-source; 152 153 vcc1-supply = <&vcc_sys>; 154 vcc2-supply = <&vcc_sys>; 155 vcc3-supply = <&vcc_sys>; 156 vcc4-supply = <&vcc_sys>; 157 vcc6-supply = <&vcc_sys>; 158 vcc7-supply = <&vcc_sys>; 159 vcc8-supply = <&vcc_io>; 160 vcc9-supply = <&vcc_io>; 161 vcc10-supply = <&vcc_io>; 162 vcc11-supply = <&vcc_io>; 163 vcc12-supply = <&vcc_io>; 164 vddio-supply = <&vcc_io>; 165 166 regulators { 167 vdd_cpu: DCDC_REG1 { 168 regulator-always-on; 169 regulator-boot-on; 170 regulator-min-microvolt = <750000>; 171 regulator-max-microvolt = <1350000>; 172 regulator-name = "vdd_arm"; 173 regulator-state-mem { 174 regulator-off-in-suspend; 175 }; 176 }; 177 178 vdd_gpu: DCDC_REG2 { 179 regulator-always-on; 180 regulator-boot-on; 181 regulator-min-microvolt = <850000>; 182 regulator-max-microvolt = <1250000>; 183 regulator-name = "vdd_gpu"; 184 regulator-state-mem { 185 regulator-on-in-suspend; 186 regulator-suspend-microvolt = <1000000>; 187 }; 188 }; 189 190 vcc_ddr: DCDC_REG3 { 191 regulator-always-on; 192 regulator-boot-on; 193 regulator-name = "vcc_ddr"; 194 regulator-state-mem { 195 regulator-on-in-suspend; 196 }; 197 }; 198 199 vcc_io: DCDC_REG4 { 200 regulator-always-on; 201 regulator-boot-on; 202 regulator-min-microvolt = <3300000>; 203 regulator-max-microvolt = <3300000>; 204 regulator-name = "vcc_io"; 205 regulator-state-mem { 206 regulator-on-in-suspend; 207 regulator-suspend-microvolt = <3300000>; 208 }; 209 }; 210 211 vccio_pmu: LDO_REG1 { 212 regulator-always-on; 213 regulator-boot-on; 214 regulator-min-microvolt = <3300000>; 215 regulator-max-microvolt = <3300000>; 216 regulator-name = "vccio_pmu"; 217 regulator-state-mem { 218 regulator-on-in-suspend; 219 regulator-suspend-microvolt = <3300000>; 220 }; 221 }; 222 223 vcca_33: LDO_REG2 { 224 regulator-always-on; 225 regulator-boot-on; 226 regulator-min-microvolt = <3300000>; 227 regulator-max-microvolt = <3300000>; 228 regulator-name = "vcca_33"; 229 regulator-state-mem { 230 regulator-off-in-suspend; 231 }; 232 }; 233 234 vdd_10: LDO_REG3 { 235 regulator-always-on; 236 regulator-boot-on; 237 regulator-min-microvolt = <1000000>; 238 regulator-max-microvolt = <1000000>; 239 regulator-name = "vdd_10"; 240 regulator-state-mem { 241 regulator-on-in-suspend; 242 regulator-suspend-microvolt = <1000000>; 243 }; 244 }; 245 246 vcc_wl: LDO_REG4 { 247 regulator-always-on; 248 regulator-boot-on; 249 regulator-min-microvolt = <1800000>; 250 regulator-max-microvolt = <1800000>; 251 regulator-name = "vcc_wl"; 252 regulator-state-mem { 253 regulator-on-in-suspend; 254 regulator-suspend-microvolt = <1800000>; 255 }; 256 }; 257 258 vccio_sd: LDO_REG5 { 259 regulator-always-on; 260 regulator-boot-on; 261 regulator-min-microvolt = <1800000>; 262 regulator-max-microvolt = <3300000>; 263 regulator-name = "vccio_sd"; 264 regulator-state-mem { 265 regulator-on-in-suspend; 266 regulator-suspend-microvolt = <3300000>; 267 }; 268 }; 269 270 vdd10_lcd: LDO_REG6 { 271 regulator-always-on; 272 regulator-boot-on; 273 regulator-min-microvolt = <1000000>; 274 regulator-max-microvolt = <1000000>; 275 regulator-name = "vdd10_lcd"; 276 regulator-state-mem { 277 regulator-on-in-suspend; 278 regulator-suspend-microvolt = <1000000>; 279 }; 280 }; 281 282 vcc_18: LDO_REG7 { 283 regulator-always-on; 284 regulator-boot-on; 285 regulator-min-microvolt = <1800000>; 286 regulator-max-microvolt = <1800000>; 287 regulator-name = "vcc_18"; 288 regulator-state-mem { 289 regulator-on-in-suspend; 290 regulator-suspend-microvolt = <1800000>; 291 }; 292 }; 293 294 vcc18_lcd: LDO_REG8 { 295 regulator-always-on; 296 regulator-boot-on; 297 regulator-min-microvolt = <1800000>; 298 regulator-max-microvolt = <1800000>; 299 regulator-name = "vcc18_lcd"; 300 regulator-state-mem { 301 regulator-on-in-suspend; 302 regulator-suspend-microvolt = <1800000>; 303 }; 304 }; 305 306 vcc_sd: SWITCH_REG1 { 307 regulator-always-on; 308 regulator-boot-on; 309 regulator-name = "vcc_sd"; 310 regulator-state-mem { 311 regulator-on-in-suspend; 312 }; 313 }; 314 315 vcc_lan: SWITCH_REG2 { 316 regulator-always-on; 317 regulator-boot-on; 318 regulator-name = "vcc_lan"; 319 regulator-state-mem { 320 regulator-on-in-suspend; 321 }; 322 }; 323 }; 324 }; 325}; 326 327&pinctrl { 328 pcfg_output_high: pcfg-output-high { 329 output-high; 330 }; 331 332 pcfg_output_low: pcfg-output-low { 333 output-low; 334 }; 335 336 pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma { 337 drive-strength = <8>; 338 }; 339 340 pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma { 341 bias-pull-up; 342 drive-strength = <8>; 343 }; 344 345 gmac { 346 phy_int: phy-int { 347 rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>; 348 }; 349 350 phy_pmeb: phy-pmeb { 351 rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>; 352 }; 353 354 phy_rst: phy-rst { 355 rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>; 356 }; 357 }; 358 359 pmic { 360 pmic_int: pmic-int { 361 rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>; 362 }; 363 }; 364 365 sdmmc { 366 sdmmc_bus4: sdmmc-bus4 { 367 rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, 368 <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, 369 <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, 370 <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>; 371 }; 372 373 sdmmc_clk: sdmmc-clk { 374 rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>; 375 }; 376 377 sdmmc_cmd: sdmmc-cmd { 378 rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>; 379 }; 380 381 sdmmc_pwr: sdmmc-pwr { 382 rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>; 383 }; 384 }; 385 386 usbphy { 387 host_drv: host-drv { 388 rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>; 389 }; 390 }; 391}; 392 393&uart2 { 394 status = "okay"; 395}; 396 397&usbphy { 398 pinctrl-names = "default"; 399 pinctrl-0 = <&host_drv>; 400 vbus_drv-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; 401 status = "okay"; 402}; 403 404&usb_host0_ehci { 405 status = "okay"; 406}; 407 408&usb_host1 { 409 status = "okay"; 410}; 411 412&usb_otg { 413 status = "okay"; 414}; 415 416&usb_hsic { 417 status = "okay"; 418}; 419 420&vopb { 421 status = "okay"; 422}; 423 424&vopb_mmu { 425 status = "okay"; 426}; 427 428&vopl { 429 status = "okay"; 430}; 431 432&vopl_mmu { 433 status = "okay"; 434}; 435 436&vpu { 437 status = "okay"; 438}; 439