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