| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
/* |
| 3 |
* Copyright (c) 2024 Chris Morgan <[email protected]> |
| 4 |
*/ |
| 5 |
|
| 6 |
/dts-v1/; |
| 7 |
#include <dt-bindings/gpio/gpio.h> |
| 8 |
#include <dt-bindings/input/input.h> |
| 9 |
#include <dt-bindings/leds/common.h> |
| 10 |
#include <dt-bindings/pinctrl/rockchip.h> |
| 11 |
#include "rk3326.dtsi" |
| 12 |
|
| 13 |
/ { |
| 14 |
model = "GameForce Chi"; |
| 15 |
compatible = "gameforce,chi", "rockchip,rk3326"; |
| 16 |
chassis-type = "handset"; |
| 17 |
|
| 18 |
aliases { |
| 19 |
mmc0 = &sdmmc; |
| 20 |
mmc1 = &sdio; |
| 21 |
}; |
| 22 |
|
| 23 |
chosen { |
| 24 |
stdout-path = "serial2:115200n8"; |
| 25 |
}; |
| 26 |
|
| 27 |
adc_joystick: adc-joystick { |
| 28 |
compatible = "adc-joystick"; |
| 29 |
io-channels = <&saradc 0>, |
| 30 |
<&saradc 1>; |
| 31 |
poll-interval = <100>; |
| 32 |
#address-cells = <1>; |
| 33 |
#size-cells = <0>; |
| 34 |
|
| 35 |
axis@0 { |
| 36 |
reg = <0>; |
| 37 |
abs-flat = <10>; |
| 38 |
abs-fuzz = <10>; |
| 39 |
abs-range = <850 175>; |
| 40 |
linux,code = <ABS_Y>; |
| 41 |
}; |
| 42 |
|
| 43 |
axis@1 { |
| 44 |
reg = <1>; |
| 45 |
abs-flat = <10>; |
| 46 |
abs-fuzz = <10>; |
| 47 |
abs-range = <800 190>; |
| 48 |
linux,code = <ABS_X>; |
| 49 |
}; |
| 50 |
}; |
| 51 |
|
| 52 |
adc_keys: adc-keys { |
| 53 |
compatible = "adc-keys"; |
| 54 |
io-channels = <&saradc 2>; |
| 55 |
io-channel-names = "buttons"; |
| 56 |
keyup-threshold-microvolt = <1800000>; |
| 57 |
poll-interval = <60>; |
| 58 |
|
| 59 |
button-1 { |
| 60 |
label = "HAPPY1"; |
| 61 |
linux,code = <BTN_TRIGGER_HAPPY1>; |
| 62 |
press-threshold-microvolt = <15000>; |
| 63 |
}; |
| 64 |
|
| 65 |
button-2 { |
| 66 |
label = "HAPPY2"; |
| 67 |
linux,code = <BTN_TRIGGER_HAPPY2>; |
| 68 |
press-threshold-microvolt = <300000>; |
| 69 |
}; |
| 70 |
}; |
| 71 |
|
| 72 |
backlight: backlight { |
| 73 |
compatible = "pwm-backlight"; |
| 74 |
power-supply = <&vcc_bl>; |
| 75 |
pwms = <&pwm1 0 25000 0>; |
| 76 |
}; |
| 77 |
|
| 78 |
battery: battery { |
| 79 |
compatible = "simple-battery"; |
| 80 |
charge-full-design-microamp-hours = <3000000>; |
| 81 |
charge-term-current-microamp = <300000>; |
| 82 |
constant-charge-current-max-microamp = <1500000>; |
| 83 |
constant-charge-voltage-max-microvolt = <4200000>; |
| 84 |
factory-internal-resistance-micro-ohms = <180000>; |
| 85 |
ocv-capacity-celsius = <20>; |
| 86 |
ocv-capacity-table-0 = <4106000 100>, <4071000 95>, <4018000 90>, <3975000 85>, |
| 87 |
<3946000 80>, <3908000 75>, <3877000 70>, <3853000 65>, |
| 88 |
<3834000 60>, <3816000 55>, <3802000 50>, <3788000 45>, |
| 89 |
<3774000 40>, <3760000 35>, <3748000 30>, <3735000 25>, |
| 90 |
<3718000 20>, <3697000 15>, <3685000 10>, <3625000 5>, |
| 91 |
<3400000 0>; |
| 92 |
voltage-max-design-microvolt = <4250000>; |
| 93 |
voltage-min-design-microvolt = <3400000>; |
| 94 |
}; |
| 95 |
|
| 96 |
gpio_leds: gpio-leds { |
| 97 |
compatible = "gpio-leds"; |
| 98 |
pinctrl-names = "default"; |
| 99 |
pinctrl-0 = <&led_pins>; |
| 100 |
|
| 101 |
red_led: led-0 { |
| 102 |
color = <LED_COLOR_ID_RED>; |
| 103 |
gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>; |
| 104 |
}; |
| 105 |
|
| 106 |
green_led: led-1 { |
| 107 |
color = <LED_COLOR_ID_GREEN>; |
| 108 |
gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>; |
| 109 |
}; |
| 110 |
|
| 111 |
blue_led: led-2 { |
| 112 |
color = <LED_COLOR_ID_BLUE>; |
| 113 |
gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; |
| 114 |
}; |
| 115 |
|
| 116 |
white_led: led-3 { |
| 117 |
color = <LED_COLOR_ID_WHITE>; |
| 118 |
function = LED_FUNCTION_STATUS; |
| 119 |
gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_HIGH>; |
| 120 |
}; |
| 121 |
|
| 122 |
chg_led: led-4 { |
| 123 |
color = <LED_COLOR_ID_RED>; |
| 124 |
function = LED_FUNCTION_CHARGING; |
| 125 |
gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_HIGH>; |
| 126 |
}; |
| 127 |
|
| 128 |
}; |
| 129 |
|
| 130 |
gpio_keys: gpio-keys { |
| 131 |
compatible = "gpio-keys"; |
| 132 |
pinctrl-0 = <&btn_pins_ctrl>; |
| 133 |
pinctrl-names = "default"; |
| 134 |
|
| 135 |
button-a { |
| 136 |
gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_LOW>; |
| 137 |
label = "EAST"; |
| 138 |
linux,code = <BTN_EAST>; |
| 139 |
}; |
| 140 |
|
| 141 |
button-b { |
| 142 |
gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>; |
| 143 |
label = "SOUTH"; |
| 144 |
linux,code = <BTN_SOUTH>; |
| 145 |
}; |
| 146 |
|
| 147 |
button-down { |
| 148 |
gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; |
| 149 |
label = "DPAD-DOWN"; |
| 150 |
linux,code = <BTN_DPAD_DOWN>; |
| 151 |
}; |
| 152 |
|
| 153 |
button-home { |
| 154 |
gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; |
| 155 |
label = "HOME"; |
| 156 |
linux,code = <BTN_MODE>; |
| 157 |
}; |
| 158 |
|
| 159 |
button-l1 { |
| 160 |
gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; |
| 161 |
label = "TL"; |
| 162 |
linux,code = <BTN_TL>; |
| 163 |
}; |
| 164 |
|
| 165 |
button-l2 { |
| 166 |
gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>; |
| 167 |
label = "TL2"; |
| 168 |
linux,code = <BTN_TL2>; |
| 169 |
}; |
| 170 |
|
| 171 |
button-left { |
| 172 |
gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; |
| 173 |
label = "DPAD-LEFT"; |
| 174 |
linux,code = <BTN_DPAD_LEFT>; |
| 175 |
}; |
| 176 |
|
| 177 |
button-r1 { |
| 178 |
gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; |
| 179 |
label = "TR"; |
| 180 |
linux,code = <BTN_TR>; |
| 181 |
}; |
| 182 |
|
| 183 |
button-r2 { |
| 184 |
gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>; |
| 185 |
label = "TR2"; |
| 186 |
linux,code = <BTN_TR2>; |
| 187 |
}; |
| 188 |
|
| 189 |
button-right { |
| 190 |
gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; |
| 191 |
label = "DPAD-RIGHT"; |
| 192 |
linux,code = <BTN_DPAD_RIGHT>; |
| 193 |
}; |
| 194 |
|
| 195 |
button-select { |
| 196 |
gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; |
| 197 |
label = "SELECT"; |
| 198 |
linux,code = <BTN_SELECT>; |
| 199 |
}; |
| 200 |
|
| 201 |
button-start { |
| 202 |
gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; |
| 203 |
label = "START"; |
| 204 |
linux,code = <BTN_START>; |
| 205 |
}; |
| 206 |
|
| 207 |
button-up { |
| 208 |
gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; |
| 209 |
label = "DPAD-UP"; |
| 210 |
linux,code = <BTN_DPAD_UP>; |
| 211 |
}; |
| 212 |
|
| 213 |
button-x { |
| 214 |
gpios = <&gpio2 RK_PB3 GPIO_ACTIVE_LOW>; |
| 215 |
label = "NORTH"; |
| 216 |
linux,code = <BTN_NORTH>; |
| 217 |
}; |
| 218 |
|
| 219 |
button-y { |
| 220 |
gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_LOW>; |
| 221 |
label = "WEST"; |
| 222 |
linux,code = <BTN_WEST>; |
| 223 |
}; |
| 224 |
}; |
| 225 |
|
| 226 |
multi-led { |
| 227 |
compatible = "leds-group-multicolor"; |
| 228 |
color = <LED_COLOR_ID_RGB>; |
| 229 |
function = LED_FUNCTION_KBD_BACKLIGHT; |
| 230 |
leds = <&red_led>, <&green_led>, <&blue_led>; |
| 231 |
}; |
| 232 |
|
| 233 |
spk_amp: audio-amplifier { |
| 234 |
compatible = "simple-audio-amplifier"; |
| 235 |
enable-gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_HIGH>; |
| 236 |
pinctrl-0 = <&spk_amp_enable_h>; |
| 237 |
pinctrl-names = "default"; |
| 238 |
sound-name-prefix = "Speaker Amp"; |
| 239 |
}; |
| 240 |
|
| 241 |
sound { |
| 242 |
compatible = "simple-audio-card"; |
| 243 |
pinctrl-0 = <&hp_det>; |
| 244 |
pinctrl-names = "default"; |
| 245 |
simple-audio-card,name = "rk817_ext"; |
| 246 |
simple-audio-card,aux-devs = <&spk_amp>; |
| 247 |
simple-audio-card,format = "i2s"; |
| 248 |
simple-audio-card,hp-det-gpios = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; |
| 249 |
simple-audio-card,mclk-fs = <256>; |
| 250 |
simple-audio-card,widgets = |
| 251 |
"Microphone", "Mic Jack", |
| 252 |
"Headphone", "Headphones", |
| 253 |
"Speaker", "Internal Speakers"; |
| 254 |
simple-audio-card,routing = |
| 255 |
"MICL", "Mic Jack", |
| 256 |
"Headphones", "HPOL", |
| 257 |
"Headphones", "HPOR", |
| 258 |
"Internal Speakers", "Speaker Amp OUTL", |
| 259 |
"Internal Speakers", "Speaker Amp OUTR", |
| 260 |
"Speaker Amp INL", "HPOL", |
| 261 |
"Speaker Amp INR", "HPOR"; |
| 262 |
simple-audio-card,pin-switches = "Internal Speakers"; |
| 263 |
|
| 264 |
simple-audio-card,codec { |
| 265 |
sound-dai = <&rk817>; |
| 266 |
}; |
| 267 |
|
| 268 |
simple-audio-card,cpu { |
| 269 |
sound-dai = <&i2s1_2ch>; |
| 270 |
}; |
| 271 |
}; |
| 272 |
|
| 273 |
vibrator_left: pwm-vibrator-l { |
| 274 |
compatible = "pwm-vibrator"; |
| 275 |
pwm-names = "enable"; |
| 276 |
pwms = <&pwm4 0 25000 0>; |
| 277 |
}; |
| 278 |
|
| 279 |
vibrator_right: pwm-vibrator-r { |
| 280 |
compatible = "pwm-vibrator"; |
| 281 |
pwm-names = "enable"; |
| 282 |
pwms = <&pwm5 0 25000 0>; |
| 283 |
}; |
| 284 |
|
| 285 |
sdio_pwrseq: sdio-pwrseq { |
| 286 |
compatible = "mmc-pwrseq-simple"; |
| 287 |
clocks = <&rk817 1>; |
| 288 |
clock-names = "ext_clock"; |
| 289 |
pinctrl-0 = <&wifi_enable_h>; |
| 290 |
pinctrl-names = "default"; |
| 291 |
post-power-on-delay-ms = <200>; |
| 292 |
reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; |
| 293 |
}; |
| 294 |
|
| 295 |
vccsys: regulator-vccsys { |
| 296 |
compatible = "regulator-fixed"; |
| 297 |
regulator-name = "vcc3v8_sys"; |
| 298 |
regulator-always-on; |
| 299 |
regulator-min-microvolt = <3800000>; |
| 300 |
regulator-max-microvolt = <3800000>; |
| 301 |
}; |
| 302 |
}; |
| 303 |
|
| 304 |
&cpu0 { |
| 305 |
cpu-supply = <&vdd_arm>; |
| 306 |
}; |
| 307 |
|
| 308 |
&cpu1 { |
| 309 |
cpu-supply = <&vdd_arm>; |
| 310 |
}; |
| 311 |
|
| 312 |
&cpu2 { |
| 313 |
cpu-supply = <&vdd_arm>; |
| 314 |
}; |
| 315 |
|
| 316 |
&cpu3 { |
| 317 |
cpu-supply = <&vdd_arm>; |
| 318 |
}; |
| 319 |
|
| 320 |
&display_subsystem { |
| 321 |
status = "okay"; |
| 322 |
}; |
| 323 |
|
| 324 |
&dsi { |
| 325 |
#address-cells = <1>; |
| 326 |
#size-cells = <0>; |
| 327 |
status = "okay"; |
| 328 |
|
| 329 |
internal_display: panel@0 { |
| 330 |
reg = <0>; |
| 331 |
compatible = "gameforce,chi-panel"; |
| 332 |
backlight = <&backlight>; |
| 333 |
iovcc-supply = <&vcc_lcd>; |
| 334 |
vcc-supply = <&vcc_lcd>; |
| 335 |
reset-gpios = <&gpio3 RK_PA0 GPIO_ACTIVE_LOW>; |
| 336 |
|
| 337 |
port { |
| 338 |
mipi_in_panel: endpoint { |
| 339 |
remote-endpoint = <&mipi_out_panel>; |
| 340 |
}; |
| 341 |
}; |
| 342 |
}; |
| 343 |
|
| 344 |
ports { |
| 345 |
mipi_out: port@1 { |
| 346 |
reg = <1>; |
| 347 |
|
| 348 |
mipi_out_panel: endpoint { |
| 349 |
remote-endpoint = <&mipi_in_panel>; |
| 350 |
}; |
| 351 |
}; |
| 352 |
}; |
| 353 |
}; |
| 354 |
|
| 355 |
&dsi_dphy { |
| 356 |
status = "okay"; |
| 357 |
}; |
| 358 |
|
| 359 |
&gpu { |
| 360 |
mali-supply = <&vdd_logic>; |
| 361 |
status = "okay"; |
| 362 |
}; |
| 363 |
|
| 364 |
&i2c0 { |
| 365 |
clock-frequency = <400000>; |
| 366 |
i2c-scl-falling-time-ns = <16>; |
| 367 |
i2c-scl-rising-time-ns = <280>; |
| 368 |
status = "okay"; |
| 369 |
|
| 370 |
rk817: pmic@20 { |
| 371 |
compatible = "rockchip,rk817"; |
| 372 |
reg = <0x20>; |
| 373 |
#clock-cells = <1>; |
| 374 |
clock-names = "mclk"; |
| 375 |
clock-output-names = "rk808-clkout1", "xin32k"; |
| 376 |
clocks = <&cru SCLK_I2S1_OUT>; |
| 377 |
interrupt-parent = <&gpio0>; |
| 378 |
interrupts = <RK_PC1 IRQ_TYPE_LEVEL_LOW>; |
| 379 |
pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>; |
| 380 |
pinctrl-names = "default"; |
| 381 |
#sound-dai-cells = <0>; |
| 382 |
system-power-controller; |
| 383 |
wakeup-source; |
| 384 |
|
| 385 |
vcc1-supply = <&vccsys>; |
| 386 |
vcc2-supply = <&vccsys>; |
| 387 |
vcc3-supply = <&vccsys>; |
| 388 |
vcc4-supply = <&vccsys>; |
| 389 |
vcc5-supply = <&vccsys>; |
| 390 |
vcc6-supply = <&vccsys>; |
| 391 |
vcc7-supply = <&vcc_3v0>; |
| 392 |
vcc8-supply = <&vccsys>; |
| 393 |
vcc9-supply = <&dcdc_boost>; |
| 394 |
|
| 395 |
regulators { |
| 396 |
vdd_logic: DCDC_REG1 { |
| 397 |
regulator-always-on; |
| 398 |
regulator-boot-on; |
| 399 |
regulator-max-microvolt = <1150000>; |
| 400 |
regulator-min-microvolt = <950000>; |
| 401 |
regulator-name = "vdd_logic"; |
| 402 |
regulator-ramp-delay = <6001>; |
| 403 |
|
| 404 |
regulator-state-mem { |
| 405 |
regulator-on-in-suspend; |
| 406 |
regulator-suspend-microvolt = <950000>; |
| 407 |
}; |
| 408 |
}; |
| 409 |
|
| 410 |
vdd_arm: DCDC_REG2 { |
| 411 |
regulator-always-on; |
| 412 |
regulator-boot-on; |
| 413 |
regulator-max-microvolt = <1350000>; |
| 414 |
regulator-min-microvolt = <950000>; |
| 415 |
regulator-name = "vdd_arm"; |
| 416 |
regulator-ramp-delay = <6001>; |
| 417 |
|
| 418 |
regulator-state-mem { |
| 419 |
regulator-off-in-suspend; |
| 420 |
regulator-suspend-microvolt = <950000>; |
| 421 |
}; |
| 422 |
}; |
| 423 |
|
| 424 |
vcc_ddr: DCDC_REG3 { |
| 425 |
regulator-always-on; |
| 426 |
regulator-boot-on; |
| 427 |
regulator-name = "vcc_ddr"; |
| 428 |
|
| 429 |
regulator-state-mem { |
| 430 |
regulator-on-in-suspend; |
| 431 |
}; |
| 432 |
}; |
| 433 |
|
| 434 |
vcc_3v0: DCDC_REG4 { |
| 435 |
regulator-always-on; |
| 436 |
regulator-boot-on; |
| 437 |
regulator-max-microvolt = <3000000>; |
| 438 |
regulator-min-microvolt = <3000000>; |
| 439 |
regulator-name = "vcc_3v0"; |
| 440 |
|
| 441 |
regulator-state-mem { |
| 442 |
regulator-off-in-suspend; |
| 443 |
regulator-suspend-microvolt = <3000000>; |
| 444 |
}; |
| 445 |
}; |
| 446 |
|
| 447 |
vcc_1v8: LDO_REG2 { |
| 448 |
regulator-always-on; |
| 449 |
regulator-boot-on; |
| 450 |
regulator-max-microvolt = <1800000>; |
| 451 |
regulator-min-microvolt = <1800000>; |
| 452 |
regulator-name = "vcc_1v8"; |
| 453 |
|
| 454 |
regulator-state-mem { |
| 455 |
regulator-on-in-suspend; |
| 456 |
regulator-suspend-microvolt = <1800000>; |
| 457 |
}; |
| 458 |
}; |
| 459 |
|
| 460 |
vdd_1v0: LDO_REG3 { |
| 461 |
regulator-always-on; |
| 462 |
regulator-boot-on; |
| 463 |
regulator-max-microvolt = <1000000>; |
| 464 |
regulator-min-microvolt = <1000000>; |
| 465 |
regulator-name = "vdd_1v0"; |
| 466 |
|
| 467 |
regulator-state-mem { |
| 468 |
regulator-on-in-suspend; |
| 469 |
regulator-suspend-microvolt = <1000000>; |
| 470 |
}; |
| 471 |
}; |
| 472 |
|
| 473 |
vcc_3v0_pmu: LDO_REG4 { |
| 474 |
regulator-always-on; |
| 475 |
regulator-boot-on; |
| 476 |
regulator-max-microvolt = <3000000>; |
| 477 |
regulator-min-microvolt = <3000000>; |
| 478 |
regulator-name = "vcc_3v0_pmu"; |
| 479 |
|
| 480 |
regulator-state-mem { |
| 481 |
regulator-on-in-suspend; |
| 482 |
regulator-suspend-microvolt = <3000000>; |
| 483 |
}; |
| 484 |
}; |
| 485 |
|
| 486 |
vccio_sd: LDO_REG5 { |
| 487 |
regulator-always-on; |
| 488 |
regulator-boot-on; |
| 489 |
regulator-max-microvolt = <3300000>; |
| 490 |
regulator-min-microvolt = <1800000>; |
| 491 |
regulator-name = "vccio_sd"; |
| 492 |
|
| 493 |
regulator-state-mem { |
| 494 |
regulator-on-in-suspend; |
| 495 |
regulator-suspend-microvolt = <3300000>; |
| 496 |
}; |
| 497 |
}; |
| 498 |
|
| 499 |
vcc_sd: LDO_REG6 { |
| 500 |
regulator-boot-on; |
| 501 |
regulator-max-microvolt = <3300000>; |
| 502 |
regulator-min-microvolt = <3300000>; |
| 503 |
regulator-name = "vcc_sd"; |
| 504 |
|
| 505 |
regulator-state-mem { |
| 506 |
regulator-on-in-suspend; |
| 507 |
regulator-suspend-microvolt = <3300000>; |
| 508 |
}; |
| 509 |
}; |
| 510 |
|
| 511 |
vcc_bl: LDO_REG7 { |
| 512 |
regulator-max-microvolt = <3300000>; |
| 513 |
regulator-min-microvolt = <3300000>; |
| 514 |
regulator-name = "vcc_bl"; |
| 515 |
|
| 516 |
regulator-state-mem { |
| 517 |
regulator-off-in-suspend; |
| 518 |
regulator-suspend-microvolt = <3300000>; |
| 519 |
}; |
| 520 |
}; |
| 521 |
|
| 522 |
vcc_lcd: LDO_REG8 { |
| 523 |
regulator-max-microvolt = <2800000>; |
| 524 |
regulator-min-microvolt = <2800000>; |
| 525 |
regulator-name = "vcc_lcd"; |
| 526 |
|
| 527 |
regulator-state-mem { |
| 528 |
regulator-off-in-suspend; |
| 529 |
regulator-suspend-microvolt = <2800000>; |
| 530 |
}; |
| 531 |
}; |
| 532 |
|
| 533 |
vcc_wifi: LDO_REG9 { |
| 534 |
regulator-always-on; |
| 535 |
regulator-boot-on; |
| 536 |
regulator-max-microvolt = <3300000>; |
| 537 |
regulator-min-microvolt = <3300000>; |
| 538 |
regulator-name = "vcc_wifi"; |
| 539 |
|
| 540 |
regulator-state-mem { |
| 541 |
regulator-off-in-suspend; |
| 542 |
regulator-suspend-microvolt = <3300000>; |
| 543 |
}; |
| 544 |
}; |
| 545 |
|
| 546 |
dcdc_boost: BOOST { |
| 547 |
regulator-max-microvolt = <5000000>; |
| 548 |
regulator-min-microvolt = <5000000>; |
| 549 |
regulator-name = "dcdc_boost"; |
| 550 |
|
| 551 |
regulator-state-mem { |
| 552 |
regulator-off-in-suspend; |
| 553 |
}; |
| 554 |
}; |
| 555 |
|
| 556 |
otg_switch: OTG_SWITCH { |
| 557 |
regulator-name = "otg_switch"; |
| 558 |
|
| 559 |
regulator-state-mem { |
| 560 |
regulator-off-in-suspend; |
| 561 |
}; |
| 562 |
}; |
| 563 |
}; |
| 564 |
|
| 565 |
rk817_charger: charger { |
| 566 |
monitored-battery = <&battery>; |
| 567 |
rockchip,resistor-sense-micro-ohms = <10000>; |
| 568 |
rockchip,sleep-enter-current-microamp = <300000>; |
| 569 |
rockchip,sleep-filter-current-microamp = <100000>; |
| 570 |
}; |
| 571 |
}; |
| 572 |
}; |
| 573 |
|
| 574 |
&i2s1_2ch { |
| 575 |
status = "okay"; |
| 576 |
}; |
| 577 |
|
| 578 |
&io_domains { |
| 579 |
vccio1-supply = <&vcc_3v0_pmu>; |
| 580 |
vccio2-supply = <&vccio_sd>; |
| 581 |
vccio3-supply = <&vcc_3v0>; |
| 582 |
vccio4-supply = <&vcc_3v0>; |
| 583 |
vccio5-supply = <&vcc_3v0>; |
| 584 |
vccio6-supply = <&vcc_3v0>; |
| 585 |
status = "okay"; |
| 586 |
}; |
| 587 |
|
| 588 |
&pinctrl { |
| 589 |
bluetooth-pins { |
| 590 |
bt_reset: bt-reset { |
| 591 |
rockchip,pins = |
| 592 |
<0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>; |
| 593 |
}; |
| 594 |
|
| 595 |
bt_wake_dev: bt-wake-dev { |
| 596 |
rockchip,pins = |
| 597 |
<0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; |
| 598 |
}; |
| 599 |
|
| 600 |
bt_wake_host: bt-wake-host { |
| 601 |
rockchip,pins = |
| 602 |
<0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>; |
| 603 |
}; |
| 604 |
}; |
| 605 |
|
| 606 |
headphone { |
| 607 |
hp_det: hp-det { |
| 608 |
rockchip,pins = |
| 609 |
<2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>; |
| 610 |
}; |
| 611 |
}; |
| 612 |
|
| 613 |
gpio-btns { |
| 614 |
btn_pins_ctrl: btn-pins-ctrl { |
| 615 |
rockchip,pins = |
| 616 |
<1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, |
| 617 |
<1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, |
| 618 |
<1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, |
| 619 |
<1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, |
| 620 |
<2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, |
| 621 |
<2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, |
| 622 |
<2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, |
| 623 |
<2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, |
| 624 |
<2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, |
| 625 |
<2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, |
| 626 |
<2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, |
| 627 |
<2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>, |
| 628 |
<2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, |
| 629 |
<2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, |
| 630 |
<2 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>; |
| 631 |
}; |
| 632 |
}; |
| 633 |
|
| 634 |
gpio-leds { |
| 635 |
led_pins: led-pins { |
| 636 |
rockchip,pins = |
| 637 |
<3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>, |
| 638 |
<3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>, |
| 639 |
<3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>, |
| 640 |
<3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>, |
| 641 |
<3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; |
| 642 |
}; |
| 643 |
}; |
| 644 |
|
| 645 |
pmic { |
| 646 |
pmic_int: pmic-int { |
| 647 |
rockchip,pins = |
| 648 |
<0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>; |
| 649 |
}; |
| 650 |
|
| 651 |
soc_slppin_gpio: soc_slppin_gpio { |
| 652 |
rockchip,pins = |
| 653 |
<0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>; |
| 654 |
}; |
| 655 |
|
| 656 |
soc_slppin_rst: soc_slppin_rst { |
| 657 |
rockchip,pins = |
| 658 |
<0 RK_PA4 2 &pcfg_pull_none>; |
| 659 |
}; |
| 660 |
|
| 661 |
soc_slppin_slp: soc_slppin_slp { |
| 662 |
rockchip,pins = |
| 663 |
<0 RK_PA4 1 &pcfg_pull_none>; |
| 664 |
}; |
| 665 |
}; |
| 666 |
|
| 667 |
sdio-pwrseq { |
| 668 |
wifi_enable_h: wifi-enable-h { |
| 669 |
rockchip,pins = |
| 670 |
<0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; |
| 671 |
}; |
| 672 |
}; |
| 673 |
|
| 674 |
speaker { |
| 675 |
spk_amp_enable_h: spk-amp-enable-h { |
| 676 |
rockchip,pins = |
| 677 |
<2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; |
| 678 |
}; |
| 679 |
}; |
| 680 |
}; |
| 681 |
|
| 682 |
&pmu_io_domains { |
| 683 |
pmuio1-supply = <&vcc_1v8>; |
| 684 |
pmuio2-supply = <&vcc_3v0_pmu>; |
| 685 |
status = "okay"; |
| 686 |
}; |
| 687 |
|
| 688 |
&pwm1 { |
| 689 |
status = "okay"; |
| 690 |
}; |
| 691 |
|
| 692 |
&pwm4 { |
| 693 |
status = "okay"; |
| 694 |
}; |
| 695 |
|
| 696 |
&pwm5 { |
| 697 |
status = "okay"; |
| 698 |
}; |
| 699 |
|
| 700 |
&saradc { |
| 701 |
vref-supply = <&vcc_1v8>; |
| 702 |
status = "okay"; |
| 703 |
}; |
| 704 |
|
| 705 |
&sdio { |
| 706 |
bus-width = <4>; |
| 707 |
cap-sd-highspeed; |
| 708 |
cap-sdio-irq; |
| 709 |
disable-wp; |
| 710 |
keep-power-in-suspend; |
| 711 |
mmc-pwrseq = <&sdio_pwrseq>; |
| 712 |
no-mmc; |
| 713 |
no-sd; |
| 714 |
non-removable; |
| 715 |
sd-uhs-sdr104; |
| 716 |
status = "okay"; |
| 717 |
}; |
| 718 |
|
| 719 |
&sdmmc { |
| 720 |
cap-mmc-highspeed; |
| 721 |
cap-sd-highspeed; |
| 722 |
no-sdio; |
| 723 |
sd-uhs-sdr12; |
| 724 |
sd-uhs-sdr25; |
| 725 |
sd-uhs-sdr50; |
| 726 |
sd-uhs-sdr104; |
| 727 |
vmmc-supply = <&vcc_sd>; |
| 728 |
vqmmc-supply = <&vccio_sd>; |
| 729 |
status = "okay"; |
| 730 |
}; |
| 731 |
|
| 732 |
&sfc { |
| 733 |
#address-cells = <1>; |
| 734 |
pinctrl-0 = <&sfc_clk &sfc_cs0 &sfc_bus2>; |
| 735 |
pinctrl-names = "default"; |
| 736 |
#size-cells = <0>; |
| 737 |
status = "okay"; |
| 738 |
|
| 739 |
flash@0 { |
| 740 |
compatible = "jedec,spi-nor"; |
| 741 |
reg = <0>; |
| 742 |
spi-max-frequency = <108000000>; |
| 743 |
spi-rx-bus-width = <2>; |
| 744 |
spi-tx-bus-width = <1>; |
| 745 |
}; |
| 746 |
}; |
| 747 |
|
| 748 |
&tsadc { |
| 749 |
status = "okay"; |
| 750 |
}; |
| 751 |
|
| 752 |
&u2phy { |
| 753 |
status = "okay"; |
| 754 |
|
| 755 |
u2phy_otg: otg-port { |
| 756 |
status = "okay"; |
| 757 |
}; |
| 758 |
}; |
| 759 |
|
| 760 |
&usb20_otg { |
| 761 |
status = "okay"; |
| 762 |
}; |
| 763 |
|
| 764 |
/* |
| 765 |
* The right ADC joystick exists connected to an unknown ADC |
| 766 |
* controller which can be communicated with via uart0. This ADC device |
| 767 |
* is an 8-pin SOIC with no markings located right next to the left ADC |
| 768 |
* joystick ribbon cable. The pinout for this ADC controller appears to |
| 769 |
* be pin 1 - VCC (2.8v), pin 2 - 1.8v (clk maybe?), pin 3 - GPIO 10, |
| 770 |
* pin 4 - unknown, pin 5 - unknown, pin 6 - analog in, pin 7 - analog in, |
| 771 |
* pin 8 - ground. There is currently a userspace UART driver for this |
| 772 |
* device but it only works with the BSP joystick driver. |
| 773 |
*/ |
| 774 |
&uart0 { |
| 775 |
status = "okay"; |
| 776 |
}; |
| 777 |
|
| 778 |
/* |
| 779 |
* Bluetooth was not working on BSP and is not currently working on |
| 780 |
* mainline due to missing firmware. Bluetooth requires removal of DMA |
| 781 |
* or else it will not probe. |
| 782 |
*/ |
| 783 |
&uart1 { |
| 784 |
/delete-property/ dma-names; |
| 785 |
/delete-property/ dmas; |
| 786 |
uart-has-rtscts; |
| 787 |
status = "okay"; |
| 788 |
|
| 789 |
bluetooth: bluetooth { |
| 790 |
compatible = "realtek,rtl8723ds-bt"; |
| 791 |
device-wake-gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>; |
| 792 |
enable-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; |
| 793 |
host-wake-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_HIGH>; |
| 794 |
pinctrl-0 = <&bt_reset>, <&bt_wake_dev>, <&bt_wake_host>; |
| 795 |
pinctrl-names = "default"; |
| 796 |
}; |
| 797 |
}; |
| 798 |
|
| 799 |
&uart2 { |
| 800 |
pinctrl-0 = <&uart2m1_xfer>; |
| 801 |
pinctrl-names = "default"; |
| 802 |
status = "okay"; |
| 803 |
}; |
| 804 |
|
| 805 |
&vopb { |
| 806 |
status = "okay"; |
| 807 |
}; |
| 808 |
|
| 809 |
&vopb_mmu { |
| 810 |
status = "okay"; |
| 811 |
}; |