1/* 2 * (C) Copyright 2016 Rockchip Electronics Co., Ltd 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7/dts-v1/; 8#include <dt-bindings/pwm/pwm.h> 9#include <dt-bindings/pinctrl/rockchip.h> 10#include "rk3399.dtsi" 11#include "rk3399-sdram-lpddr3-4GB-1600.dtsi" 12#include "rk3399-u-boot.dtsi" 13#include <linux/media-bus-format.h> 14#include <dt-bindings/input/input.h> 15 16/ { 17 model = "Rockchip RK3399 Evaluation Board"; 18 compatible = "rockchip,rk3399-evb", "rockchip,rk3399", 19 "google,rk3399evb-rev2"; 20 21 /* RK3399 evb board */ 22 rk_key0 { 23 u-boot,dm-pre-reloc; 24 compatible = "rockchip,key"; 25 status = "okay"; 26 io-channels = <&saradc 1>; 27 28 vol-up-key { 29 u-boot,dm-pre-reloc; 30 linux,code = <KEY_VOLUMEUP>; 31 label = "volume up"; 32 rockchip,adc_value = <1>; 33 }; 34 }; 35 36 /* RK3399PRO evb board */ 37 rk_key1 { 38 u-boot,dm-pre-reloc; 39 compatible = "rockchip,key"; 40 status = "okay"; 41 io-channels = <&saradc 2>; 42 43 vol-up-key { 44 u-boot,dm-pre-reloc; 45 linux,code = <KEY_VOLUMEUP>; 46 label = "volume up"; 47 rockchip,adc_value = <10>; 48 }; 49 }; 50 51 vdd_center: vdd-center { 52 compatible = "pwm-regulator"; 53 pwms = <&pwm3 0 25000 1>; 54 regulator-name = "vdd_center"; 55 regulator-min-microvolt = <800000>; 56 regulator-max-microvolt = <1400000>; 57 regulator-init-microvolt = <950000>; 58 regulator-always-on; 59 regulator-boot-on; 60 status = "okay"; 61 }; 62 63 vccsys: vccsys { 64 compatible = "regulator-fixed"; 65 regulator-name = "vccsys"; 66 regulator-boot-on; 67 regulator-always-on; 68 }; 69 70 vcc3v3_sys: vcc3v3-sys { 71 compatible = "regulator-fixed"; 72 regulator-name = "vcc3v3_sys"; 73 regulator-always-on; 74 regulator-boot-on; 75 regulator-min-microvolt = <3300000>; 76 regulator-max-microvolt = <3300000>; 77 }; 78 79 vcc_phy: vcc-phy-regulator { 80 compatible = "regulator-fixed"; 81 regulator-name = "vcc_phy"; 82 regulator-always-on; 83 regulator-boot-on; 84 }; 85 86 vcc5v0_host: vcc5v0-host-en { 87 compatible = "regulator-fixed"; 88 regulator-name = "vcc5v0_host"; 89 gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>; 90 regulator-min-microvolt = <5000000>; 91 regulator-max-microvolt = <5000000>; 92 regulator-always-on; 93 regulator-boot-on; 94 }; 95 96 vcc5v0_typec0: vcc5v0-typec0-en { 97 compatible = "regulator-fixed"; 98 regulator-name = "vcc5v0_typec0"; 99 gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>; 100 }; 101 102 vcc5v0_typec1: vcc5v0-typec1-en { 103 compatible = "regulator-fixed"; 104 regulator-name = "vcc5v0_typec1"; 105 gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>; 106 }; 107 108 clkin_gmac: external-gmac-clock { 109 compatible = "fixed-clock"; 110 clock-frequency = <125000000>; 111 clock-output-names = "clkin_gmac"; 112 #clock-cells = <0>; 113 }; 114 115 backlight: backlight { 116 compatible = "pwm-backlight"; 117 power-supply = <&vccsys>; 118 enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; 119 brightness-levels = < 120 0 1 2 3 4 5 6 7 121 8 9 10 11 12 13 14 15 122 16 17 18 19 20 21 22 23 123 24 25 26 27 28 29 30 31 124 32 33 34 35 36 37 38 39 125 40 41 42 43 44 45 46 47 126 48 49 50 51 52 53 54 55 127 56 57 58 59 60 61 62 63 128 64 65 66 67 68 69 70 71 129 72 73 74 75 76 77 78 79 130 80 81 82 83 84 85 86 87 131 88 89 90 91 92 93 94 95 132 96 97 98 99 100 101 102 103 133 104 105 106 107 108 109 110 111 134 112 113 114 115 116 117 118 119 135 120 121 122 123 124 125 126 127 136 128 129 130 131 132 133 134 135 137 136 137 138 139 140 141 142 143 138 144 145 146 147 148 149 150 151 139 152 153 154 155 156 157 158 159 140 160 161 162 163 164 165 166 167 141 168 169 170 171 172 173 174 175 142 176 177 178 179 180 181 182 183 143 184 185 186 187 188 189 190 191 144 192 193 194 195 196 197 198 199 145 200 201 202 203 204 205 206 207 146 208 209 210 211 212 213 214 215 147 216 217 218 219 220 221 222 223 148 224 225 226 227 228 229 230 231 149 232 233 234 235 236 237 238 239 150 240 241 242 243 244 245 246 247 151 248 249 250 251 252 253 254 255>; 152 default-brightness-level = <200>; 153 pwms = <&pwm0 0 25000 0>; 154 pinctrl-names = "default"; 155 pinctrl-0 = <&pwm0_pin>; 156 pwm-delay-us = <10000>; 157 status = "disabled"; 158 }; 159 160 vcc5v0_sys: vcc5v0-sys { 161 compatible = "regulator-fixed"; 162 regulator-name = "vcc5v0_sys"; 163 regulator-always-on; 164 regulator-boot-on; 165 regulator-min-microvolt = <5000000>; 166 regulator-max-microvolt = <5000000>; 167 }; 168 169 vcc_lcd: vcc-lcd { 170 compatible = "regulator-fixed"; 171 regulator-name = "vcc_lcd"; 172 gpio = <&gpio4 30 GPIO_ACTIVE_HIGH>; 173 startup-delay-us = <20000>; 174 enable-active-high; 175 regulator-min-microvolt = <3300000>; 176 regulator-max-microvolt = <3300000>; 177 regulator-boot-on; 178 vin-supply = <&vcc5v0_sys>; 179 }; 180 181 panel: panel { 182 compatible = "simple-panel"; 183 backlight = <&backlight>; 184 power-supply = <&vcc_lcd>; 185 enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; 186 prepare-delay-ms = <20>; 187 enable-delay-ms = <20>; 188 189 display-timings { 190 native-mode = <&timing0>; 191 192 timing0: timing0 { 193 clock-frequency = <200000000>; 194 hactive = <1536>; 195 vactive = <2048>; 196 hfront-porch = <12>; 197 hsync-len = <16>; 198 hback-porch = <48>; 199 vfront-porch = <8>; 200 vsync-len = <4>; 201 vback-porch = <8>; 202 hsync-active = <0>; 203 vsync-active = <0>; 204 de-active = <0>; 205 pixelclk-active = <0>; 206 }; 207 }; 208 209 ports { 210 panel_in: endpoint { 211 remote-endpoint = <&edp_out>; 212 }; 213 }; 214 }; 215 216}; 217 218&uart2 { 219 status = "okay"; 220}; 221 222&emmc_phy { 223 status = "okay"; 224}; 225 226&pwm0 { 227 status = "okay"; 228}; 229 230&pwm2 { 231 status = "okay"; 232}; 233 234&pwm3 { 235 status = "okay"; 236}; 237 238&saradc { 239 status = "okay"; 240}; 241 242&sdmmc { 243 bus-width = <4>; 244 status = "okay"; 245}; 246 247&sdhci { 248 bus-width = <8>; 249 mmc-hs400-1_8v; 250 mmc-hs400-enhanced-strobe; 251 non-removable; 252 status = "okay"; 253}; 254 255&usb_host0_ehci { 256 status = "okay"; 257}; 258 259&usb_host0_ohci { 260 status = "okay"; 261}; 262 263&dwc3_typec0 { 264 vbus-supply = <&vcc5v0_typec0>; 265 status = "okay"; 266}; 267 268&usb_host1_ehci { 269 status = "okay"; 270}; 271 272&usb_host1_ohci { 273 status = "okay"; 274}; 275 276&dwc3_typec1 { 277 vbus-supply = <&vcc5v0_typec1>; 278 status = "okay"; 279}; 280 281&i2c0 { 282 status = "okay"; 283 clock-frequency = <400000>; 284 i2c-scl-falling-time-ns = <50>; 285 i2c-scl-rising-time-ns = <100>; 286 287 rk808: pmic@1b { 288 compatible = "rockchip,rk808"; 289 clock-output-names = "xin32k", "wifibt_32kin"; 290 interrupt-parent = <&gpio0>; 291 interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 292 pinctrl-names = "default"; 293 pinctrl-0 = <&pmic_int_l>; 294 reg = <0x1b>; 295 rockchip,system-power-controller; 296 #clock-cells = <1>; 297 status = "okay"; 298 299 vcc12-supply = <&vcc3v3_sys>; 300 301 regulators { 302 vcc33_lcd: SWITCH_REG2 { 303 regulator-always-on; 304 regulator-boot-on; 305 regulator-name = "vcc33_lcd"; 306 }; 307 }; 308 }; 309}; 310 311&mipi_dsi { 312 status = "disabled"; 313 rockchip,panel = <&panel>; 314 display-timings { 315 timing0 { 316 bits-per-pixel = <24>; 317 clock-frequency = <160000000>; 318 hfront-porch = <120>; 319 hsync-len = <20>; 320 hback-porch = <21>; 321 hactive = <1200>; 322 vfront-porch = <21>; 323 vsync-len = <3>; 324 vback-porch = <18>; 325 vactive = <1920>; 326 hsync-active = <0>; 327 vsync-active = <0>; 328 de-active = <1>; 329 pixelclk-active = <0>; 330 }; 331 }; 332}; 333 334&pinctrl { 335 pmic { 336 pmic_int_l: pmic-int-l { 337 rockchip,pins = 338 <1 21 RK_FUNC_GPIO &pcfg_pull_up>; 339 }; 340 341 pmic_dvs2: pmic-dvs2 { 342 rockchip,pins = 343 <1 18 RK_FUNC_GPIO &pcfg_pull_down>; 344 }; 345 }; 346}; 347 348&gmac { 349 phy-supply = <&vcc_phy>; 350 phy-mode = "rgmii"; 351 clock_in_out = "input"; 352 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; 353 snps,reset-active-low; 354 snps,reset-delays-us = <0 10000 50000>; 355 assigned-clocks = <&cru SCLK_RMII_SRC>; 356 assigned-clock-parents = <&clkin_gmac>; 357 pinctrl-names = "default"; 358 pinctrl-0 = <&rgmii_pins>; 359 tx_delay = <0x28>; 360 rx_delay = <0x11>; 361 status = "okay"; 362}; 363 364&backlight { 365 status = "okay"; 366 enable-gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>; 367}; 368 369&route_edp { 370 status = "okay"; 371}; 372 373&edp_in_vopl { 374 status = "disabled"; 375}; 376 377&edp_in_vopb { 378 status = "okay"; 379}; 380 381&edp { 382 status = "okay"; 383 force-hpd; 384 385 ports { 386 port@1 { 387 reg = <1>; 388 389 edp_out: endpoint { 390 remote-endpoint = <&panel_in>; 391 }; 392 }; 393 }; 394}; 395 396&vopb { 397 status = "okay"; 398}; 399