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