1/* 2 * (C) Copyright 2017 Rockchip Electronics Co., Ltd 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7/dts-v1/; 8 9#include "rk3128.dtsi" 10#include "rk3128-u-boot.dtsi" 11#include <dt-bindings/input/input.h> 12 13/ { 14 model = "Rockchip RK3126 Evaluation board"; 15 compatible = "rockchip,rk3128-evb", "rockchip,rk3128"; 16 17 chosen { 18 stdout-path = &uart2; 19 }; 20 21 vcc5v0_otg: vcc5v0-otg-drv { 22 compatible = "regulator-fixed"; 23 regulator-name = "vcc5v0_otg"; 24 gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>; 25 pinctrl-names = "default"; 26 pinctrl-0 = <&otg_vbus_drv>; 27 regulator-min-microvolt = <5000000>; 28 regulator-max-microvolt = <5000000>; 29 }; 30 31 vcc5v0_host: vcc5v0-host-drv { 32 compatible = "regulator-fixed"; 33 regulator-name = "vcc5v0_host"; 34 gpio = <&gpio2 23 GPIO_ACTIVE_HIGH>; 35 pinctrl-names = "default"; 36 pinctrl-0 = <&host_vbus_drv>; 37 regulator-min-microvolt = <5000000>; 38 regulator-max-microvolt = <5000000>; 39 regulator-always-on; 40 }; 41 42 vcc_backlight: vcc-backlight { 43 compatible = "regulator-fixed"; 44 regulator-name = "vcc_backlight"; 45 regulator-min-microvolt = <5000000>; 46 regulator-max-microvolt = <5000000>; 47 regulator-always-on; 48 }; 49 50 backlight: backlight { 51 compatible = "pwm-backlight"; 52 brightness-levels = < 53 0 1 2 3 4 5 6 7 54 8 9 10 11 12 13 14 15 55 16 17 18 19 20 21 22 23 56 24 25 26 27 28 29 30 31 57 32 33 34 35 36 37 38 39 58 40 41 42 43 44 45 46 47 59 48 49 50 51 52 53 54 55 60 56 57 58 59 60 61 62 63 61 64 65 66 67 68 69 70 71 62 72 73 74 75 76 77 78 79 63 80 81 82 83 84 85 86 87 64 88 89 90 91 92 93 94 95 65 96 97 98 99 100 101 102 103 66 104 105 106 107 108 109 110 111 67 112 113 114 115 116 117 118 119 68 120 121 122 123 124 125 126 127 69 128 129 130 131 132 133 134 135 70 136 137 138 139 140 141 142 143 71 144 145 146 147 148 149 150 151 72 152 153 154 155 156 157 158 159 73 160 161 162 163 164 165 166 167 74 168 169 170 171 172 173 174 175 75 176 177 178 179 180 181 182 183 76 184 185 186 187 188 189 190 191 77 192 193 194 195 196 197 198 199 78 200 201 202 203 204 205 206 207 79 208 209 210 211 212 213 214 215 80 216 217 218 219 220 221 222 223 81 224 225 226 227 228 229 230 231 82 232 233 234 235 236 237 238 239 83 240 241 242 243 244 245 246 247 84 248 249 250 251 252 253 254 255>; 85 default-brightness-level = <128>; 86 pwms = <&pwm0 0 1000000 1>; 87 enable-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>; 88 power-supply = <&vcc_backlight>; 89 status = "okay"; 90 }; 91 92 lvds_panel: lvds-panel { 93 u-boot,dm-pre-reloc; 94 compatible ="simple-panel"; 95 backlight = <&backlight>; 96 bus-format = <0x1009>; 97 /* enable-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>; 98 * delay,disable = <10>; 99 * power-supply = <&vcc_lcd>; 100 */ 101 power-supply = <&ldo6>; 102 power-invert = <1>; 103 rockchip,data-mapping = "jeida"; 104 rockchip,data-width = <18>; 105 rockchip,output = "rgb"; 106 107 display-timings { 108 native-mode = <&timing0>; 109 timing0: timing0 { 110 clock-frequency = <60000000>; 111 hactive = <1024>; 112 vactive = <600>; 113 hback-porch = <100>; 114 hfront-porch = <120>; 115 vback-porch = <10>; 116 vfront-porch = <15>; 117 hsync-len = <100>; 118 vsync-len = <10>; 119 hsync-active = <0>; 120 vsync-active = <0>; 121 de-active = <0>; 122 pixelclk-active = <0>; 123 }; 124 }; 125 126 ports { 127 panel_in_lvds: endpoint { 128 remote-endpoint = <&lvds_out_panel>; 129 }; 130 }; 131 }; 132 133 adc-keys { 134 compatible = "adc-keys"; 135 io-channels = <&saradc 2>; 136 io-channel-names = "buttons"; 137 poll-interval = <100>; 138 keyup-threshold-microvolt = <3300000>; 139 140 button-up { 141 label = "Volume Up"; 142 linux,code = <KEY_VOLUMEUP>; 143 press-threshold-microvolt = <0>; 144 }; 145 146 button-down { 147 label = "Volume Down"; 148 linux,code = <KEY_VOLUMEDOWN>; 149 press-threshold-microvolt = <1650000>; 150 }; 151 }; 152 153 charge-animation { 154 compatible = "rockchip,uboot-charge"; 155 rockchip,uboot-charge-on = <0>; 156 rockchip,android-charge-on = <1>; 157 status = "okay"; 158 }; 159}; 160 161&i2c1 { 162 status = "okay"; 163 164 hym8563: hym8563@51 { 165 compatible = "haoyu,hym8563"; 166 reg = <0x51>; 167 #clock-cells = <0>; 168 clock-frequency = <32768>; 169 clock-output-names = "xin32k"; 170 }; 171}; 172 173&i2c2 { 174 clock-frequency = <100000>; 175 status = "okay"; 176 177 rk816: pmic@1a { 178 compatible = "rockchip,rk816"; 179 reg = <0x1a>; 180 interrupt-parent = <&gpio0>; 181 interrupts = <2 IRQ_TYPE_LEVEL_LOW>; 182 pinctrl-names = "default"; 183 pinctrl-0 = <&pmic_int_l>; 184 rockchip,system-power-controller; 185 wakeup-source; 186 gpio-controller; 187 #gpio-cells = <2>; 188 #clock-cells = <1>; 189 clock-output-names = "xin32k", "rk816-clkout2"; 190 191 gpio { 192 status = "okay"; 193 }; 194 195 pwrkey { 196 status = "okay"; 197 }; 198 199 rtc { 200 status = "okay"; 201 }; 202 203 battery { 204 compatible = "rk816-battery"; 205 ocv_table = < 3400 3654 3686 3710 3744 3775 3803 206 3825 3843 3858 3870 3886 3916 3955 207 3988 4010 4023 4032 4049 4080 4151 >; 208 design_capacity = <2000>; 209 design_qmax = <2200>; 210 bat_res = <120>; 211 max_input_current = <2000>; 212 max_chrg_current = <1000>; 213 max_chrg_voltage = <4200>; 214 sleep_enter_current = <300>; 215 sleep_exit_current = <300>; 216 sleep_filter_current = <100>; 217 power_off_thresd = <3500>; 218 zero_algorithm_vol = <3800>; 219 max_soc_offset = <60>; 220 monitor_sec = <5>; 221 virtual_power = <0>; 222 power_dc2otg = <0>; 223 dc_det_adc = <0>; 224 }; 225 226 regulators { 227 228 vdd_arm: DCDC_REG1{ 229 regulator-name= "vdd_arm"; 230 regulator-min-microvolt = <750000>; 231 regulator-max-microvolt = <1500000>; 232 regulator-ramp-delay = <6001>; 233 regulator-always-on; 234 regulator-boot-on; 235 regulator-state-mem { 236 regulator-on-in-suspend; 237 regulator-suspend-microvolt = <900000>; 238 }; 239 }; 240 241 vdd_log: DCDC_REG2 { 242 regulator-name= "vdd_logic"; 243 regulator-min-microvolt = <750000>; 244 regulator-max-microvolt = <1500000>; 245 regulator-ramp-delay = <6001>; 246 regulator-always-on; 247 regulator-boot-on; 248 regulator-state-mem { 249 regulator-on-in-suspend; 250 regulator-suspend-microvolt = <1000000>; 251 }; 252 }; 253 254 vcc_ddr: DCDC_REG3 { 255 regulator-name = "vcc_ddr"; 256 regulator-always-on; 257 regulator-boot-on; 258 }; 259 260 vcc_io: DCDC_REG4 { 261 regulator-name = "vcc_io"; 262 regulator-min-microvolt = <3300000>; 263 regulator-max-microvolt = <3300000>; 264 regulator-always-on; 265 regulator-boot-on; 266 regulator-state-mem { 267 regulator-on-in-suspend; 268 regulator-suspend-microvolt = <3000000>; 269 }; 270 }; 271 272 vcc28_cif: LDO_REG1 { 273 regulator-name = "vcc28_cif"; 274 regulator-min-microvolt = <2800000>; 275 regulator-max-microvolt = <2800000>; 276 regulator-always-on; 277 regulator-boot-on; 278 regulator-state-mem { 279 regulator-off-in-suspend; 280 }; 281 }; 282 283 vcc18_cif: LDO_REG2 { 284 regulator-name = "vcc18_cif"; 285 regulator-min-microvolt = <1800000>; 286 regulator-max-microvolt = <1800000>; 287 regulator-always-on; 288 regulator-boot-on; 289 regulator-state-mem { 290 regulator-off-in-suspend; 291 }; 292 }; 293 294 vdd_11: LDO_REG3 { 295 regulator-name = "vdd_11"; 296 regulator-min-microvolt = <1100000>; 297 regulator-max-microvolt = <1100000>; 298 regulator-always-on; 299 regulator-boot-on; 300 regulator-state-mem { 301 regulator-on-in-suspend; 302 regulator-suspend-microvolt = <1100000>; 303 }; 304 }; 305 306 ldo4: LDO_REG4 { 307 regulator-name= "ldo4"; 308 regulator-min-microvolt = <3300000>; 309 regulator-max-microvolt = <3300000>; 310 regulator-always-on; 311 regulator-boot-on; 312 regulator-state-mem { 313 regulator-off-in-suspend; 314 }; 315 }; 316 317 ldo5: LDO_REG5 { 318 regulator-name= "ldo5"; 319 regulator-min-microvolt = <3000000>; 320 regulator-max-microvolt = <3000000>; 321 regulator-always-on; 322 regulator-boot-on; 323 regulator-state-mem { 324 regulator-off-in-suspend; 325 }; 326 }; 327 328 ldo6: LDO_REG6 { 329 regulator-name= "ldo6"; 330 regulator-min-microvolt = <3300000>; 331 regulator-max-microvolt = <3300000>; 332 regulator-state-mem { 333 regulator-on-in-suspend; 334 regulator-suspend-microvolt = <3300000>; 335 }; 336 }; 337 }; 338 }; 339}; 340 341&u2phy { 342 status = "okay"; 343}; 344 345&u2phy_otg { 346 status = "okay"; 347}; 348 349&u2phy_host { 350 status = "okay"; 351}; 352 353&usb_host_ehci { 354 status = "okay"; 355}; 356 357&usb_host_ohci { 358 status = "okay"; 359}; 360 361&usb_otg { 362 vbus-supply = <&vcc5v0_otg>; 363 status = "okay"; 364}; 365 366&emmc { 367 fifo-mode; 368 status = "okay"; 369}; 370 371&lvds { 372 status = "okay"; 373 ports { 374 lvds_out: endpoint@0 { 375 reg = <0>; 376 lvds_out_panel: endpoint { 377 remote-endpoint = <&panel_in_lvds>; 378 }; 379 }; 380 }; 381}; 382 383&vop { 384 status = "okay"; 385}; 386 387&pinctrl { 388 usb_otg { 389 otg_vbus_drv: otg-vbus-drv { 390 rockchip,pins = <0 26 RK_FUNC_GPIO &pcfg_pull_none>; 391 }; 392 }; 393 394 usb_host { 395 host_vbus_drv: host-vbus-drv { 396 rockchip,pins = <2 23 RK_FUNC_GPIO &pcfg_pull_none>; 397 }; 398 }; 399 400 pmic_int_l: pmic-int-l { 401 rockchip,pins = 402 <0 2 RK_FUNC_GPIO &pcfg_pull_none>; 403 }; 404}; 405 406&saradc { 407 status = "okay"; 408}; 409