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