Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Kever Yang | 777c834 | 2016-07-19 21:16:58 +0800 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2016 Rockchip Electronics Co., Ltd |
Kever Yang | 777c834 | 2016-07-19 21:16:58 +0800 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | /dts-v1/; |
| 7 | #include <dt-bindings/pwm/pwm.h> |
Kever Yang | fd9884e | 2017-05-01 16:16:01 -0600 | [diff] [blame] | 8 | #include <dt-bindings/pinctrl/rockchip.h> |
Kever Yang | 777c834 | 2016-07-19 21:16:58 +0800 | [diff] [blame] | 9 | #include "rk3399.dtsi" |
| 10 | |
| 11 | / { |
| 12 | model = "Rockchip RK3399 Evaluation Board"; |
| 13 | compatible = "rockchip,rk3399-evb", "rockchip,rk3399", |
| 14 | "google,rk3399evb-rev2"; |
| 15 | |
| 16 | chosen { |
| 17 | stdout-path = &uart2; |
Kever Yang | f777df3 | 2017-12-20 10:40:40 +0800 | [diff] [blame] | 18 | u-boot,spl-boot-order = \ |
| 19 | &sdhci, &sdmmc; |
Kever Yang | 777c834 | 2016-07-19 21:16:58 +0800 | [diff] [blame] | 20 | }; |
| 21 | |
| 22 | vdd_center: vdd-center { |
| 23 | compatible = "pwm-regulator"; |
Kever Yang | 26b1edf | 2017-04-18 17:06:21 +0800 | [diff] [blame] | 24 | pwms = <&pwm3 0 25000 1>; |
Kever Yang | 777c834 | 2016-07-19 21:16:58 +0800 | [diff] [blame] | 25 | regulator-name = "vdd_center"; |
| 26 | regulator-min-microvolt = <800000>; |
| 27 | regulator-max-microvolt = <1400000>; |
Kever Yang | c553de9 | 2016-09-23 15:57:22 +0800 | [diff] [blame] | 28 | regulator-init-microvolt = <950000>; |
Kever Yang | 777c834 | 2016-07-19 21:16:58 +0800 | [diff] [blame] | 29 | regulator-always-on; |
| 30 | regulator-boot-on; |
| 31 | status = "okay"; |
| 32 | }; |
| 33 | |
eric.gao@rock-chips.com | d3cf9eb | 2017-04-10 10:41:46 +0800 | [diff] [blame] | 34 | vccsys: vccsys { |
| 35 | compatible = "regulator-fixed"; |
| 36 | regulator-name = "vccsys"; |
| 37 | regulator-boot-on; |
| 38 | regulator-always-on; |
| 39 | }; |
| 40 | |
Kever Yang | 777c834 | 2016-07-19 21:16:58 +0800 | [diff] [blame] | 41 | vcc3v3_sys: vcc3v3-sys { |
| 42 | compatible = "regulator-fixed"; |
| 43 | regulator-name = "vcc3v3_sys"; |
| 44 | regulator-always-on; |
| 45 | regulator-boot-on; |
| 46 | regulator-min-microvolt = <3300000>; |
| 47 | regulator-max-microvolt = <3300000>; |
| 48 | }; |
| 49 | |
| 50 | vcc_phy: vcc-phy-regulator { |
| 51 | compatible = "regulator-fixed"; |
| 52 | regulator-name = "vcc_phy"; |
| 53 | regulator-always-on; |
| 54 | regulator-boot-on; |
| 55 | }; |
Kever Yang | b850d92 | 2016-08-24 12:02:21 +0800 | [diff] [blame] | 56 | |
| 57 | vcc5v0_host: vcc5v0-host-en { |
| 58 | compatible = "regulator-fixed"; |
| 59 | regulator-name = "vcc5v0_host"; |
| 60 | gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>; |
| 61 | }; |
eric.gao@rock-chips.com | d3cf9eb | 2017-04-10 10:41:46 +0800 | [diff] [blame] | 62 | |
Meng Dongyang | f6f47c2 | 2017-06-28 19:26:32 +0800 | [diff] [blame] | 63 | vcc5v0_typec0: vcc5v0-typec0-en { |
| 64 | compatible = "regulator-fixed"; |
| 65 | regulator-name = "vcc5v0_typec0"; |
| 66 | gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>; |
| 67 | }; |
| 68 | |
| 69 | vcc5v0_typec1: vcc5v0-typec1-en { |
| 70 | compatible = "regulator-fixed"; |
| 71 | regulator-name = "vcc5v0_typec1"; |
| 72 | gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>; |
| 73 | }; |
| 74 | |
Kever Yang | fd9884e | 2017-05-01 16:16:01 -0600 | [diff] [blame] | 75 | clkin_gmac: external-gmac-clock { |
| 76 | compatible = "fixed-clock"; |
| 77 | clock-frequency = <125000000>; |
| 78 | clock-output-names = "clkin_gmac"; |
| 79 | #clock-cells = <0>; |
| 80 | }; |
Eric Gao | df8fe99 | 2017-05-02 18:23:56 +0800 | [diff] [blame] | 81 | |
| 82 | backlight: backlight { |
| 83 | compatible = "pwm-backlight"; |
| 84 | power-supply = <&vccsys>; |
| 85 | enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; |
| 86 | brightness-levels = < |
| 87 | 0 1 2 3 4 5 6 7 |
| 88 | 8 9 10 11 12 13 14 15 |
| 89 | 16 17 18 19 20 21 22 23 |
| 90 | 24 25 26 27 28 29 30 31 |
| 91 | 32 33 34 35 36 37 38 39 |
| 92 | 40 41 42 43 44 45 46 47 |
| 93 | 48 49 50 51 52 53 54 55 |
| 94 | 56 57 58 59 60 61 62 63 |
| 95 | 64 65 66 67 68 69 70 71 |
| 96 | 72 73 74 75 76 77 78 79 |
| 97 | 80 81 82 83 84 85 86 87 |
| 98 | 88 89 90 91 92 93 94 95 |
| 99 | 96 97 98 99 100 101 102 103 |
| 100 | 104 105 106 107 108 109 110 111 |
| 101 | 112 113 114 115 116 117 118 119 |
| 102 | 120 121 122 123 124 125 126 127 |
| 103 | 128 129 130 131 132 133 134 135 |
| 104 | 136 137 138 139 140 141 142 143 |
| 105 | 144 145 146 147 148 149 150 151 |
| 106 | 152 153 154 155 156 157 158 159 |
| 107 | 160 161 162 163 164 165 166 167 |
| 108 | 168 169 170 171 172 173 174 175 |
| 109 | 176 177 178 179 180 181 182 183 |
| 110 | 184 185 186 187 188 189 190 191 |
| 111 | 192 193 194 195 196 197 198 199 |
| 112 | 200 201 202 203 204 205 206 207 |
| 113 | 208 209 210 211 212 213 214 215 |
| 114 | 216 217 218 219 220 221 222 223 |
| 115 | 224 225 226 227 228 229 230 231 |
| 116 | 232 233 234 235 236 237 238 239 |
| 117 | 240 241 242 243 244 245 246 247 |
| 118 | 248 249 250 251 252 253 254 255>; |
| 119 | default-brightness-level = <200>; |
| 120 | pwms = <&pwm0 0 25000 0>; |
| 121 | pinctrl-names = "default"; |
| 122 | pinctrl-0 = <&pwm0_pin>; |
| 123 | pwm-delay-us = <10000>; |
| 124 | status = "disabled"; |
| 125 | }; |
| 126 | |
| 127 | panel:panel { |
| 128 | compatible = "simple-panel"; |
| 129 | power-supply = <&vcc33_lcd>; |
| 130 | backlight = <&backlight>; |
| 131 | /*enable-gpios = <&gpio4 18 GPIO_ACTIVE_HIGH>;*/ |
| 132 | status = "disabled"; |
| 133 | }; |
Kever Yang | 777c834 | 2016-07-19 21:16:58 +0800 | [diff] [blame] | 134 | }; |
| 135 | |
| 136 | &emmc_phy { |
| 137 | status = "okay"; |
| 138 | }; |
| 139 | |
| 140 | &pwm0 { |
| 141 | status = "okay"; |
| 142 | }; |
| 143 | |
| 144 | &pwm2 { |
| 145 | status = "okay"; |
| 146 | }; |
| 147 | |
| 148 | &pwm3 { |
| 149 | status = "okay"; |
| 150 | }; |
| 151 | |
David Wu | 3b4cab1 | 2017-09-20 14:47:19 +0800 | [diff] [blame] | 152 | &saradc { |
| 153 | status = "okay"; |
| 154 | }; |
| 155 | |
Kever Yang | da8ff82 | 2016-08-04 11:44:59 +0800 | [diff] [blame] | 156 | &sdmmc { |
Kever Yang | a82426e | 2017-02-22 16:56:36 +0800 | [diff] [blame] | 157 | bus-width = <4>; |
Kever Yang | da8ff82 | 2016-08-04 11:44:59 +0800 | [diff] [blame] | 158 | status = "okay"; |
| 159 | }; |
| 160 | |
Kever Yang | 777c834 | 2016-07-19 21:16:58 +0800 | [diff] [blame] | 161 | &sdhci { |
| 162 | bus-width = <8>; |
| 163 | mmc-hs400-1_8v; |
| 164 | mmc-hs400-enhanced-strobe; |
| 165 | non-removable; |
| 166 | status = "okay"; |
| 167 | }; |
| 168 | |
| 169 | &uart2 { |
| 170 | status = "okay"; |
| 171 | }; |
| 172 | |
| 173 | &usb_host0_ehci { |
| 174 | status = "okay"; |
| 175 | }; |
| 176 | |
| 177 | &usb_host0_ohci { |
| 178 | status = "okay"; |
| 179 | }; |
| 180 | |
MengDongyang | fa5e2d1 | 2016-08-24 12:02:20 +0800 | [diff] [blame] | 181 | &dwc3_typec0 { |
Meng Dongyang | f6f47c2 | 2017-06-28 19:26:32 +0800 | [diff] [blame] | 182 | vbus-supply = <&vcc5v0_typec0>; |
MengDongyang | fa5e2d1 | 2016-08-24 12:02:20 +0800 | [diff] [blame] | 183 | status = "okay"; |
| 184 | }; |
| 185 | |
Kever Yang | 777c834 | 2016-07-19 21:16:58 +0800 | [diff] [blame] | 186 | &usb_host1_ehci { |
| 187 | status = "okay"; |
| 188 | }; |
| 189 | |
| 190 | &usb_host1_ohci { |
| 191 | status = "okay"; |
| 192 | }; |
| 193 | |
MengDongyang | fa5e2d1 | 2016-08-24 12:02:20 +0800 | [diff] [blame] | 194 | &dwc3_typec1 { |
Meng Dongyang | f6f47c2 | 2017-06-28 19:26:32 +0800 | [diff] [blame] | 195 | vbus-supply = <&vcc5v0_typec1>; |
MengDongyang | fa5e2d1 | 2016-08-24 12:02:20 +0800 | [diff] [blame] | 196 | status = "okay"; |
| 197 | }; |
| 198 | |
eric.gao@rock-chips.com | d3cf9eb | 2017-04-10 10:41:46 +0800 | [diff] [blame] | 199 | &i2c0 { |
| 200 | status = "okay"; |
| 201 | clock-frequency = <400000>; |
| 202 | i2c-scl-falling-time-ns = <50>; |
| 203 | i2c-scl-rising-time-ns = <100>; |
| 204 | u-boot,dm-pre-reloc; |
| 205 | |
| 206 | rk808: pmic@1b { |
| 207 | compatible = "rockchip,rk808"; |
| 208 | clock-output-names = "xin32k", "wifibt_32kin"; |
| 209 | interrupt-parent = <&gpio0>; |
| 210 | interrupts = <4 IRQ_TYPE_LEVEL_LOW>; |
| 211 | pinctrl-names = "default"; |
| 212 | pinctrl-0 = <&pmic_int_l>; |
| 213 | reg = <0x1b>; |
| 214 | rockchip,system-power-controller; |
| 215 | #clock-cells = <1>; |
| 216 | u-boot,dm-pre-reloc; |
| 217 | status = "okay"; |
| 218 | |
| 219 | vcc12-supply = <&vcc3v3_sys>; |
Eric Gao | df8fe99 | 2017-05-02 18:23:56 +0800 | [diff] [blame] | 220 | |
eric.gao@rock-chips.com | d3cf9eb | 2017-04-10 10:41:46 +0800 | [diff] [blame] | 221 | regulators { |
| 222 | vcc33_lcd: SWITCH_REG2 { |
| 223 | regulator-always-on; |
| 224 | regulator-boot-on; |
| 225 | regulator-name = "vcc33_lcd"; |
| 226 | }; |
| 227 | }; |
| 228 | }; |
| 229 | }; |
| 230 | |
Eric Gao | df8fe99 | 2017-05-02 18:23:56 +0800 | [diff] [blame] | 231 | &mipi_dsi { |
| 232 | status = "disabled"; |
| 233 | rockchip,panel = <&panel>; |
| 234 | display-timings { |
| 235 | timing0 { |
| 236 | bits-per-pixel = <24>; |
| 237 | clock-frequency = <160000000>; |
| 238 | hfront-porch = <120>; |
| 239 | hsync-len = <20>; |
| 240 | hback-porch = <21>; |
| 241 | hactive = <1200>; |
| 242 | vfront-porch = <21>; |
| 243 | vsync-len = <3>; |
| 244 | vback-porch = <18>; |
| 245 | vactive = <1920>; |
| 246 | hsync-active = <0>; |
| 247 | vsync-active = <0>; |
| 248 | de-active = <1>; |
| 249 | pixelclk-active = <0>; |
| 250 | }; |
| 251 | }; |
| 252 | }; |
| 253 | |
Kever Yang | 777c834 | 2016-07-19 21:16:58 +0800 | [diff] [blame] | 254 | &pinctrl { |
| 255 | pmic { |
| 256 | pmic_int_l: pmic-int-l { |
| 257 | rockchip,pins = |
| 258 | <1 21 RK_FUNC_GPIO &pcfg_pull_up>; |
| 259 | }; |
| 260 | |
| 261 | pmic_dvs2: pmic-dvs2 { |
| 262 | rockchip,pins = |
| 263 | <1 18 RK_FUNC_GPIO &pcfg_pull_down>; |
| 264 | }; |
| 265 | }; |
| 266 | }; |
Kever Yang | fd9884e | 2017-05-01 16:16:01 -0600 | [diff] [blame] | 267 | |
| 268 | &gmac { |
| 269 | phy-supply = <&vcc_phy>; |
| 270 | phy-mode = "rgmii"; |
| 271 | clock_in_out = "input"; |
| 272 | snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; |
| 273 | snps,reset-active-low; |
| 274 | snps,reset-delays-us = <0 10000 50000>; |
| 275 | assigned-clocks = <&cru SCLK_RMII_SRC>; |
| 276 | assigned-clock-parents = <&clkin_gmac>; |
| 277 | pinctrl-names = "default"; |
| 278 | pinctrl-0 = <&rgmii_pins>; |
David Wu | dc5b201 | 2018-01-13 13:53:54 +0800 | [diff] [blame] | 279 | tx_delay = <0x28>; |
| 280 | rx_delay = <0x11>; |
Kever Yang | fd9884e | 2017-05-01 16:16:01 -0600 | [diff] [blame] | 281 | status = "okay"; |
| 282 | }; |