1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2016 Andreas Färber 4 */ 5 6/dts-v1/; 7#include "rk3368.dtsi" 8#include <dt-bindings/input/input.h> 9 10/ { 11 model = "GeekBox"; 12 compatible = "geekbuying,geekbox", "rockchip,rk3368"; 13 14 chosen { 15 stdout-path = "serial2:115200n8"; 16 }; 17 18 memory@0 { 19 device_type = "memory"; 20 reg = <0x0 0x0 0x0 0x80000000>; 21 }; 22 23 ext_gmac: gmac-clk { 24 compatible = "fixed-clock"; 25 clock-frequency = <125000000>; 26 clock-output-names = "ext_gmac"; 27 #clock-cells = <0>; 28 }; 29 30 ir: ir-receiver { 31 compatible = "gpio-ir-receiver"; 32 gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_LOW>; 33 pinctrl-names = "default"; 34 pinctrl-0 = <&ir_int>; 35 }; 36 37 keys: gpio-keys { 38 compatible = "gpio-keys"; 39 pinctrl-names = "default"; 40 pinctrl-0 = <&pwr_key>; 41 42 power { 43 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; 44 label = "GPIO Power"; 45 linux,code = <KEY_POWER>; 46 wakeup-source; 47 }; 48 }; 49 50 leds: gpio-leds { 51 compatible = "gpio-leds"; 52 53 blue { 54 gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_HIGH>; 55 label = "geekbox:blue:led"; 56 default-state = "on"; 57 }; 58 59 red { 60 gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>; 61 label = "geekbox:red:led"; 62 default-state = "off"; 63 }; 64 }; 65 66 vcc_sys: vcc-sys-regulator { 67 compatible = "regulator-fixed"; 68 regulator-name = "vcc_sys"; 69 regulator-min-microvolt = <5000000>; 70 regulator-max-microvolt = <5000000>; 71 regulator-always-on; 72 regulator-boot-on; 73 }; 74}; 75 76&emmc { 77 status = "okay"; 78 bus-width = <8>; 79 cap-mmc-highspeed; 80 clock-frequency = <150000000>; 81 non-removable; 82 vmmc-supply = <&vcc_io>; 83 vqmmc-supply = <&vcc18_flash>; 84 pinctrl-names = "default"; 85 pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>; 86}; 87 88&gmac { 89 status = "okay"; 90 phy-supply = <&vcc_lan>; 91 phy-mode = "rgmii"; 92 clock_in_out = "input"; 93 assigned-clocks = <&cru SCLK_MAC>; 94 assigned-clock-parents = <&ext_gmac>; 95 pinctrl-names = "default"; 96 pinctrl-0 = <&rgmii_pins>; 97 tx_delay = <0x30>; 98 rx_delay = <0x10>; 99}; 100 101&i2c0 { 102 status = "okay"; 103 104 rk808: pmic@1b { 105 compatible = "rockchip,rk808"; 106 reg = <0x1b>; 107 pinctrl-names = "default"; 108 pinctrl-0 = <&pmic_int>, <&pmic_sleep>; 109 interrupt-parent = <&gpio0>; 110 interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>; 111 rockchip,system-power-controller; 112 vcc1-supply = <&vcc_sys>; 113 vcc2-supply = <&vcc_sys>; 114 vcc3-supply = <&vcc_sys>; 115 vcc4-supply = <&vcc_sys>; 116 vcc6-supply = <&vcc_sys>; 117 vcc7-supply = <&vcc_sys>; 118 vcc8-supply = <&vcc_io>; 119 vcc9-supply = <&vcc_sys>; 120 vcc10-supply = <&vcc_sys>; 121 vcc11-supply = <&vcc_sys>; 122 vcc12-supply = <&vcc_io>; 123 clock-output-names = "xin32k", "rk808-clkout2"; 124 #clock-cells = <1>; 125 126 regulators { 127 vdd_cpu: DCDC_REG1 { 128 regulator-always-on; 129 regulator-boot-on; 130 regulator-min-microvolt = <700000>; 131 regulator-max-microvolt = <1500000>; 132 regulator-name = "vdd_cpu"; 133 }; 134 135 vdd_log: DCDC_REG2 { 136 regulator-always-on; 137 regulator-boot-on; 138 regulator-min-microvolt = <700000>; 139 regulator-max-microvolt = <1500000>; 140 regulator-name = "vdd_log"; 141 }; 142 143 vcc_ddr: DCDC_REG3 { 144 regulator-always-on; 145 regulator-boot-on; 146 regulator-name = "vcc_ddr"; 147 }; 148 149 vcc_io: DCDC_REG4 { 150 regulator-always-on; 151 regulator-boot-on; 152 regulator-min-microvolt = <3300000>; 153 regulator-max-microvolt = <3300000>; 154 regulator-name = "vcc_io"; 155 }; 156 157 vcc18_flash: LDO_REG1 { 158 regulator-always-on; 159 regulator-boot-on; 160 regulator-min-microvolt = <1800000>; 161 regulator-max-microvolt = <1800000>; 162 regulator-name = "vcc18_flash"; 163 }; 164 165 vcc33_lcd: LDO_REG2 { 166 regulator-always-on; 167 regulator-boot-on; 168 regulator-min-microvolt = <3300000>; 169 regulator-max-microvolt = <3300000>; 170 regulator-name = "vcc33_lcd"; 171 }; 172 173 vdd_10: LDO_REG3 { 174 regulator-always-on; 175 regulator-boot-on; 176 regulator-min-microvolt = <1000000>; 177 regulator-max-microvolt = <1000000>; 178 regulator-name = "vdd_10"; 179 }; 180 181 vcca_18: LDO_REG4 { 182 regulator-boot-on; 183 regulator-min-microvolt = <1800000>; 184 regulator-max-microvolt = <1800000>; 185 regulator-name = "vcca_18"; 186 }; 187 188 vccio_sd: LDO_REG5 { 189 regulator-always-on; 190 regulator-boot-on; 191 regulator-min-microvolt = <1800000>; 192 regulator-max-microvolt = <3300000>; 193 regulator-name = "vccio_sd"; 194 }; 195 196 vdd10_lcd: LDO_REG6 { 197 regulator-always-on; 198 regulator-boot-on; 199 regulator-min-microvolt = <1000000>; 200 regulator-max-microvolt = <1000000>; 201 regulator-name = "vdd10_lcd"; 202 }; 203 204 vcc_18: LDO_REG7 { 205 regulator-always-on; 206 regulator-boot-on; 207 regulator-min-microvolt = <1800000>; 208 regulator-max-microvolt = <1800000>; 209 regulator-name = "vcc_18"; 210 }; 211 212 vcc18_lcd: LDO_REG8 { 213 regulator-always-on; 214 regulator-boot-on; 215 regulator-min-microvolt = <1800000>; 216 regulator-max-microvolt = <1800000>; 217 regulator-name = "vcc18_lcd"; 218 }; 219 220 vcc_sd: SWITCH_REG1 { 221 regulator-name = "vcc_sd"; 222 }; 223 224 vcc_lan: SWITCH_REG2 { 225 regulator-always-on; 226 regulator-boot-on; 227 regulator-name = "vcc_lan"; 228 }; 229 }; 230 }; 231}; 232 233&pinctrl { 234 ir { 235 ir_int: ir-int { 236 rockchip,pins = <3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; 237 }; 238 }; 239 240 keys { 241 pwr_key: pwr-key { 242 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 243 }; 244 }; 245 246 pmic { 247 pmic_sleep: pmic-sleep { 248 rockchip,pins = <0 RK_PA0 2 &pcfg_pull_none>; 249 }; 250 251 pmic_int: pmic-int { 252 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>; 253 }; 254 }; 255}; 256 257&tsadc { 258 status = "okay"; 259 rockchip,hw-tshut-mode = <0>; /* CRU */ 260 rockchip,hw-tshut-polarity = <1>; /* high */ 261}; 262 263&uart2 { 264 status = "okay"; 265}; 266 267&usb_host0_ehci { 268 status = "okay"; 269}; 270 271&usb_otg { 272 status = "okay"; 273}; 274 275&wdt { 276 status = "okay"; 277}; 278