1/* 2 * (C) Copyright 2017 Rockchip Electronics Co., Ltd 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7/dts-v1/; 8#include "px30.dtsi" 9#include "px30-u-boot.dtsi" 10#include <dt-bindings/input/input.h> 11 12/ { 13 model = "Rockchip PX30 EVB"; 14 compatible = "rockchip,px30-evb", "rockchip,px30"; 15 16 chosen { 17 stdout-path = &uart2; 18 }; 19 20 dmc: dmc@20004000 { 21 u-boot,dm-pre-reloc; 22 compatible = "rockchip,px30-dmc", "syscon"; 23 reg = <0x0 0xff2a0000 0x0 0x1000>; 24 }; 25 26 adc-keys { 27 u-boot,dm-pre-reloc; 28 compatible = "adc-keys"; 29 io-channels = <&saradc 2>; 30 io-channel-names = "buttons"; 31 keyup-threshold-microvolt = <1800000>; 32 33 vol-up-key { 34 u-boot,dm-pre-reloc; 35 linux,code = <KEY_VOLUMEUP>; 36 label = "volume up"; 37 press-threshold-microvolt = <10000>; 38 }; 39 40 vol-down-key { 41 linux,code = <KEY_VOLUMEDOWN>; 42 label = "volume down"; 43 press-threshold-microvolt = <170000>; 44 }; 45 46 home-key { 47 linux,code = <KEY_HOME>; 48 label = "home"; 49 press-threshold-microvolt = <254000>; 50 }; 51 52 menu-key { 53 linux,code = <KEY_MENU>; 54 label = "menu"; 55 press-threshold-microvolt = <414000>; 56 }; 57 58 esc-key { 59 linux,code = <KEY_ESC>; 60 label = "esc"; 61 press-threshold-microvolt = <614000>; 62 }; 63 }; 64 65 backlight: backlight { 66 compatible = "pwm-backlight"; 67 pwms = <&pwm1 0 25000 0>; 68 brightness-levels = < 69 0 1 2 3 4 5 6 7 70 8 9 10 11 12 13 14 15 71 16 17 18 19 20 21 22 23 72 24 25 26 27 28 29 30 31 73 32 33 34 35 36 37 38 39 74 40 41 42 43 44 45 46 47 75 48 49 50 51 52 53 54 55 76 56 57 58 59 60 61 62 63 77 64 65 66 67 68 69 70 71 78 72 73 74 75 76 77 78 79 79 80 81 82 83 84 85 86 87 80 88 89 90 91 92 93 94 95 81 96 97 98 99 100 101 102 103 82 104 105 106 107 108 109 110 111 83 112 113 114 115 116 117 118 119 84 120 121 122 123 124 125 126 127 85 128 129 130 131 132 133 134 135 86 136 137 138 139 140 141 142 143 87 144 145 146 147 148 149 150 151 88 152 153 154 155 156 157 158 159 89 160 161 162 163 164 165 166 167 90 168 169 170 171 172 173 174 175 91 176 177 178 179 180 181 182 183 92 184 185 186 187 188 189 190 191 93 192 193 194 195 196 197 198 199 94 200 201 202 203 204 205 206 207 95 208 209 210 211 212 213 214 215 96 216 217 218 219 220 221 222 223 97 224 225 226 227 228 229 230 231 98 232 233 234 235 236 237 238 239 99 240 241 242 243 244 245 246 247 100 248 249 250 251 252 253 254 255>; 101 default-brightness-level = <200>; 102 }; 103}; 104 105 106&i2c0 { 107 status = "okay"; 108 109 rk817: pmic@20 { 110 compatible = "rockchip,rk817"; 111 reg = <0x20>; 112 interrupt-parent = <&gpio0>; 113 interrupts = <7 IRQ_TYPE_LEVEL_LOW>; 114 pinctrl-names = "default"; 115 pinctrl-0 = <&pmic_int>; 116 rockchip,system-power-controller; 117 wakeup-source; 118 #clock-cells = <1>; 119 clock-output-names = "xin32k", "rk808-clkout2"; 120 121 vcc1-supply = <&vccsys>; 122 vcc2-supply = <&vccsys>; 123 vcc3-supply = <&vccsys>; 124 vcc4-supply = <&vccsys>; 125 vcc5-supply = <&vccsys>; 126 vcc6-supply = <&vccsys>; 127 vcc7-supply = <&vcc_3v0>; 128 vcc8-supply = <&vccsys>; 129 vcc9-supply = <&dcdc_boost>; 130 131 vccsys: vccsys{ 132 compatible = "regulator-fixed"; 133 regulator-name = "vcc3v8_sys"; 134 regulator-always-on; 135 regulator-boot-on; 136 regulator-min-microvolt = <3800000>; 137 regulator-max-microvolt = <3800000>; 138 }; 139 140 rk817_pin0_ts: rk817_pin0_ts { 141 pins = "gpio0"; 142 function = "pin_fun0"; 143 }; 144 145 rk817_pin0_gpio: rk817_pin0_gpio { 146 pins = "gpio0"; 147 function = "gpio"; 148 }; 149 150 rk817_pin1_gt: rk817_pin1_gt { 151 pins = "gpio1"; 152 function = "pin_fun0"; 153 }; 154 155 rk817_pin1_gpio: rk817_pin1_gpio { 156 pins = "gpio1"; 157 function = "gpio"; 158 }; 159 160 pwrkey { 161 status = "okay"; 162 }; 163 164 regulators { 165 vdd_arm: DCDC_REG1 { 166 regulator-always-on; 167 regulator-boot-on; 168 regulator-min-microvolt = <950000>; 169 regulator-max-microvolt = <1350000>; 170 regulator-ramp-delay = <6001>; 171 regulator-initial-mode = <0x1>; 172 regulator-name = "vdd_arm"; 173 regulator-state-mem { 174 regulator-on-in-suspend; 175 regulator-suspend-microvolt = <700000>; 176 }; 177 }; 178 179 vdd_logic: DCDC_REG2 { 180 regulator-always-on; 181 regulator-boot-on; 182 regulator-min-microvolt = <950000>; 183 regulator-max-microvolt = <1350000>; 184 regulator-ramp-delay = <6001>; 185 regulator-initial-mode = <0x1>; 186 regulator-name = "vdd_logic"; 187 regulator-state-mem { 188 regulator-off-in-suspend; 189 regulator-suspend-microvolt = <800000>; 190 }; 191 }; 192 193 vcc_ddr: DCDC_REG3 { 194 regulator-always-on; 195 regulator-boot-on; 196 regulator-initial-mode = <0x1>; 197 regulator-name = "vcc_ddr"; 198 regulator-state-mem { 199 regulator-on-in-suspend; 200 }; 201 }; 202 203 vcc_3v0: DCDC_REG4 { 204 regulator-always-on; 205 regulator-boot-on; 206 regulator-min-microvolt = <3000000>; 207 regulator-max-microvolt = <3000000>; 208 regulator-initial-mode = <0x1>; 209 regulator-name = "vcc_3v0"; 210 regulator-state-mem { 211 regulator-off-in-suspend; 212 regulator-suspend-microvolt = <3000000>; 213 }; 214 }; 215 216 vcc2v5_ddr: LDO_REG1 { 217 regulator-always-on; 218 regulator-boot-on; 219 regulator-min-microvolt = <2500000>; 220 regulator-max-microvolt = <2500000>; 221 regulator-name = "vcc2v5_ddr"; 222 regulator-state-mem { 223 regulator-on-in-suspend; 224 regulator-suspend-microvolt = <2500000>; 225 }; 226 }; 227 228 vcc1v8_soc: LDO_REG2 { 229 regulator-always-on; 230 regulator-boot-on; 231 regulator-min-microvolt = <1800000>; 232 regulator-max-microvolt = <1800000>; 233 234 regulator-name = "vcc1v8_soc"; 235 regulator-state-mem { 236 regulator-on-in-suspend; 237 regulator-suspend-microvolt = <1800000>; 238 }; 239 }; 240 241 vdd1v0_soc: LDO_REG3 { 242 regulator-always-on; 243 regulator-boot-on; 244 regulator-min-microvolt = <1000000>; 245 regulator-max-microvolt = <1000000>; 246 247 regulator-name = "vcc1v0_soc"; 248 regulator-state-mem { 249 regulator-off-in-suspend; 250 regulator-suspend-microvolt = <1000000>; 251 }; 252 }; 253 254 vcc3v0_pmu: LDO_REG4 { 255 regulator-always-on; 256 regulator-boot-on; 257 regulator-min-microvolt = <3000000>; 258 regulator-max-microvolt = <3000000>; 259 260 regulator-name = "vcc3v0_pmu"; 261 regulator-state-mem { 262 regulator-off-in-suspend; 263 regulator-suspend-microvolt = <3000000>; 264 }; 265 }; 266 267 vccio_sd: LDO_REG5 { 268 regulator-always-on; 269 regulator-boot-on; 270 regulator-min-microvolt = <1800000>; 271 regulator-max-microvolt = <3300000>; 272 273 regulator-name = "vccio_sd"; 274 regulator-state-mem { 275 regulator-on-in-suspend; 276 regulator-suspend-microvolt = <3300000>; 277 }; 278 }; 279 280 vcc_sd: LDO_REG6 { 281 regulator-always-on; 282 regulator-boot-on; 283 regulator-min-microvolt = <3300000>; 284 regulator-max-microvolt = <3300000>; 285 286 regulator-name = "vcc_sd"; 287 regulator-state-mem { 288 regulator-on-in-suspend; 289 regulator-suspend-microvolt = <3300000>; 290 }; 291 }; 292 293 vcc2v8_dvp: LDO_REG7 { 294 regulator-always-on; 295 regulator-boot-on; 296 regulator-min-microvolt = <2800000>; 297 regulator-max-microvolt = <2800000>; 298 299 regulator-name = "vcc2v8_dvp"; 300 regulator-state-mem { 301 regulator-off-in-suspend; 302 regulator-suspend-microvolt = <2800000>; 303 }; 304 }; 305 306 vcc1v8_dvp: LDO_REG8 { 307 regulator-always-on; 308 regulator-boot-on; 309 regulator-min-microvolt = <1800000>; 310 regulator-max-microvolt = <1800000>; 311 312 regulator-name = "vcc1v8_dvp"; 313 regulator-state-mem { 314 regulator-on-in-suspend; 315 regulator-suspend-microvolt = <1800000>; 316 }; 317 }; 318 319 vdd1v5_dvp: LDO_REG9 { 320 regulator-always-on; 321 regulator-boot-on; 322 regulator-min-microvolt = <1500000>; 323 regulator-max-microvolt = <1500000>; 324 325 regulator-name = "vdd1v5_dvp"; 326 regulator-state-mem { 327 regulator-off-in-suspend; 328 regulator-suspend-microvolt = <1500000>; 329 }; 330 }; 331 332 dcdc_boost: BOOST { 333 regulator-always-on; 334 regulator-boot-on; 335 regulator-min-microvolt = <4700000>; 336 regulator-max-microvolt = <5400000>; 337 regulator-name = "boost"; 338 }; 339 340 otg_switch: OTG_SWITCH { 341 regulator-always-on; 342 regulator-boot-on; 343 regulator-name = "otg_switch"; 344 }; 345 }; 346 347 battery { 348 compatible = "rk817,battery"; 349 ocv_table = <3500 3625 3685 3697 3718 3735 3748 350 3760 3774 3788 3802 3816 3834 3853 351 3877 3908 3946 3975 4018 4071 4106>; 352 design_capacity = <2500>; 353 design_qmax = <2750>; 354 bat_res = <100>; 355 sleep_enter_current = <300>; 356 sleep_exit_current = <300>; 357 sleep_filter_current = <100>; 358 power_off_thresd = <3500>; 359 zero_algorithm_vol = <3850>; 360 max_soc_offset = <60>; 361 monitor_sec = <5>; 362 sample_res = <10>; 363 virtual_power = <1>; 364 }; 365 366 charger { 367 compatible = "rk817,charger"; 368 min_input_voltage = <4500>; 369 max_input_current = <1500>; 370 max_chrg_current = <1300>; 371 max_chrg_voltage = <4200>; 372 chrg_term_mode = <1>; 373 chrg_finish_cur = <300>; 374 virtual_power = <0>; 375 dc_det_adc = <0>; 376 }; 377 }; 378}; 379 380&sdmmc { 381 bus-width = <4>; 382 cap-mmc-highspeed; 383 cap-sd-highspeed; 384 supports-sd; 385 card-detect-delay = <800>; 386 ignore-pm-notify; 387 /*cd-gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>; [> CD GPIO <]*/ 388 sd-uhs-sdr12; 389 sd-uhs-sdr25; 390 sd-uhs-sdr50; 391 sd-uhs-sdr104; 392 vqmmc-supply = <&vccio_sd>; 393 vmmc-supply = <&vcc_sd>; 394 status = "okay"; 395}; 396 397&emmc { 398 u-boot,dm-pre-reloc; 399 fifo-mode; 400 bus-width = <8>; 401 cap-mmc-highspeed; 402 supports-emmc; 403 disable-wp; 404 non-removable; 405 num-slots = <1>; 406 pinctrl-names = "default"; 407 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; 408 status = "okay"; 409}; 410 411&pwm1 { 412 status = "okay"; 413}; 414 415&saradc { 416 status = "okay"; 417}; 418 419&pinctrl { 420 pmic { 421 pmic_int: pmic_int { 422 rockchip,pins = 423 <0 7 RK_FUNC_GPIO &pcfg_pull_up>; 424 }; 425 }; 426}; 427 428&u2phy { 429 status = "okay"; 430}; 431 432&u2phy_otg { 433 status = "okay"; 434}; 435 436&u2phy_host { 437 status = "okay"; 438}; 439