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-key0 { 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-key1 { 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&crypto { 219 status = "okay"; 220}; 221 222&uart2 { 223 status = "okay"; 224}; 225 226&emmc_phy { 227 status = "okay"; 228}; 229 230&pwm0 { 231 status = "okay"; 232}; 233 234&pwm2 { 235 status = "okay"; 236}; 237 238&pwm3 { 239 status = "okay"; 240}; 241 242&saradc { 243 status = "okay"; 244}; 245 246&sdmmc { 247 bus-width = <4>; 248 status = "okay"; 249}; 250 251&sdhci { 252 bus-width = <8>; 253 mmc-hs400-1_8v; 254 mmc-hs400-enhanced-strobe; 255 non-removable; 256 status = "okay"; 257}; 258 259&tcphy0 { 260 status = "okay"; 261}; 262 263&tcphy1 { 264 status = "okay"; 265}; 266 267&usb_host0_ehci { 268 status = "okay"; 269}; 270 271&usb_host0_ohci { 272 status = "okay"; 273}; 274 275&usbdrd3_0 { 276 status = "okay"; 277}; 278 279&usbdrd3_1 { 280 status = "okay"; 281}; 282 283&usbdrd_dwc3_0 { 284 status = "okay"; 285}; 286 287&usbdrd_dwc3_1 { 288 status = "okay"; 289}; 290 291&usb_host1_ehci { 292 status = "okay"; 293}; 294 295&usb_host1_ohci { 296 status = "okay"; 297}; 298 299&i2c0 { 300 status = "okay"; 301 clock-frequency = <400000>; 302 i2c-scl-falling-time-ns = <50>; 303 i2c-scl-rising-time-ns = <100>; 304 305 rk808: pmic@1b { 306 compatible = "rockchip,rk808"; 307 clock-output-names = "xin32k", "wifibt_32kin"; 308 interrupt-parent = <&gpio0>; 309 interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 310 pinctrl-names = "default"; 311 pinctrl-0 = <&pmic_int_l>; 312 reg = <0x1b>; 313 rockchip,system-power-controller; 314 #clock-cells = <1>; 315 status = "okay"; 316 317 vcc12-supply = <&vcc3v3_sys>; 318 319 regulators { 320 vcc33_lcd: SWITCH_REG2 { 321 regulator-always-on; 322 regulator-boot-on; 323 regulator-name = "vcc33_lcd"; 324 }; 325 }; 326 }; 327}; 328 329&mipi_dsi { 330 status = "disabled"; 331 rockchip,panel = <&panel>; 332 display-timings { 333 timing0 { 334 bits-per-pixel = <24>; 335 clock-frequency = <160000000>; 336 hfront-porch = <120>; 337 hsync-len = <20>; 338 hback-porch = <21>; 339 hactive = <1200>; 340 vfront-porch = <21>; 341 vsync-len = <3>; 342 vback-porch = <18>; 343 vactive = <1920>; 344 hsync-active = <0>; 345 vsync-active = <0>; 346 de-active = <1>; 347 pixelclk-active = <0>; 348 }; 349 }; 350}; 351 352&pinctrl { 353 pmic { 354 pmic_int_l: pmic-int-l { 355 rockchip,pins = 356 <1 21 RK_FUNC_GPIO &pcfg_pull_up>; 357 }; 358 359 pmic_dvs2: pmic-dvs2 { 360 rockchip,pins = 361 <1 18 RK_FUNC_GPIO &pcfg_pull_down>; 362 }; 363 }; 364}; 365 366&gmac { 367 phy-supply = <&vcc_phy>; 368 phy-mode = "rgmii"; 369 clock_in_out = "input"; 370 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; 371 snps,reset-active-low; 372 snps,reset-delays-us = <0 10000 50000>; 373 assigned-clocks = <&cru SCLK_RMII_SRC>; 374 assigned-clock-parents = <&clkin_gmac>; 375 pinctrl-names = "default"; 376 pinctrl-0 = <&rgmii_pins>; 377 tx_delay = <0x28>; 378 rx_delay = <0x11>; 379 status = "okay"; 380}; 381 382&backlight { 383 status = "okay"; 384 enable-gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>; 385}; 386 387&route_edp { 388 status = "okay"; 389}; 390 391&edp_in_vopl { 392 status = "disabled"; 393}; 394 395&edp_in_vopb { 396 status = "okay"; 397}; 398 399&edp { 400 status = "okay"; 401 force-hpd; 402 403 ports { 404 port@1 { 405 reg = <1>; 406 407 edp_out: endpoint { 408 remote-endpoint = <&panel_in>; 409 }; 410 }; 411 }; 412}; 413 414&vopb { 415 status = "okay"; 416}; 417