1*4882a593Smuzhiyun/* 2*4882a593Smuzhiyun * Copyright (c) 2016 Andreas Färber 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * This file is dual-licensed: you can use it either under the terms 5*4882a593Smuzhiyun * of the GPL or the X11 license, at your option. Note that this dual 6*4882a593Smuzhiyun * licensing only applies to this file, and not this project as a 7*4882a593Smuzhiyun * whole. 8*4882a593Smuzhiyun * 9*4882a593Smuzhiyun * a) This file is free software; you can redistribute it and/or 10*4882a593Smuzhiyun * modify it under the terms of the GNU General Public License as 11*4882a593Smuzhiyun * published by the Free Software Foundation; either version 2 of the 12*4882a593Smuzhiyun * License, or (at your option) any later version. 13*4882a593Smuzhiyun * 14*4882a593Smuzhiyun * This file is distributed in the hope that it will be useful, 15*4882a593Smuzhiyun * but WITHOUT ANY WARRANTY; without even the implied warranty of 16*4882a593Smuzhiyun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17*4882a593Smuzhiyun * GNU General Public License for more details. 18*4882a593Smuzhiyun * 19*4882a593Smuzhiyun * Or, alternatively, 20*4882a593Smuzhiyun * 21*4882a593Smuzhiyun * b) Permission is hereby granted, free of charge, to any person 22*4882a593Smuzhiyun * obtaining a copy of this software and associated documentation 23*4882a593Smuzhiyun * files (the "Software"), to deal in the Software without 24*4882a593Smuzhiyun * restriction, including without limitation the rights to use, 25*4882a593Smuzhiyun * copy, modify, merge, publish, distribute, sublicense, and/or 26*4882a593Smuzhiyun * sell copies of the Software, and to permit persons to whom the 27*4882a593Smuzhiyun * Software is furnished to do so, subject to the following 28*4882a593Smuzhiyun * conditions: 29*4882a593Smuzhiyun * 30*4882a593Smuzhiyun * The above copyright notice and this permission notice shall be 31*4882a593Smuzhiyun * included in all copies or substantial portions of the Software. 32*4882a593Smuzhiyun * 33*4882a593Smuzhiyun * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 34*4882a593Smuzhiyun * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 35*4882a593Smuzhiyun * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 36*4882a593Smuzhiyun * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 37*4882a593Smuzhiyun * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 38*4882a593Smuzhiyun * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 39*4882a593Smuzhiyun * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 40*4882a593Smuzhiyun * OTHER DEALINGS IN THE SOFTWARE. 41*4882a593Smuzhiyun */ 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun/dts-v1/; 44*4882a593Smuzhiyun#include "rk3368.dtsi" 45*4882a593Smuzhiyun#include <dt-bindings/input/input.h> 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun/ { 48*4882a593Smuzhiyun model = "GeekBox"; 49*4882a593Smuzhiyun compatible = "geekbuying,geekbox", "rockchip,rk3368"; 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun chosen { 52*4882a593Smuzhiyun stdout-path = "serial2:115200n8"; 53*4882a593Smuzhiyun }; 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun memory@0 { 56*4882a593Smuzhiyun device_type = "memory"; 57*4882a593Smuzhiyun reg = <0x0 0x0 0x0 0x80000000>; 58*4882a593Smuzhiyun }; 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun ext_gmac: gmac-clk { 61*4882a593Smuzhiyun compatible = "fixed-clock"; 62*4882a593Smuzhiyun clock-frequency = <125000000>; 63*4882a593Smuzhiyun clock-output-names = "ext_gmac"; 64*4882a593Smuzhiyun #clock-cells = <0>; 65*4882a593Smuzhiyun }; 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun ir: ir-receiver { 68*4882a593Smuzhiyun compatible = "gpio-ir-receiver"; 69*4882a593Smuzhiyun gpios = <&gpio3 30 GPIO_ACTIVE_LOW>; 70*4882a593Smuzhiyun pinctrl-names = "default"; 71*4882a593Smuzhiyun pinctrl-0 = <&ir_int>; 72*4882a593Smuzhiyun }; 73*4882a593Smuzhiyun 74*4882a593Smuzhiyun keys: gpio-keys { 75*4882a593Smuzhiyun compatible = "gpio-keys"; 76*4882a593Smuzhiyun pinctrl-names = "default"; 77*4882a593Smuzhiyun pinctrl-0 = <&pwr_key>; 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun power { 80*4882a593Smuzhiyun gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; 81*4882a593Smuzhiyun label = "GPIO Power"; 82*4882a593Smuzhiyun linux,code = <KEY_POWER>; 83*4882a593Smuzhiyun wakeup-source; 84*4882a593Smuzhiyun }; 85*4882a593Smuzhiyun }; 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun leds: gpio-leds { 88*4882a593Smuzhiyun compatible = "gpio-leds"; 89*4882a593Smuzhiyun 90*4882a593Smuzhiyun blue { 91*4882a593Smuzhiyun gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; 92*4882a593Smuzhiyun label = "geekbox:blue:led"; 93*4882a593Smuzhiyun default-state = "on"; 94*4882a593Smuzhiyun }; 95*4882a593Smuzhiyun 96*4882a593Smuzhiyun red { 97*4882a593Smuzhiyun gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; 98*4882a593Smuzhiyun label = "geekbox:red:led"; 99*4882a593Smuzhiyun default-state = "off"; 100*4882a593Smuzhiyun }; 101*4882a593Smuzhiyun }; 102*4882a593Smuzhiyun 103*4882a593Smuzhiyun vcc_sys: vcc-sys-regulator { 104*4882a593Smuzhiyun compatible = "regulator-fixed"; 105*4882a593Smuzhiyun regulator-name = "vcc_sys"; 106*4882a593Smuzhiyun regulator-min-microvolt = <5000000>; 107*4882a593Smuzhiyun regulator-max-microvolt = <5000000>; 108*4882a593Smuzhiyun regulator-always-on; 109*4882a593Smuzhiyun regulator-boot-on; 110*4882a593Smuzhiyun }; 111*4882a593Smuzhiyun}; 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun&emmc { 114*4882a593Smuzhiyun status = "okay"; 115*4882a593Smuzhiyun bus-width = <8>; 116*4882a593Smuzhiyun cap-mmc-highspeed; 117*4882a593Smuzhiyun clock-frequency = <150000000>; 118*4882a593Smuzhiyun disable-wp; 119*4882a593Smuzhiyun keep-power-in-suspend; 120*4882a593Smuzhiyun non-removable; 121*4882a593Smuzhiyun num-slots = <1>; 122*4882a593Smuzhiyun vmmc-supply = <&vcc_io>; 123*4882a593Smuzhiyun vqmmc-supply = <&vcc18_flash>; 124*4882a593Smuzhiyun pinctrl-names = "default"; 125*4882a593Smuzhiyun pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>; 126*4882a593Smuzhiyun}; 127*4882a593Smuzhiyun 128*4882a593Smuzhiyun&gmac { 129*4882a593Smuzhiyun status = "okay"; 130*4882a593Smuzhiyun phy-supply = <&vcc_lan>; 131*4882a593Smuzhiyun phy-mode = "rgmii"; 132*4882a593Smuzhiyun clock_in_out = "input"; 133*4882a593Smuzhiyun assigned-clocks = <&cru SCLK_MAC>; 134*4882a593Smuzhiyun assigned-clock-parents = <&ext_gmac>; 135*4882a593Smuzhiyun pinctrl-names = "default"; 136*4882a593Smuzhiyun pinctrl-0 = <&rgmii_pins>; 137*4882a593Smuzhiyun tx_delay = <0x30>; 138*4882a593Smuzhiyun rx_delay = <0x10>; 139*4882a593Smuzhiyun}; 140*4882a593Smuzhiyun 141*4882a593Smuzhiyun&i2c0 { 142*4882a593Smuzhiyun status = "okay"; 143*4882a593Smuzhiyun 144*4882a593Smuzhiyun rk808: pmic@1b { 145*4882a593Smuzhiyun compatible = "rockchip,rk808"; 146*4882a593Smuzhiyun reg = <0x1b>; 147*4882a593Smuzhiyun pinctrl-names = "default"; 148*4882a593Smuzhiyun pinctrl-0 = <&pmic_int>, <&pmic_sleep>; 149*4882a593Smuzhiyun interrupt-parent = <&gpio0>; 150*4882a593Smuzhiyun interrupts = <5 IRQ_TYPE_LEVEL_LOW>; 151*4882a593Smuzhiyun rockchip,system-power-controller; 152*4882a593Smuzhiyun vcc1-supply = <&vcc_sys>; 153*4882a593Smuzhiyun vcc2-supply = <&vcc_sys>; 154*4882a593Smuzhiyun vcc3-supply = <&vcc_sys>; 155*4882a593Smuzhiyun vcc4-supply = <&vcc_sys>; 156*4882a593Smuzhiyun vcc6-supply = <&vcc_sys>; 157*4882a593Smuzhiyun vcc7-supply = <&vcc_sys>; 158*4882a593Smuzhiyun vcc8-supply = <&vcc_io>; 159*4882a593Smuzhiyun vcc9-supply = <&vcc_sys>; 160*4882a593Smuzhiyun vcc10-supply = <&vcc_sys>; 161*4882a593Smuzhiyun vcc11-supply = <&vcc_sys>; 162*4882a593Smuzhiyun vcc12-supply = <&vcc_io>; 163*4882a593Smuzhiyun clock-output-names = "xin32k", "rk808-clkout2"; 164*4882a593Smuzhiyun #clock-cells = <1>; 165*4882a593Smuzhiyun 166*4882a593Smuzhiyun regulators { 167*4882a593Smuzhiyun vdd_cpu: DCDC_REG1 { 168*4882a593Smuzhiyun regulator-always-on; 169*4882a593Smuzhiyun regulator-boot-on; 170*4882a593Smuzhiyun regulator-min-microvolt = <700000>; 171*4882a593Smuzhiyun regulator-max-microvolt = <1500000>; 172*4882a593Smuzhiyun regulator-name = "vdd_cpu"; 173*4882a593Smuzhiyun }; 174*4882a593Smuzhiyun 175*4882a593Smuzhiyun vdd_log: DCDC_REG2 { 176*4882a593Smuzhiyun regulator-always-on; 177*4882a593Smuzhiyun regulator-boot-on; 178*4882a593Smuzhiyun regulator-min-microvolt = <700000>; 179*4882a593Smuzhiyun regulator-max-microvolt = <1500000>; 180*4882a593Smuzhiyun regulator-name = "vdd_log"; 181*4882a593Smuzhiyun }; 182*4882a593Smuzhiyun 183*4882a593Smuzhiyun vcc_ddr: DCDC_REG3 { 184*4882a593Smuzhiyun regulator-always-on; 185*4882a593Smuzhiyun regulator-boot-on; 186*4882a593Smuzhiyun regulator-name = "vcc_ddr"; 187*4882a593Smuzhiyun }; 188*4882a593Smuzhiyun 189*4882a593Smuzhiyun vcc_io: DCDC_REG4 { 190*4882a593Smuzhiyun regulator-always-on; 191*4882a593Smuzhiyun regulator-boot-on; 192*4882a593Smuzhiyun regulator-min-microvolt = <3300000>; 193*4882a593Smuzhiyun regulator-max-microvolt = <3300000>; 194*4882a593Smuzhiyun regulator-name = "vcc_io"; 195*4882a593Smuzhiyun }; 196*4882a593Smuzhiyun 197*4882a593Smuzhiyun vcc18_flash: LDO_REG1 { 198*4882a593Smuzhiyun regulator-always-on; 199*4882a593Smuzhiyun regulator-boot-on; 200*4882a593Smuzhiyun regulator-min-microvolt = <1800000>; 201*4882a593Smuzhiyun regulator-max-microvolt = <1800000>; 202*4882a593Smuzhiyun regulator-name = "vcc18_flash"; 203*4882a593Smuzhiyun }; 204*4882a593Smuzhiyun 205*4882a593Smuzhiyun vcc33_lcd: LDO_REG2 { 206*4882a593Smuzhiyun regulator-always-on; 207*4882a593Smuzhiyun regulator-boot-on; 208*4882a593Smuzhiyun regulator-min-microvolt = <3300000>; 209*4882a593Smuzhiyun regulator-max-microvolt = <3300000>; 210*4882a593Smuzhiyun regulator-name = "vcc33_lcd"; 211*4882a593Smuzhiyun }; 212*4882a593Smuzhiyun 213*4882a593Smuzhiyun vdd_10: LDO_REG3 { 214*4882a593Smuzhiyun regulator-always-on; 215*4882a593Smuzhiyun regulator-boot-on; 216*4882a593Smuzhiyun regulator-min-microvolt = <1000000>; 217*4882a593Smuzhiyun regulator-max-microvolt = <1000000>; 218*4882a593Smuzhiyun regulator-name = "vdd_10"; 219*4882a593Smuzhiyun }; 220*4882a593Smuzhiyun 221*4882a593Smuzhiyun vcca_18: LDO_REG4 { 222*4882a593Smuzhiyun regulator-boot-on; 223*4882a593Smuzhiyun regulator-min-microvolt = <1800000>; 224*4882a593Smuzhiyun regulator-max-microvolt = <1800000>; 225*4882a593Smuzhiyun regulator-name = "vcca_18"; 226*4882a593Smuzhiyun }; 227*4882a593Smuzhiyun 228*4882a593Smuzhiyun vccio_sd: LDO_REG5 { 229*4882a593Smuzhiyun regulator-always-on; 230*4882a593Smuzhiyun regulator-boot-on; 231*4882a593Smuzhiyun regulator-min-microvolt = <1800000>; 232*4882a593Smuzhiyun regulator-max-microvolt = <3300000>; 233*4882a593Smuzhiyun regulator-name = "vccio_sd"; 234*4882a593Smuzhiyun }; 235*4882a593Smuzhiyun 236*4882a593Smuzhiyun vdd10_lcd: LDO_REG6 { 237*4882a593Smuzhiyun regulator-always-on; 238*4882a593Smuzhiyun regulator-boot-on; 239*4882a593Smuzhiyun regulator-min-microvolt = <1000000>; 240*4882a593Smuzhiyun regulator-max-microvolt = <1000000>; 241*4882a593Smuzhiyun regulator-name = "vdd10_lcd"; 242*4882a593Smuzhiyun }; 243*4882a593Smuzhiyun 244*4882a593Smuzhiyun vcc_18: LDO_REG7 { 245*4882a593Smuzhiyun regulator-always-on; 246*4882a593Smuzhiyun regulator-boot-on; 247*4882a593Smuzhiyun regulator-min-microvolt = <1800000>; 248*4882a593Smuzhiyun regulator-max-microvolt = <1800000>; 249*4882a593Smuzhiyun regulator-name = "vcc_18"; 250*4882a593Smuzhiyun }; 251*4882a593Smuzhiyun 252*4882a593Smuzhiyun vcc18_lcd: LDO_REG8 { 253*4882a593Smuzhiyun regulator-always-on; 254*4882a593Smuzhiyun regulator-boot-on; 255*4882a593Smuzhiyun regulator-min-microvolt = <1800000>; 256*4882a593Smuzhiyun regulator-max-microvolt = <1800000>; 257*4882a593Smuzhiyun regulator-name = "vcc18_lcd"; 258*4882a593Smuzhiyun }; 259*4882a593Smuzhiyun 260*4882a593Smuzhiyun vcc_sd: SWITCH_REG1 { 261*4882a593Smuzhiyun regulator-always-on; 262*4882a593Smuzhiyun regulator-boot-on; 263*4882a593Smuzhiyun regulator-name = "vcc_sd"; 264*4882a593Smuzhiyun }; 265*4882a593Smuzhiyun 266*4882a593Smuzhiyun vcc_lan: SWITCH_REG2 { 267*4882a593Smuzhiyun regulator-always-on; 268*4882a593Smuzhiyun regulator-boot-on; 269*4882a593Smuzhiyun regulator-name = "vcc_lan"; 270*4882a593Smuzhiyun }; 271*4882a593Smuzhiyun }; 272*4882a593Smuzhiyun }; 273*4882a593Smuzhiyun}; 274*4882a593Smuzhiyun 275*4882a593Smuzhiyun&pinctrl { 276*4882a593Smuzhiyun ir { 277*4882a593Smuzhiyun ir_int: ir-int { 278*4882a593Smuzhiyun rockchip,pins = <3 30 RK_FUNC_GPIO &pcfg_pull_none>; 279*4882a593Smuzhiyun }; 280*4882a593Smuzhiyun }; 281*4882a593Smuzhiyun 282*4882a593Smuzhiyun keys { 283*4882a593Smuzhiyun pwr_key: pwr-key { 284*4882a593Smuzhiyun rockchip,pins = <0 2 RK_FUNC_GPIO &pcfg_pull_none>; 285*4882a593Smuzhiyun }; 286*4882a593Smuzhiyun }; 287*4882a593Smuzhiyun 288*4882a593Smuzhiyun pmic { 289*4882a593Smuzhiyun pmic_sleep: pmic-sleep { 290*4882a593Smuzhiyun rockchip,pins = <0 0 RK_FUNC_2 &pcfg_pull_none>; 291*4882a593Smuzhiyun }; 292*4882a593Smuzhiyun 293*4882a593Smuzhiyun pmic_int: pmic-int { 294*4882a593Smuzhiyun rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>; 295*4882a593Smuzhiyun }; 296*4882a593Smuzhiyun }; 297*4882a593Smuzhiyun}; 298*4882a593Smuzhiyun 299*4882a593Smuzhiyun&tsadc { 300*4882a593Smuzhiyun status = "okay"; 301*4882a593Smuzhiyun rockchip,hw-tshut-mode = <0>; /* CRU */ 302*4882a593Smuzhiyun rockchip,hw-tshut-polarity = <1>; /* high */ 303*4882a593Smuzhiyun}; 304*4882a593Smuzhiyun 305*4882a593Smuzhiyun&uart2 { 306*4882a593Smuzhiyun status = "okay"; 307*4882a593Smuzhiyun}; 308*4882a593Smuzhiyun 309*4882a593Smuzhiyun&usb_host0_ehci { 310*4882a593Smuzhiyun status = "okay"; 311*4882a593Smuzhiyun}; 312*4882a593Smuzhiyun 313*4882a593Smuzhiyun&usb_otg { 314*4882a593Smuzhiyun status = "okay"; 315*4882a593Smuzhiyun}; 316*4882a593Smuzhiyun 317*4882a593Smuzhiyun&wdt { 318*4882a593Smuzhiyun status = "okay"; 319*4882a593Smuzhiyun}; 320