1/* 2 * This file is dual-licensed: you can use it either under the terms 3 * of the GPL or the X11 license, at your option. Note that this dual 4 * licensing only applies to this file, and not this project as a 5 * whole. 6 * 7 * a) This file is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License as 9 * published by the Free Software Foundation; either version 2 of the 10 * License, or (at your option) any later version. 11 * 12 * This file is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * Or, alternatively, 18 * 19 * b) Permission is hereby granted, free of charge, to any person 20 * obtaining a copy of this software and associated documentation 21 * files (the "Software"), to deal in the Software without 22 * restriction, including without limitation the rights to use, 23 * copy, modify, merge, publish, distribute, sublicense, and/or 24 * sell copies of the Software, and to permit persons to whom the 25 * Software is furnished to do so, subject to the following 26 * conditions: 27 * 28 * The above copyright notice and this permission notice shall be 29 * included in all copies or substantial portions of the Software. 30 * 31 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 32 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 33 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 34 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 35 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 36 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 37 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 38 * OTHER DEALINGS IN THE SOFTWARE. 39 */ 40 41/dts-v1/; 42#include <dt-bindings/gpio/gpio.h> 43#include <dt-bindings/input/input.h> 44#include <dt-bindings/pinctrl/rockchip.h> 45#include <dt-bindings/pwm/pwm.h> 46#include "rk3126.dtsi" 47#include "rk312x-android.dtsi" 48 49/ { 50 model = "Rockchip RK3126 Evaluation board"; 51 compatible = "rockchip,rk3126"; 52 53 adc-keys { 54 compatible = "adc-keys"; 55 io-channels = <&saradc 2>; 56 io-channel-names = "buttons"; 57 poll-interval = <100>; 58 keyup-threshold-microvolt = <3300000>; 59 60 button-up { 61 label = "Volume Up"; 62 linux,code = <KEY_VOLUMEUP>; 63 press-threshold-microvolt = <0>; 64 }; 65 66 button-down { 67 label = "Volume Down"; 68 linux,code = <KEY_VOLUMEDOWN>; 69 press-threshold-microvolt = <1650000>; 70 }; 71 }; 72 73 backlight: backlight { 74 compatible = "pwm-backlight"; 75 brightness-levels = < 76 0 1 2 3 4 5 6 7 77 8 9 10 11 12 13 14 15 78 16 17 18 19 20 21 22 23 79 24 25 26 27 28 29 30 31 80 32 33 34 35 36 37 38 39 81 40 41 42 43 44 45 46 47 82 48 49 50 51 52 53 54 55 83 56 57 58 59 60 61 62 63 84 64 65 66 67 68 69 70 71 85 72 73 74 75 76 77 78 79 86 80 81 82 83 84 85 86 87 87 88 89 90 91 92 93 94 95 88 96 97 98 99 100 101 102 103 89 104 105 106 107 108 109 110 111 90 112 113 114 115 116 117 118 119 91 120 121 122 123 124 125 126 127 92 128 129 130 131 132 133 134 135 93 136 137 138 139 140 141 142 143 94 144 145 146 147 148 149 150 151 95 152 153 154 155 156 157 158 159 96 160 161 162 163 164 165 166 167 97 168 169 170 171 172 173 174 175 98 176 177 178 179 180 181 182 183 99 184 185 186 187 188 189 190 191 100 192 193 194 195 196 197 198 199 101 200 201 202 203 204 205 206 207 102 208 209 210 211 212 213 214 215 103 216 217 218 219 220 221 222 223 104 224 225 226 227 228 229 230 231 105 232 233 234 235 236 237 238 239 106 240 241 242 243 244 245 246 247 107 248 249 250 251 252 253 254 255>; 108 default-brightness-level = <128>; 109 pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>; 110 enable-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>; 111 }; 112 113 panel { 114 compatible ="simple-panel"; 115 backlight = <&backlight>; 116 power-supply = <&ldo6>; 117 power-invert; 118 bus-format = <MEDIA_BUS_FMT_RGB666_1X18>; 119 120 display-timings { 121 native-mode = <&timing0>; 122 123 timing0: timing0 { 124 clock-frequency = <60000000>; 125 hactive = <1024>; 126 vactive = <600>; 127 hback-porch = <100>; 128 hfront-porch = <120>; 129 vback-porch = <10>; 130 vfront-porch = <15>; 131 hsync-len = <100>; 132 vsync-len = <10>; 133 hsync-active = <0>; 134 vsync-active = <0>; 135 de-active = <0>; 136 pixelclk-active = <0>; 137 }; 138 }; 139 140 port { 141 panel_in_rgb: endpoint { 142 remote-endpoint = <&rgb_out_panel>; 143 }; 144 }; 145 }; 146 147 vccadc_ref: vccadc-ref { 148 compatible = "regulator-fixed"; 149 regulator-name = "SARADC_AVDD33"; 150 regulator-always-on; 151 regulator-boot-on; 152 regulator-min-microvolt = <3300000>; 153 regulator-max-microvolt = <3300000>; 154 }; 155 156 vcc_sys: vcc-sys { 157 compatible = "regulator-fixed"; 158 regulator-name = "vcc_sys"; 159 regulator-min-microvolt = <4000000>; 160 regulator-max-microvolt = <4000000>; 161 regulator-always-on; 162 }; 163 164 xin32k: xin32k { 165 compatible = "fixed-clock"; 166 clock-frequency = <32768>; 167 clock-output-names = "xin32k"; 168 #clock-cells = <0>; 169 }; 170}; 171 172&cpu0 { 173 cpu-supply = <&vdd_arm>; 174}; 175 176&dmc { 177 center-supply = <&vdd_log>; 178}; 179 180&emmc { 181 bus-width = <8>; 182 cap-mmc-highspeed; 183 no-sdio; 184 no-sd; 185 disable-wp; 186 non-removable; 187 num-slots = <1>; 188 pinctrl-names = "default"; 189 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; 190 status = "okay"; 191}; 192 193&gpu { 194 status = "okay"; 195 mali-supply = <&vdd_log>; 196}; 197 198&i2c2 { 199 status = "okay"; 200 clock-frequency = <400000>; 201 202 rk816: pmic@1a { 203 compatible = "rockchip,rk816"; 204 reg = <0x1a>; 205 interrupt-parent = <&gpio0>; 206 interrupts = <2 IRQ_TYPE_LEVEL_LOW>; 207 pinctrl-names = "default"; 208 pinctrl-0 = <&pmic_int_l>; 209 rockchip,system-power-controller; 210 wakeup-source; 211 gpio-controller; 212 #gpio-cells = <2>; 213 #clock-cells = <1>; 214 clock-output-names = "rk816-clkout1", "rk816-clkout2"; 215 extcon = <&u2phy>; 216 217 vcc1-supply = <&vcc_sys>; 218 vcc2-supply = <&vcc_sys>; 219 vcc3-supply = <&vcc_sys>; 220 vcc4-supply = <&vcc_sys>; 221 vcc5-supply = <&vcc_io>; 222 vcc6-supply = <&vcc_sys>; 223 224 gpio { 225 status = "okay"; 226 }; 227 228 pwrkey { 229 status = "okay"; 230 }; 231 232 rtc { 233 status = "okay"; 234 }; 235 236 battery { 237 compatible = "rk816-battery"; 238 ocv_table = <3400 3654 3686 3710 3744 3775 3803 239 3825 3843 3858 3870 3886 3916 3955 240 3988 4010 4023 4032 4049 4080 4151>; 241 design_capacity = <2000>; 242 design_qmax = <2200>; 243 bat_res = <120>; 244 max_input_current = <2000>; 245 max_chrg_current = <1000>; 246 max_chrg_voltage = <4200>; 247 sleep_enter_current = <300>; 248 sleep_exit_current = <300>; 249 sleep_filter_current = <100>; 250 power_off_thresd = <3500>; 251 zero_algorithm_vol = <3800>; 252 fb_temperature = <105>; 253 max_soc_offset = <60>; 254 monitor_sec = <5>; 255 virtual_power = <0>; 256 energy_mode = <0>; 257 power_dc2otg = <0>; 258 dc_det_adc = <0>; 259 }; 260 261 regulators { 262 263 vdd_arm: DCDC_REG1{ 264 regulator-name= "vdd_arm"; 265 regulator-min-microvolt = <750000>; 266 regulator-max-microvolt = <1500000>; 267 regulator-ramp-delay = <6001>; 268 regulator-always-on; 269 regulator-boot-on; 270 regulator-state-mem { 271 regulator-on-in-suspend; 272 regulator-suspend-microvolt = <900000>; 273 }; 274 }; 275 276 vdd_log: DCDC_REG2 { 277 regulator-name= "vdd_logic"; 278 regulator-min-microvolt = <750000>; 279 regulator-max-microvolt = <1500000>; 280 regulator-ramp-delay = <6001>; 281 regulator-always-on; 282 regulator-boot-on; 283 regulator-state-mem { 284 regulator-on-in-suspend; 285 regulator-suspend-microvolt = <1000000>; 286 }; 287 }; 288 289 vcc_ddr: DCDC_REG3 { 290 regulator-name = "vcc_ddr"; 291 regulator-always-on; 292 regulator-boot-on; 293 }; 294 295 vcc_io: DCDC_REG4 { 296 regulator-name = "vcc_io"; 297 regulator-min-microvolt = <3300000>; 298 regulator-max-microvolt = <3300000>; 299 regulator-always-on; 300 regulator-boot-on; 301 regulator-state-mem { 302 regulator-on-in-suspend; 303 regulator-suspend-microvolt = <3000000>; 304 }; 305 }; 306 307 vcc28_cif: LDO_REG1 { 308 regulator-name = "vcc28_cif"; 309 regulator-min-microvolt = <2800000>; 310 regulator-max-microvolt = <2800000>; 311 regulator-always-on; 312 regulator-boot-on; 313 regulator-state-mem { 314 regulator-off-in-suspend; 315 }; 316 }; 317 318 vcc18_cif: LDO_REG2 { 319 regulator-name = "vcc18_cif"; 320 regulator-min-microvolt = <1800000>; 321 regulator-max-microvolt = <1800000>; 322 regulator-always-on; 323 regulator-boot-on; 324 regulator-state-mem { 325 regulator-off-in-suspend; 326 }; 327 }; 328 329 vdd_11: LDO_REG3 { 330 regulator-name = "vdd_11"; 331 regulator-min-microvolt = <1100000>; 332 regulator-max-microvolt = <1100000>; 333 regulator-always-on; 334 regulator-boot-on; 335 regulator-state-mem { 336 regulator-on-in-suspend; 337 regulator-suspend-microvolt = <1100000>; 338 }; 339 }; 340 341 ldo4: LDO_REG4 { 342 regulator-name= "ldo4"; 343 regulator-min-microvolt = <3300000>; 344 regulator-max-microvolt = <3300000>; 345 regulator-always-on; 346 regulator-boot-on; 347 regulator-state-mem { 348 regulator-off-in-suspend; 349 }; 350 }; 351 352 ldo5: LDO_REG5 { 353 regulator-name= "ldo5"; 354 regulator-min-microvolt = <3000000>; 355 regulator-max-microvolt = <3000000>; 356 regulator-always-on; 357 regulator-boot-on; 358 regulator-state-mem { 359 regulator-off-in-suspend; 360 }; 361 }; 362 363 ldo6: LDO_REG6 { 364 regulator-name= "ldo6"; 365 regulator-min-microvolt = <3300000>; 366 regulator-max-microvolt = <3300000>; 367 regulator-state-mem { 368 regulator-on-in-suspend; 369 regulator-suspend-microvolt = <3300000>; 370 }; 371 }; 372 }; 373 }; 374}; 375 376&rgb { 377 pinctrl-names = "default", "sleep"; 378 pinctrl-0 = <&lcdc_rgb_pins>; 379 pinctrl-1 = <&lcdc_sleep_pins>; 380 status = "okay"; 381 382 ports { 383 port@1 { 384 reg = <1>; 385 386 rgb_out_panel: endpoint { 387 remote-endpoint = <&panel_in_rgb>; 388 }; 389 }; 390 }; 391}; 392 393&pinctrl { 394 lcdc { 395 lcdc_rgb_pins: lcdc-rgb-pins { 396 rockchip,pins = 397 <2 RK_PB0 1 &pcfg_pull_none>, /* DCLK */ 398 <2 RK_PB3 1 &pcfg_pull_none>, /* DEN */ 399 <2 RK_PB4 1 &pcfg_pull_none>, /* DATA10 */ 400 <2 RK_PB5 1 &pcfg_pull_none>, /* DATA11 */ 401 <2 RK_PB6 1 &pcfg_pull_none>, /* DATA12 */ 402 <2 RK_PB7 1 &pcfg_pull_none>, /* DATA13 */ 403 <2 RK_PC0 1 &pcfg_pull_none>, /* DATA14 */ 404 <2 RK_PC1 1 &pcfg_pull_none>, /* DATA15 */ 405 <2 RK_PC2 1 &pcfg_pull_none>, /* DATA16 */ 406 <2 RK_PC3 1 &pcfg_pull_none>; /* DATA17 */ 407 }; 408 409 lcdc_sleep_pins: lcdc-sleep-pins { 410 rockchip,pins = 411 <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>, /* DCLK */ 412 <2 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>, /* DEN */ 413 <2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>, /* DATA10 */ 414 <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>, /* DATA11 */ 415 <2 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>, /* DATA12 */ 416 <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>, /* DATA13 */ 417 <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>, /* DATA14 */ 418 <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>, /* DATA15 */ 419 <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>, /* DATA16 */ 420 <2 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>; /* DATA17 */ 421 }; 422 }; 423 424 pmic { 425 pmic_int_l: pmic-int-l { 426 rockchip,pins = 427 <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_default>; 428 }; 429 }; 430}; 431 432&pwm0 { 433 status = "okay"; 434}; 435 436&rga { 437 status = "okay"; 438}; 439 440&saradc { 441 status = "okay"; 442 vref-supply = <&vccadc_ref>; 443}; 444 445&sdmmc { 446 cap-mmc-highspeed; 447 no-sdio; 448 no-mmc; 449 broken-cd; 450 card-detect-delay = <800>; 451 ignore-pm-notify; 452 keep-power-in-suspend; 453 cd-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; /* CD GPIO */ 454 status = "disabled"; 455}; 456 457&sdio { 458 cap-mmc-highspeed; 459 no-sd; 460 no-mmc; 461 ignore-pm-notify; 462 keep-power-in-suspend; 463 non-removable; 464 cap-sdio-irq; 465 status = "disabled"; 466}; 467 468&u2phy { 469 status = "okay"; 470 471 u2phy_otg: otg-port { 472 status = "okay"; 473 }; 474 475 u2phy_host: host-port { 476 status = "okay"; 477 }; 478}; 479 480&usb_otg { 481 status = "okay"; 482}; 483 484&vop { 485 status = "okay"; 486}; 487 488&vop_mmu { 489 status = "okay"; 490}; 491